Cleanup the whole darn __clean_tmp() function
Merge pull request #6192 from cvrebert/patch-1

Cleanup the whole darn __clean_tmp() function