Applying the novoda codestyle to an external PR 

Applying the novoda codestyle rules to #43 and breaking out some smaller methods