Added transaction handling.