CMake and white-space cleanup

These changes introduce CMake as the default build system. Along this change, i cleaned-up the trailing white-spaces in the source files.