Remove unneeded classes.