Refactor model classes and add support for requirements on a model