Various cleanups

Docstrings, method signatures, whitespace ...