added some improvements, bugfixes, and a couple of TODOs to the notebook.