Add refBundles, need fix subdoc/ref generator bug