Convert to C++, reformat and add GLM library