Trace cleanup