Added delete function to the delete menu item.