Start of the trigger rewrite.
Work in progress - converting clauses to use the new generator system.