More cleaning up of example code