Removed unrelated code from sample.