resolve jshint warnings
dont create functions within loops, we can avoid for loops altogether
Remove some redundant semicolons from single-expression map calls.