Changed exclusive locks to a ReaderWriterLockSlim to work better with more threads.