Remove unnecessary components.