Updated scripts for Python 3.