Enable multithreading.
Clean up the code.