Use batch interfaces, use service account, and refactoring.

add newline?