Refactored configuration loader