Updating code to remove pylab and use newest ipython 2.2.0