fix PEP8 and pylint errors