clean up some parts of the tracer; add partial documentation