Navbar tidied up and working with states