remove injected defs; add defs to index