Code clean-up and parameter support

To allow for debug auto, and OCR image dumping