Add asserts

+ use HashTable for CobaltImageCache: add thread safety.