Refactor navigation