Refactoring the main routine and other pep8 and pylint cleaning