Pep8 fixes and fix traling spaces

I just updated it to the dev branch. 

Removed trailing spaces. I also fixed some pep8 issues. Basically the ones where there is only one blank line and 2 are required, and one from overidented continuation line.