Added new utility function "batchProcess" to us to break long running jobs into chunks to prevent the browser from appearing to hang.