removes unused generics