Almost finished porting everything to c++
Even closer to compile on c++