FIX pep8, pylint and some code cleaning