Refactor in order to comply with PEP8 conventions

Wrap long lines and improve documentation.