vtx: C++ conversion.  Miscellaneous fixes and cleanup.