Improve comments to make sample more generally useful.