Remove unnecessary attributes.