Updated for new tables needed for batch processing.