Make it easier to use atomic batches

Fixes #56.