[FIX] flake, pep and pylint improvements.