Refactor navigation templates.