Refactored navbar implementation