Use some JS best practices

* Provide a `radix` parameter to `parseInt`.
* Fix a global leak.
* Fix a var declaration.
* Remove unneeded semicolons.