Allow custom root.
Correct ContourTree/FoldedContourTree types.