Typeinterest factory optimization (dramatic speedup)

Still in progress/testing