Change router to a plugin