fix union and intersect functions, rename contains to elem
Environment module cleanup