moved EmptyLeaf condition to makeTree