Added some examples to docs and as tests.