Refactored to use threadsafety gem, removed potential sources of thread contention
Refactored to use threadsafety gem, removed potential sources of thread contention
Fixed edge case bugs