don't try and set rootURL on a string
router.js cleanup
Merge pull request #5516 from stefanpenner/router

fix failing test in chrome, and cleanup route method