more tweaks to allow env vars as global config