Added some functions to prepare for OCR parallelism