Router refactored