CMakeLists.txt modified, Readme updated, warnings fixed from main.cc