Streamlined multithreading, and added timing