Clean up CMake files

Supersedes #158