Refactor some functions into the Config object.