Full Python 3 support
fix for sorting mixed types
correct printing for py2