Minor adjustments to sample code