Refactored the config