Initial pass at transaction support.

Now to test it!