Refactor code to reflect style guidelines

[![Build Status](https://travis-ci.org/ppp0/puppet-packages.png?branch=issue-47)](https://travis-ci.org/ppp0/puppet-packages)