Refactored gate system with delegate