Batching

Closes #282
We can do this in a subsequent commit.