Some minor fixes. Improved CMake config.