Fix CMakeLists.txt.
Add some notes to a documentation.
Varios improvements and fixes.