Changed factory to pass a Config object rather than an array