Added support for transactions (managed connections) and fixed all known bugs