Simplify router and add tests

- add sinon