Refactoring model-specific code.