More refactoring of models