Fix ViewFactory initializer and caching issues