fixed some bugs, updated viewer; updated notebook extensively