M-Muzafarov: Speed up and PEP8