Rendering submenus code example fixed for coherence