Bug fixing: pep8 and pylint corrections