Transaction API fixes and an end-to-end-ish test