Made pep8 compliant and corrected pylint problems.