remove __unicode__ and change some methods for python 3 compatible code