Use some JS best practices

* Provide a `radix` parameter to `parseInt`.
* Fix a global leak.
* Fix a var declaration.
* Remove unneeded semicolons.
Silverfix I miss the point, please check it.