Some small fix/improvements and a added a url rewrite hook on URLRouter.