Improved clarity of sample implementation.