Fix indentation and simplify processing logic in example (fixes issue98, issue99).