Added changelog entry.
An example to the docs.
Tidy code a little bit.