Started py2 compatibility changes