Updated usage of dict.items() to dict.iteritems()