Restructuring, CMake build system, more functions.