remove traces and convert spaces back to tabs