Extracted routing to handlers.