Batch dependency update and fixes

Updates the JBeret and batch API dependencies. Implements new changes for better thread context handling.