Split add triggers code to clean triggers