Add documentation and fix CMakeLists.txt