JS linting, use event listeners, complete `fixUp` escape function

jshint threw an error that `k` was [defined twice](https://github.com/kripken/Massive/pull/10/files#diff-92c6ca46b5e356045cc1a11aa109d0d4R422), so I thought I'd just move both `i` and `k` up.