Applying all jive materializer changes up to b86287f8a0b16e273282c67d64f10ef66321d2bc. Collectors out - count type refs in, along with some optimizations