removes unused types