Fixed most pylint warnings