Align CF stub
Add context manager support to batch