Lots of changes. Runs CMake now.