Add triggered events
Code clean-up