Update trace.php

code cleanup on add_trace