some puppet refactoring