Adds transaction mutex. Closes issue #2.