latest - samer's updates plus fixing tests, but still need to cap size of caches