Fixed resets
Better clearing of traces
Added pretty printing of traces