Move most globals into config class