Refactored dispatcher