Added the transaction manager code written on Oren's sofa the other day