Use batch interfaces, use service account, and refactoring.
Merge pull request #3 from tmatsuo/batches

Use batch interfaces, use service account, and refactoring.