More work on examples and some other associated refactorings.