Barcode scanning now only works when a modal is open. Fixes #3.