Refactor internal VarSet representation to use python set.