Adding code review comments and pep8 and pylint cleaning