Fixing notebookmodel and related issues