Minor improvements to example code.