More directory movements and CMake refactoring