Added lowest common ancestor for trees.