Properly organize items into submenus