Now supports transactions through three functions, beginTransaction, commit, and rollback