Tidied up 'example' code