Consolodates code on navbar