Code cleanup (part 2)

This time clean up examples.