Move Router class to own file