PEP-8, Python Zen, refactor and reduce code (part 8 in master module/lib)