iteritems to items & urlencode fixes