A little more concise than the first one.

Multithreading was pointless, removed it though still imported in case there's a need.