Updated swig extension to use virtual ModelObject