Refactored code of the configurator