Refactoring routers