making callback and innerclass of Router and changing rawRoute to be jso...

...n object