Improve configuration loading