Improved speed, fixed batch truncation(due to absence of batch.clear()), set API timeout to 30