cleanups, thread cleanups
threadpool optimized