Remove locking code, begin work of multi-threaded API/layer.