TxEngine: complete rework to solve concurrency issues