[WIP] Refactor navigation.

@andrewtennison