minor code style
fix missing header comment
moved helper functions outside of class for easier reuse
minor code style
Merge pull request #42 from tkruse/refactor

Refactor