Add batching of requests. Expanded unit testing