Config rewrite, part 1.
This is one of those DRIES!!! DRIES!!! moments.
Well, I tried. @AbrarSyed it's all yours.