move config to cfg, remove tracking structs for configs and switch to a global appCfg and returning independent cfg