More router refactoring.