Updated BarcodeScanner.java. Cleaned up code a litle bit, added some comments.