Remove unnecessary code from sample code.