Changed configuration to be a provider rather than a singleton