Lastest Ipython version

Updated code to the latest IPython version.

Alexey