merge refset.py and reference_set.py