Refactor and tests for Route
Refactor and tests for Router