Use batch interfaces, use service account, and refactoring.

Done