Code examples cleaned up for examples 1 and 3.