remove redundant and unnecessary classes