Remove redundant classes.