Trigger refactor and test improvement. Closes punkave/ummon#2
Merge branch 'trigger-refactor'

* trigger-refactor:
  Trigger refactor and test improvement. Closes punkave/ummon#2