More improvements to the sample example