Update index.js to not pollute global namespace.
* js/index.js: wrap with self executing anonymous function.