Implemented barcode scanning.