Legacy C++ classes and functions