added support for optional params and removed urlescaping from reverse routing