Factored out from UnfoldingUtils. Initial commit.