Removing extraneous traces