Pure cosmetic changes to all .cpp files.
Included support for CMake and fixed src directory.
Added new tests file that previously existed in the tests repository.
Fixed the tests.