Added some comments to the demo program