PEP8/flake8 fixes.
Refactor, document.