Some more refactoring to Model.pm