Replaced mutexes, etc