Adding exit on close in swing for terminating correctly, removing
traces, and adding comments