Linted and replaced array.map polyfill with the proper version from MDN

Removed trailing commas, added semis where appropriate, and replaced the array.map polyfill with the "official" version from MDN -- apparently the version used here previously was not the proper and complete implementation.
I'd like it in a separate PR if that's not too much trouble.