Added support for submenus.