Router tests and clean-up

* Moved deprecated router to separate file
* Moved tests for deprecated router to separate file
* Added more tests for router
* Added hash.js tests
' General code clean-up