Factored batch processing into its own class