Extract router to its own file