convert tree to code list
single def for common menu items
don't do a merge from right to left

The idea is to keep consistent with the idea that 0 is to the left and 1 to the
right, the node where the merge starts becomes 0.
Maybe instead this should just reverse the sense of the merge if the order is
wrong?