Added doumentation and updated ipython notebook.