Changed .has_key to in, PEP-8, and more typos.