cleanup the notebook_for_queries class