Refactoring navbar