cleaned up more mutexes into rwlocks