Lots of clang warning fixes
Merge pull request #207 from tklengyel/clang_fixes

Lots of clang warning fixes