Implemented partial multithreading support.