modernized (as per puppet-template) and added tests