cleanup and making string search private