Improved example code.