* Simplify some code dict.iteritems to dict.keys where applicable