some cleanups
batches implemented