Changed router to library