Transactions implemented.
Bug fixing in transactions and test implemented.