Refactor in order to comply with PEP 8 conventions

Wrap long lines and improve documentation.