Adding transaction unit tests, cleaning up existing tests.
Merge remote-tracking branch 'upstream/master'