core: get rid of all uses of config_global