Some fixes to compile cleanly when using some newer clang warnings.

Specifically, this fixes warnings found under the following flags:
   -Wswitch-enum
   -Wsemicolon-before-method-body
   -Widiomatic-parentheses
Merge pull request #13 from bjhomer/pull-requests/Weverything-fixes

Some fixes to compile cleanly when using some newer clang warnings.