Moved str and repr methods into C++