final cleanup of discovery