Having laid all the groundwork, we can now remove the global `cfg'