Backport some of the old confing