Refactored config files and new config loader