Tidy up the example

Add a bit of documentation to the example and fix tabs so the formatting
looks consistent across platforms/editors.