Fix tests, make batching interval optional