Add initial threaded implementation