Refactor barcode scanning.