Update CMake, cppcheck fixes