clean temp files; change some var name; add ThreadPool