Updated Examples

1. Updated the examples so that they all run and work as expected.
2. Reformatted the source code using rubocop
3. Added an EXAMPLES.md file to describe the examples in detail