fixed pep8 errors, removed debug code, added -csv flag
merge matt, add exception catch for linearX