Fixed transactions.
Added some tests.
Added some tests.