Refactored internal batch unit allocation