Enhance: Support PY3 and fixing variable names