Convert some more eachControl loops to for loops.
Convert some uses of $map() to for loops or list comprehensions.
Coding style: spaces within square brackets.