Injecting instance of ElementFactoryInterface and using this to instantiate the element objects