Some fixes in python3, removed support for 2.6.

Maybe later i will test it for python 2.6