Refactored configuration file reading.