Big update of CMakeLists.txt