Improved the performance of 'ControllerFactory'