Refactored ValueSet handling.