Yes, let's try to move this function and the call to `async.mapSeries` to a separate module.