Moved transaction and manipulation to dm.Surface.

As a pattern, you should now do something like

var tx = surface.startTransaction()
tx.insert(['b', 'l', 'a']);
tx.save();