Refactoring CMakeLists.txt