Add docstrings and documentation. Correct pylint and pep8 errors.
Test it with python3