Simplify and clarify config file generation.

    Config file generation was convoluted and difficult to
    follow due to branching on boolean conditions.
    Restructured so that generation is straightforward, and
    so that the type of config being requested is obvious.