Add support for menus with up to three levels