Refactor code out of the actual methods, just keep zval stuffz there
Move Batch API functions into api/batch.{c,h}
Rename methods for API consistency