cleaning up and updating the ipython notebook