puppet refactor