Refactor menu tree for easier emmbedidng