Refactored puppet into PuppetManager class.