Found some horrible errors; added more transaction wrappers