These next two functions should really be passed in a `config` rather than fetching it themselves.