Reworking the examples to use require.js
Adding some comments to the main.js file in examples