Stop using a ref for traces, I have no idea why I did that initially.  If we just use a separate atom for each test it's simpler.  We can scope the atom locally since it is no longer needed when the test is done.  The code is much simpler this way.