Refactor navigation extension.