use transaction(), remove obsolete commit()
Merge pull request #590 from gharlan/use-transaction-helper

use transaction(), remove obsolete commit()