Improve config loading