Removed old lines.
Many Py3 fixes and some other tweaks.