Added support for transactions and exists function.