further c++ cleanup