Capture errors from transaction funs and pass them back.
Added delete function.

Style changes.
Renamed transaction/1 to trans/1.