Refactored control handler creation into factory class