Refactored routing