Reorganized directory structure, added CMake support