Implemented inheritance support for models.