modularize the barcode lookup a bit, add lookup to registration program