Update the examples so that they all run.  This included a significant number of changes.  Reformatted source code using rubocop.  Added an EXAMPLES.md file to describe the examples.