Initial multithreaded implementation

For your perusal.