Cleaned the code up, added more comments

Also improved the parser in parsing OCR output