Removed unused imports and cleaned up BarcodeGenerator.
Added functions to the view and view adaptor.