Refactored routing and dispatching configuration