Preparing code for Python 3.