Refactoring of the examples.

This is to prevent codeclimate from skewing the score.