Slight optimization for OCR

Also tested string processing