In the second season of the show there was an episode called Summer Belongs to You where Dr. Doofenshmirtz works with Perry the Platypus to rescue his daughter Vanessa Doofenshmirtz. In the third season there was an episode called Agent Doof where he tries to become a secret agent working for the good guys. He accidentally causes more problems than he did when he was evil so he decides to go back to being evil. In the Season Three episode, Where’s Perry, he builds a machine called the “Ultimate Evil-Inator” to turn Perry’s wikt:boss Major Monogram evil. He accidentally hits Monogram’s assistant Carl making him turn evil. Doof ends up working with Monogram and Perry to stop Carl because Carl is a more dangerous villain than Doof was. He builds a machine called the Re-Good Inator and turns Carl good again. 