Tidy sample code.

I couldn't build, so please verify.