Minor refactorings in config file parse code to clear up code.