Remove useless mutex and debug messages.