Refactoring update and deleted triggers