Simplify generated code by grouping event criteria into a hash and eliminating nulls.
Pass value set oid rather than value sets to getEvents when available.