Added global ReentrantLock jamLock and wrapped all blocks of code that perform unit modifications and rebroadcast the Jam state in lock/unlock calls.