Did some work towards grab using transactions.

* I implemented the Lua scripts using transactions nad they
  look arlgith but they're untested at this point. Committing now
  because I'm not doing anything more today.