Code cleanup in the examples