Added more comments to demo code