Fix typo.
Update BatchTests.
Optimize imports and format code.