Refactoried txs, added comments