- cleaned up some portability issues
- changes to CMakeLists.txt to work on Linux environment