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

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