PEP8 and small refactorings and documentations