Fixing the barcode scanner and some cleanup for jruby