Changed the implementation of Transaction to involve "new", so I can easily pass state.
This might also be achieved using closures, I've just went this way.