Expose batch on the client too.

Seems messy to duplicate this code.