Refactor the config module to be a class rather than a singleton.