more cleanups to diagnostic tool