The was originally conceived of as a self-contained episode called "Hell".
Xander says: "Yeah, we got trouble. Right here in Hellmouth City". This is a reference to the song "Ya Got Trouble", from the musical The Music Man (1957).
Xander says: "The better to cut you down to size, Grandma". This is a reference to the dialogue between the girl and the wolf in the tale "Little Red Riding Hood" (1697, 1812).
Xander called the demons who raided Sunnydale the "wild bunch". This is a reference to 1969 film, The Wild Bunch, which is one of Joss Whedon's favorite movies.