Tidy up sample code.