Better temp files, and, incorporate another script