Subroute navigation

nit: `while (route)`

Also, you generally want `!==` and `===` style comparisons when interacting with `null`/`undefined`/etc, just to be safe