Implement the functions of the menu.