Added some Transaction management.