Refactor navigation module