Added Pail master data structure plumbing for batches