Added VERY experimental multithreading support