Added barcode scanning functionality.