Fix PEP8, style and documentation