Retains python2.7 compatibility for all files. Fixes only syntax errors, tests still fail on python3 for various reasons.