Clean up whitespace, move common-use templates to own folder

#36
Merge pull request #71 from metridoc/code_cleanup

Clean up whitespace, move common-use templates to own folder