[TASK] Refactor router to use classes.