updated code and documentation to conform to puppet best practice