More pep8 fixes: spaces around comparison operators, use 'is' for comparisons to None, minor docstring typo fixes.