Removed ConcurrentDictionary in favour of our own ThreadSafeDictionary.