Puppet refactoring