Some refactoring to separate triggers and action triggers.