Reducing the number of types generated