Various fixes to suggestions by @mikehearn and @instagibbs
Merge pull request #21 from harding/tx-fixes

Various fixes to suggestions by @mikehearn and @instagibbs