Cut unneded strings off.