Add a model object factory to eliminate dependency on graphics code from model objects.