The film began development in 2004, and Dixon reworked Meehan and O'Donnell's first draft of the screenplay to tone down the musical's campiness. In 2005, Shankman agreed to direct the film. Composer/lyricist Marc Shaiman and lyricist Scott Wittman reworked their songs from the Broadway musical for the film's soundtrack, and also wrote four new songs for the film. Principal photography commenced in September 2006 with a budget of $75 million, and ended in December of that year; filming took place on locations in Toronto and Hamilton, Ontario, Canada and on soundstages at Toronto's Showline Studios. Recording sessions for the film's songs and soundtrack took place in San Diego, California in the United States.