Updated to use more threads.