Refactoring the navigation plugin.