py2 - cleanup python 2 code a bit DOES NOT WORK WITH OLD PYTHON VERSIONS ANYMORE
py3 - update to match latest py2 updates