Batching

Closes #282
Cheers.