Refactored the configuration loading system