server code (pre-processing and tesseract)

much better results than before