Refactoring of model.