Added multithreaded execution support.
Added support for retries on server failure.