Added handlers for navbar

Checking if it corrects all the wrong behaviour.