Added CMake build system
Fixed stupid errors