Move view instance creation methods to ViewFactoryTrait.