added event based stuff to comparetoRef and added barcode error checking for extractor