Setting up the functionality for the navigation