Fixed top-level transaction wrongly used in place of current transaction
Added missing documentation