Removing redundant classes