Extract grade variable in router class

Signed-off-by: JWhy <jwhy@jwhy.de>