model schema category
refactoring controller and model