Fixed crash due to MessageHandling. Fixed memory leaks. Made TesseractOCR module actually use Tesseract.