Various stylistic modifications as per pylint. Mainly adding docstrings and wrapping overly long lines.