Tidied up transaction wrapper code according to coding conventions
Added a test that ensures a connection returned from a transaction is reliable