finish router refactor