Minor pep8 changes. Most salient is that membership test...

 should be 'x not in y' whereas 'not x in y' was being used.