Added way for listeners to the "beforeRoute" event to modify the route