Marge and Lisa visit the nail salon where they engage in a spirited debate as to whether a woman can be smart, powerful and beautiful all at the same time and spin four tales of famous women featuring famous Springfield faces: Selma as Queen Elizabeth I, Lisa as Snow White, Marge as Lady Macbeth and Maggie as Howard Roark, the idealistic architect protagonist from Ayn Rand’s The Fountainhead.
When Marge learns Springfield Elementary is the worst school in the state, she and Homer rent an apartment in the upscale Waverly Hills school district so Bart and Lisa can attend a better school. Meanwhile, Homer moves into the rented Waverly Hills apartment and gets used to the bachelor lifestyle.
Lisa infiltrates a convent in order to steal back Maggie who was accidentally taken in by nuns. While in the convent, Lisa uncovers a series of cryptic clues leading to a hidden jewel in Springfield. With help from resident history buffs Principal Skinner and Comic Book Guy, Lisa sets off to find the coveted prize. But Springfield's Freemasons are also hot on the trail of the jewel, and Lisa must race against them to find the jewel and rescue Maggie.
When the adjustable rate on the Simpson couple's mortgage resets at more than the pair can afford, they must sell their house. Good Samaritan Ned Flanders buys the house and rents it out to them at an affordable rate. But Homer pushes his luck too far when he takes advantage of Ned's generous landlord duties.
Bart gets a perfect score on a practice test for a national achievement test, which not only rattles Lisa, but it means Bart gets to attend a special party instead of having to take the actual test. Meanwhile, Homer must avoid injuring himself for an entire afternoon after failing to pay his insurance.
Bart lands himself in trouble when he steals a mobile phone from Denis Leary and subsequently uses it to land the actor a comical film role. The troublemaker then leads his family to the ancient ruins of Machu Picchu after Marge confiscates the device and decides to use its GPS technology to track her son.