Barcode calculation consolidation, cleanup, refactoring.