Move quote stripping outside forloop