Tidied up code examples.