Rharrison10/cleanup Fix style and syntax errors

I've fixed a bunch of style and syntax errors to comply with the [Puppet Style Guide](http://docs.puppetlabs.com/guides/style_guide.html) and avoid variable scoping issues.