Some logical reorganizing and function creation
Logic reorganizing

Moved all of the almost-identical functions for adjusting parts of the
cfg into a single @cfg command