Improved documentation, some PEP 8 formatting