Added multi-threading.

Signed-off-by: Andrew Lawson <andrewlawson@Andrews-MacBook-Air-2.local>