Fix pep8 errors

Fixed all but 1 pep8 errors. Most were due to use of tabs instead of spaces.