Merge pull request #47 from ppp0/issue-47

Refactor code to reflect style guidelines