Remove dead code, generally clean up the sample.