Adding the model objects as javascript "classes"