Fixed some PEP8 stuff, and a security hole.

Fixed some PEP8 stuff, and a security hole.