Removal of some impurities from carbon nanotubes