Move the configuration file handling code into a separate module.