Default to adding window close handlers to disconnect service and avoid errors during page unload
Extract unsubscribeInstanceGraphs helper method