Started refactoring of examples.