More cleanup of sample code.