Moved from Rc/RefCell to Arc/RWLock for concurrent usage (untested)