Create helper to asynchronously iterate through multiple arrays at once. Replace most instances of Array.prototype.forEach with async equivalent.
Move things around in state factory function