Fix nested batches, add examples