Another simpler approach for introducing transaction support

This is an alternative to #16

It doesn't have the option to have a transaction per script, and will not be extensible.

What does everyone think?