Fix a number of puppet-lint warnings/errors, cleaned up a good chunk of code