Start fixing barcode tests (and implement new contract)