The two scenes of Nelson removing his mask were supposed to feature the "Mission: Impossible" theme music, but the staff couldn't get the rights to the song, so Alf Clausen had to create a unique motif.
The opening sequence, where Bart goes through a checklist of all the things to do before summer vacation ends, was originally created for the season 14 episode I'm Spelling as Fast as I Can (2003), but was cut for time. As this episode was running short, that sequence was added at the beginning to fill time. In fact, the workprint shows that this episode was initially much longer, but many scenes were either altered or cut entirely.
This episode parodies, and contains many references to, the famous Scopes Monkey Trial and the play Inherit the Wind. Lisa, like Scopes, is arrested for teaching evolution. Flanders, like prosecutor William Jennings Bryan, answers questions about the Bible on the witness stand. The prosecutor, Wallace Brady, has the same initials as prosecutor William Jennings Bryan, whose name was changed to Matthew Harrison Brady in Inherit the Wind. The defense attorney's name, Clarice Drummond, is a play on Clarrence Darrow, who was renamed Henry Drummond in Inherit the Wind.
In Rolling Stone Magazine's June 28, 1990 cover story about "The Simpsons," it called Homer Simpson "A man at whom evolution has laughed." Here, the law against teaching evolution is struck down because angry Homer resembles the picture of what an evolutionary "missing link" would look like.