Improvements to CMake