Enabled cppcheck and cleaned up errors in source code.
Merge pull request #71 from murrekatt/develop

Enabled cppcheck and cleaned up errors in source code.