Removing phantom classes