Further imrpovements to CMake