Move router to lib