Update web sample to make it more understandable

Update web sample to make it more understandable - see #44