removed set and dict comprehensions for python 2.6 compatibility; removed u string prefixes for python 3 compatibility