Use RWMutex to allow many readers and one writer. Fixes data races