Fixed (most) PEP 8 coding style violations in preprocessing algorithms

I tried to be more prudent with whitespace changes now and did them all
manually.

TODO: Fix E501 errors.

As part of http://24pullrequests.com