Remove unrelated classes