Improved code readability + PEP8 fixes.