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