Refactor trigger builder