Enums, formatting, cmake, switch/case and various minor changes
Formatted the code with the "indent" tool. Several formatting options are available.
Merge pull request #2 from xyproto/master

Enums, formatting, cmake, switch/case and various minor changes