Added saving of model