is there a benefit of unsetting the $tt variable at the end? First time I've seen it used in this context?
Probably not much, I guess I was feeling kind of "careful" when I wrote that. It's possible that other code executed after this could use $tt or $total and expect it to be unset to start with.