Remove the .t files
Refactor the code to simplify the root-user checks and remove redundant cleanup logic