Purge dead code and deprecated types.

Exactly what it says on the tin.