I've reformatted this file with `esformatter`, then fixed some jshint warnings like missing semicolons, though the misplaced semicolon.