pull out toplevel config into templates