More refactoring of the model system.