switch to python3 + fixes + cleanup