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

Refactoring router.go to handle errors. Improving code coverage. Adding a constructor to Routes structure to pass filename to persist in. Turns the class testable

@rajatchopra  please review