Switch to CMake build system.
Add behaviour for Marble.
Minor fixes.