Changed batch callback API so the callback is sent the whole batch in one go