Use CMake and restructure directories