Replace for loops with .forEach(f)
Replace for loops with .forEach(f)

There were some weird problems because of some of these asynchronous
calls interacting with the for loops and which variables they could
access.  Changing them to .forEach() containing a function call is an
elegant way to change scope and keep those variables separate from each
other.  This solves a whole bunch of problems.

* Github issues *
Fixes #1
Fixes #2

sinisterstuf/REcardo