Clean up the JavaScript example.
Cleanups based on Peter's comments.
Delete minor comments from example.
Merge pull request #20 from mvano/JavaScriptExample

Clean up the JavaScript example