Replaced all str() conversions with unicode()