Changed the config factory to a provider