A java script class for running simultaneous batches of asynchronous functions