Fix and format example code.