Refactoring puppet