Between analysis, it is important to start with a clean state of ImageJ. If closing all the images at once is easy using close all command under the file menu, closing the non image windows can take a long time. The Roi manager need to be emptied as well. To do so, I use this macro that runs independantly. It will close every logs and tables but the macro window.