Re-structred code to ensure that config loads