Examples fix

Working on cleaning up the examples, as per issue #171.