@cbagnati and I worked on this on Saturday.
This is merely the groundwork for all of the config generator code.
@robozman and @jhgarner , don't worry too much about checking this rigorously, just make sure that I'm not doing anything stupid.