pep8 fixes + fix of ==/= mix-up.

Cleaned up the module a little for better conformity with pep8 style guide.
Also noticed two comparisons (like `if self._position < -1: self._position == -1`) that were probably meant to be assignments (`if self._position < -1: self._position = -1`).