Make codebase python3 compatible.