Updated print statements.
Updated clear_index to work with Py3.