Added functions that get called when the user clicks on the menu buttons.