Fixed CMakeLists.txt and other minor things