Refactor model batch processing and update tests