PEP08 compatible, and doctests adjusted to work with current version.

Some of the doctests failed and rather than alter the behaviour I altered the doctests to match, not sure this is what you'd want, but it now passes all tests as per:

```bash
$ nosetests --with-doctest
```