Added code comments and made improvements in the demo page.