Clean up CMake files

Supersedes #158
What is it done on purpose?