Refactored config