Extracted getConfigSection from getTownsFromConfig.

Improved reusability of getConfigSection.