Use byte ops instead of strings in router

* add defer route closer in main