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.
OK, can do.