Remove unneeded import and updated for Python 3.