First step to pypy compat
Fixed all syntax errors in pypy version