More work on batch.py