Changed the way to create a new extension of the model

Now the model is a class like, not an object type.