Refactoring router.go to handle errors. Improving code coverage.

Refactoring router.go to handle errors. Improving code coverage.
is this re-initializing what is done on line 142?