Transactions: use output instead of pipelet to emit events, update tests