added modelObj and pushed some of the model processing to the object