 The name "Margles" was a reference to Moynihan's ex-girlfriend Margaret.Moynihan envisioned the episode as a way to negate any negative energy about their relationship and breakup, thereby "exorcis[ing] [the energy] from his heart".A large portion of the episode's original draft featured Finn and Jake discovering a strange naturalistic temple inscribed with carvings of Abraham Lincoln.