Copied in changes from planet-techart for multithreading and style updates. I messed up pulling select changes from another fork...