Fix history getCommand reverse index
Implemented Batch client and refactor async client