Remove unnecessary types.