Handle menu items being selected and calling function array