Prune defunct classes