The scene of the children pulling the school bus up the hill is a reference to the movie "Fitzcarraldo". When Uter makes reference to the movie, Nelson punches him in the stomach saying "That movie was flawed".
The episode's couch gag (which shows the house, Springfield, the continent, the planet, the Milky Way, and the universe, and finally goes back to Homer's body) spoofs the 1977 science education movie Powers of Ten. The gag was first used in "The Ziff Who Came to Dinner."
Also, Bart was able to obey the order at the Simpson home, but not at school, which would mean that the school is smaller than the Simpson home.
Also at the end when Lisa throws the restraining order into the fire, you can see it and it says the plaintiff is Bart, and the defendant is Lisa. That would mean that Bart originally filed the order and Lisa had to stay away from him.