few Python3 fixes

Another PR to fix some issues with python3 including dictionaries and urllib2