Move barcode generator to a separate class