Add clarity for noobs looking at index.js

No functional changes here. Just renaming and re-organizing of index.js. Hopefully this will decrease issue creation here on GitHub or on StackExchange due to mislabeling or misunderstanding of the sample JS. :gift_heart: