Fixed TabError and PEP8 compliance issues.

Previously there were mixed tabs and spaces for indentation (or at least there were in the version on pypi). Switched to all spaces to fix TabError. Also fixed little PEP8 compliance things.