Cleanup and preparation Multithreading