Improve the package layout and CMakeLists