Moved model and view metaclass code to a separate class - BaseMeta.