Canonicalize collections in builder pattern (not finished yet)

for testing
because when I added the ```baseTerms``` a while ago, I consider it as containing all variables of sort Bag, that is, including the frame