Reorganization of headers and modified CMakeLists.txt