added support for submenus and menu footers.