Changed the constructors for the models and updated some code