wip-442: Token aware writes

This is ugly, and I guess there is a better way, without having a global order on Batch, but scratch that, we don' have time to play with type magic now.