fixed for new session API
check for null reference before anything else
should add object dependents even if object is in plot context
store_document should return models updated
Should set dirty flag when updating PC
need to set dirty flag when updated plot