Added RAII type mutex locks to code
Added RAII type mutex locks to code