members. The first segment, "Hex and the City", was written by Joel Cohen. The gypsy fortune teller in the segment was portrayed by Tress MacNeille while the leprechaun was played by Dan Castellaneta. Current showrunner Al Jean stated in the DVD audio commentary for the episode that the leprechaun seen at the end of the segment was "as much as [he] had ever laughed" at the color screening for the episode. He stated that the way the leprechaun moved and the way Reardon directed it was "just so funny". The leprechaun has reappeared many times since the episode, becoming one of few characters on The Simpsons to "leap from Halloween [shows] to regular shows". "House of Whacks" was co-written by John Frink and Don Payne. Payne, who conceived the story of the segment, based it on Stanley Kubrick's film 2001: A Space Odyssey. The segment would originally end with the Ultrahouse killing Homer, and, for compensation, the family would program the house with Homer's personality. The Ultrahouse was portrayed by Pierce Brosnan. The role was originally intended for Sean Connery, and over the course of production, the staff also considered Lyle Lovett and Gary Oldman. The decision remained until "someone who worked for [Lovett] decided it was somehow insulting to have him play a house", according to Scully. At this point, the staff settled on Brosnan. Scully stated that "Brosnan wound up doing a great job" and that working with him was "really funny". Originally, the Ultrahouse would have a pompadour and play the guitar, however they changed its mannerisms to suit Brosnan's performance better. Matthew Perry also made a guest appearance, playing himself as one of Ultrahouse's voice options. Regular cast member Dan Castellaneta portrayed Dennis Miller in the segment (a special ending credit had to be made to avoid confusion with viewers who thought the real Dennis Miller did voice-work on the show). One scene was cut from the segment. The scene would take place during Marge's call to the police station, where police chief Clancy Wiggum, while answering Marge's call, is being shot at by "RoboCops". The third segment, "Wiz Kids", was written by Carolyn Omine. Omine stated in the DVD audio commentary for the episode that the segment was "a really hard sell", since only about four of the writers had read Harry Potter and the Philosopher's Stone, the book the segment was based on, while