Added Long Transactions.
Still need to test them out with some End to End tests and remove some redundant code between the transaction types.
In order to support long transactions I've introduced the concept of a flush or partialCommit.