merge tesseract cleanups