model_form refactoring