Move some methods to a util class
Refactor more things
Clean up some more things
Merge pull request #13 from nuclearace/Refactor

Refactor