Refactoring model types