Refactor main navigation