Updating towards C++ version