Changing and cleaning code after code review and pep8, pylint