`process_batch` added in #1215 needs cleaning up.
process_batchadded in #1215 needs cleaning up.