Fixed some bugs and cleaned up the notebook a bit.