Refactored debugging statements into more useable macro.
Needs testing on an OCR system.