C++

Merging to dev as it seems to compile with no errors. As the "rewrite in C++" portion is done, debugging belongs on the dev branch.