Allow to change triggering setting on the go
Move trigger configuration code to separate functions
Apply triggering settings only if changed