Refactor

This PR is just to show what I'm going for here and get some feedback.

I'm using this daily now, but I'm worried it won't be a completely smooth transition, see issue #467.

I made a quick graph to show (roughly) what happens, edges either mean "is imported by" or "is imported after" so the whole thing reads top to bottom.
`vimdot config-dependencies.gv` or `dot -Tpng config-dependencies.gv > img.png`