fixes some directory structure issues and CMake files