moved router to dedicated module and defined route factory