Index: /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/EngineSound.java
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/EngineSound.java	(revision 33341)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/EngineSound.java	(revision 33342)
@@ -1,8 +1,4 @@
 /*
  * GPLv2 or 3, Copyright (c) 2010  Andrzej Zaborowski
- *
- * This class simulates a car engine.  What does a car engine do?  It
- * makes a pc-speaker-like buzz.  The PC Speaker could only emit
- * a (nearly) square wave and we simulate it here for maximum realism.
  */
 package wmsturbochallenge;
@@ -16,6 +12,11 @@
 import javax.sound.sampled.SourceDataLine;
 
+/**
+ * This class simulates a car engine.  What does a car engine do?  It
+ * makes a pc-speaker-like buzz.  The PC Speaker could only emit
+ * a (nearly) square wave and we simulate it here for maximum realism.
+ */
 class EngineSound {
-    public EngineSound() {
+    EngineSound() {
         rpm = 0.0;
     }
@@ -79,9 +80,9 @@
         if (accel > 0.0 && rpm > 1.0 + n * 0.2 && speed > 0.0) {
             rpm = 0.3 + n * 0.2;
-            n ++;
+            n++;
         } else if (accel < 0.0 && rpm < 0.3) {
             if (n > 0) {
                 rpm = 0.7 + n * 0.1;
-                n --;
+                n--;
             } else
                 rpm = 0.2;
@@ -133,14 +134,14 @@
             bufferlen *= 2;
             byte[] buffer = new byte[bufferlen];
-            for (int b = 0; b < bufferlen; ) {
+            for (int b = 0; b < bufferlen;) {
                 int j;
-                for (j = wavelen / 2; j > 0; j --) {
-                    buffer[b ++] = (byte) (value >> 8);
-                    buffer[b ++] = (byte) (value & 0xff);
+                for (j = wavelen / 2; j > 0; j--) {
+                    buffer[b++] = (byte) (value >> 8);
+                    buffer[b++] = (byte) (value & 0xff);
                 }
                 value = 0x10000 - value;
-                for (j = wavelen - wavelen / 2; j > 0; j --) {
-                    buffer[b ++] = (byte) (value >> 8);
-                    buffer[b ++] = (byte) (value & 0xff);
+                for (j = wavelen - wavelen / 2; j > 0; j--) {
+                    buffer[b++] = (byte) (value >> 8);
+                    buffer[b++] = (byte) (value & 0xff);
                 }
                 value = 0x10000 - value;
Index: /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java	(revision 33341)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java	(revision 33342)
@@ -1,5 +1,17 @@
 /*
  * GPLv2 or 3, Copyright (c) 2010  Andrzej Zaborowski
- *
+ */
+package wmsturbochallenge;
+
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Point;
+import java.awt.image.BufferedImage;
+
+import org.openstreetmap.josm.data.ProjectionBounds;
+import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.gui.MapView;
+
+/**
  * Implements a fake MapView that we can pass to WMSLayer's .paint,
  * this will give us two things:
@@ -14,15 +26,4 @@
  *    this happened and could only guess.
  */
-package wmsturbochallenge;
-
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Point;
-import java.awt.image.BufferedImage;
-
-import org.openstreetmap.josm.data.ProjectionBounds;
-import org.openstreetmap.josm.data.coor.EastNorth;
-import org.openstreetmap.josm.gui.MapView;
-
 class FakeMapView extends MapView {
     public ProjectionBounds view_bounds;
@@ -36,6 +37,7 @@
     public double max_east_west;
 
-    public FakeMapView(MapView parent, double scale) {
-        super(null, null, null); //TODO MapView constructor contains registering listeners and other code, that probably shouldn't be called in fake map view
+    FakeMapView(MapView parent, double scale) {
+        // TODO: MapView constructor contains registering listeners and other code, that probably shouldn't be called in fake map view
+        super(null, null, null);
         this.parent = parent;
         this.scale = scale;
Index: /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 33341)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 33342)
@@ -1,6 +1,4 @@
 /*
  * GPLv2 or 3, Copyright (c) 2010  Andrzej Zaborowski
- *
- * This implements the game logic.
  */
 package wmsturbochallenge;
@@ -38,4 +36,7 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 
+/**
+ * This implements the game logic.
+ */
 public class GameWindow extends JFrame implements ActionListener {
     public GameWindow(Layer ground) {
@@ -48,6 +49,7 @@
 
         while (s.getScreenSize().width < width * scale ||
-                s.getScreenSize().height < height * scale)
-            scale --;
+                s.getScreenSize().height < height * scale) {
+            scale--;
+        }
         add(panel);
 
@@ -79,6 +81,7 @@
         car_engine.start();
 
-        for (int i = 0; i < maxsprites; i ++)
+        for (int i = 0; i < maxsprites; i++) {
             sprites[i] = new sprite_pos();
+        }
 
         generate_sky();
@@ -120,6 +123,7 @@
         public void save_trace() {
             int len = 0;
-            for (Collection<WayPoint> seg : trackSegs)
+            for (Collection<WayPoint> seg : trackSegs) {
                 len += seg.size();
+            }
 
             /* Don't save traces shorter than 5s */
@@ -343,4 +347,5 @@
     int frame;
     boolean downloading = false;
+
     protected void screen_repaint() {
         /* Draw background first */
@@ -351,8 +356,9 @@
 
         /* Messages */
-        frame ++;
-        if ((frame & 8) == 0 && downloading)
+        frame++;
+        if ((frame & 8) == 0 && downloading) {
             screen.drawImage(loading.getImage(), centre -
                     loading.getIconWidth() / 2, 50, this);
+        }
 
         /* Sprites */
@@ -408,5 +414,5 @@
         ground.paint(ground_view.graphics, ground_view, null);
 
-        for (int y = (int) (height * horizon + 0.1); y < height; y ++) {
+        for (int y = (int) (height * horizon + 0.1); y < height; y++) {
             /* Assume a 60 deg vertical Field of View when
              * calculating the distance at given pixel.  */
@@ -415,5 +421,5 @@
             double lon_off = lon + (dist - cardist) * sin;
 
-            for (int x = 0; x < width; x ++) {
+            for (int x = 0; x < width; x++) {
                 double p_x = dist * (x - centre) / height;
 
@@ -439,5 +445,5 @@
 
         int n = (int) (Math.random() * sw * 0.03);
-        for (int i = 0; i < n; i ++) {
+        for (int i = 0; i < n; i++) {
             int t = (int) (Math.random() * 5.0);
             int x = (int) (Math.random() *
@@ -490,12 +496,12 @@
     }
 
-    /* sizes decides how many zoom levels the sprites have.  We
+    /** sizes decides how many zoom levels the sprites have.  We
      * could do just normal scalling according to distance but
      * that's not what old games did, they had prescaled sprites
      * for the different distances and you could see the feature
      * grow discretely as you approached it.  */
-    protected final static int sizes = 8;
-
-    protected final static int maxsprites = 32;
+    protected static final int sizes = 8;
+
+    protected static final int maxsprites = 32;
     protected sprite_pos sprites[] = new sprite_pos[maxsprites];
 
@@ -537,5 +543,5 @@
             int sy = cactus[type].getIconHeight();
 
-            sprite_pos pos = sprites[i ++];
+            sprite_pos pos = sprites[i++];
             pos.dist = dist;
             pos.sprite = cactus[type].getImage();
@@ -548,5 +554,5 @@
         Arrays.sort(sprites, 0, i);
         for (sprite_pos sprite : sprites)
-            if (i --> 0)
+            if (i-- > 0)
                 screen.drawImage(sprite.sprite,
                         sprite.x, sprite.y,
@@ -556,5 +562,5 @@
 
         if (splashframe >= 0) {
-            splashframe ++;
+            splashframe++;
             if (splashframe >= 8)
                 splashframe = -1;
@@ -566,5 +572,5 @@
             Image image = cactus[type].getImage();
 
-            for (i = 0; i < 50; i ++) {
+            for (i = 0; i < 50; i++) {
                 int x = (int) (Math.random() * sx);
                 int y = (int) (Math.random() * sy);
@@ -584,4 +590,5 @@
 
     public boolean no_super_repaint = false;
+
     protected class GamePanel extends JPanel {
         public GamePanel() {
@@ -607,4 +614,5 @@
         }
     }
+
     JPanel panel = new GamePanel();
 
@@ -631,4 +639,5 @@
      */
     protected Timer timer;
+
     @Override
     public void actionPerformed(ActionEvent e) {
@@ -681,5 +690,5 @@
             /* Switch vehicle */
             if (key == KeyEvent.VK_V)
-                if (current_car ++>= 1)
+                if (current_car++ >= 1)
                     current_car = 0;
         }
@@ -702,4 +711,5 @@
         }
     }
+
     protected FakeMapView ground_view;
 }
Index: /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java	(revision 33341)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java	(revision 33342)
@@ -1,6 +1,4 @@
 /*
  * GPLv2 or 3, Copyright (c) 2010  Andrzej Zaborowski
- *
- * This is the main class for the game plugin.
  */
 package wmsturbochallenge;
@@ -26,4 +24,7 @@
 import org.openstreetmap.josm.plugins.PluginInformation;
 
+/**
+ * This is the main class for the game plugin.
+ */
 public class WMSRacer extends Plugin implements LayerChangeListener, ActiveLayerChangeListener {
     public WMSRacer(PluginInformation info) {
@@ -86,5 +87,5 @@
              * horizontal scanlines (lines equidistant from
              * camera eye)) */
-            for (Layer l : frame.mapView.getLayerManager().getLayers())
+            for (Layer l : frame.mapView.getLayerManager().getLayers()) {
                 if (l.isBackgroundLayer()) {
                     groundLayer = l;
@@ -92,4 +93,5 @@
                     return;
                 }
+            }
 
             groundLayer = null;
