Moved generate_menu into helper.