Made some updates to the sample code.