Fix tab -> space

While I'm here do some PEP8 cleanup.