Just to note (unrelated to this PR). We might be better off to split the menu from here, and make it a class to use and extend. It can offer at least the basic functionality of adding/removing/reordering the items.