Refactored routing.