Added demonstration ipython notebook and some bug fixes/minor features.