Router refactor.