Fix some initialization order warnings.
Fix some switch/case warnings.
Fix some type comparison warnings.
Fix some const usage warnings.
Merge pull request #157 from unknownbrackets/warnings

Warning fixes