Refactored system of loading config files