Remove unnecessary classes.