Refactor config to make it globally accessible