Minor concern about using the singleton config here, but it's not very common to replace the config and shouldn't happen during run time so I think that's ok.