[task] code cleanup and adding license header
Merge pull request #190 from davidmoebius/code_cleanup

[task] code cleanup and adding license header