Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java	(revision 31386)
@@ -20,20 +20,25 @@
 public abstract class MapillaryAbstractImage {
 
+  /**
+   * Lock that locks next() and previous() methods. Used when downloading images
+   * to prevent concurrency problems.
+   */
   public static Lock lock = new ReentrantLock();
 
-  /** The time the image was captured, in Epoch format */
+  /** The time the image was captured, in Epoch format. */
   private long capturedAt;
-  /** Sequence of pictures containing this object */
+  /** Sequence of pictures containing this object. */
   private MapillarySequence sequence;
-  /** Position of the picture */
+  /** Position of the picture. */
   public final LatLon latLon;
-  /** Direction of the picture */
+  /** Direction of the picture. */
   public final double ca;
+  /** If the image has been modified from its initial values. */
   public boolean isModified = false;
-  /** Temporal position of the picture until it is uploaded */
+  /** Temporal position of the picture until it is uploaded. */
   public LatLon tempLatLon;
   /**
    * When the object is being dragged in the map, the temporal position is
-   * stored here
+   * stored here.
    */
   public LatLon movingLatLon;
@@ -47,4 +52,14 @@
   private boolean visible;
 
+  /**
+   * Main constructor of the class.
+   *
+   * @param lat
+   *          The latitude where the picture was taken.
+   * @param lon
+   *          The longitude where the picture was taken.
+   * @param ca
+   *          The direction of the picture (0 means north).
+   */
   public MapillaryAbstractImage(double lat, double lon, double ca) {
     this.latLon = new LatLon(lat, lon);
@@ -85,4 +100,10 @@
   }
 
+  /**
+   * Set's whether the image should be visible on the map or not.
+   *
+   * @param visible
+   *          true if the image is set to be visible; false otherwise.
+   */
   public void setVisible(boolean visible) {
     this.visible = visible;
@@ -107,5 +128,6 @@
    */
   public void move(double x, double y) {
-    this.movingLatLon = new LatLon(this.tempLatLon.getY() + y, this.tempLatLon.getX() + x);
+    this.movingLatLon = new LatLon(this.tempLatLon.getY() + y,
+        this.tempLatLon.getX() + x);
     this.isModified = true;
   }
@@ -169,8 +191,18 @@
   }
 
+  /**
+   * Sets the Epoch time when the picture was captured.
+   *
+   * @param capturedAt
+   */
   public void setCapturedAt(long capturedAt) {
     this.capturedAt = capturedAt;
   }
 
+  /**
+   * Returns the Epoch time when the image was captured.
+   *
+   * @return The long containing the Epoch time when the image was captured.
+   */
   public long getCapturedAt() {
     return capturedAt;
@@ -181,5 +213,6 @@
    *
    * @param format
-   * @return
+   * @return A String containing the date the picture was taken using the given
+   *         format.
    */
   public String getDate(String format) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java	(revision 31386)
@@ -20,5 +20,8 @@
  */
 public class MapillaryData implements ICachedLoaderListener {
+
+  /** Unique instance of the class */
   public volatile static MapillaryData INSTANCE;
+  /** Enable this if you are using in Unit Tests */
   public static boolean TEST_MODE = false;
 
@@ -31,5 +34,8 @@
   private List<MapillaryDataListener> listeners = new ArrayList<>();
 
-  public MapillaryData() {
+  /**
+   * Main constructor.
+   */
+  private MapillaryData() {
     images = new CopyOnWriteArrayList<>();
     multiSelectedImages = new ArrayList<>();
@@ -37,4 +43,9 @@
   }
 
+  /**
+   * Returns the unique instance of the class.
+   *
+   * @return The unique instance of the class.
+   */
   public static MapillaryData getInstance() {
     if (INSTANCE == null) {
@@ -48,5 +59,5 @@
    *
    * @param images
-   *          The set of images to be added.
+   *        The set of images to be added.
    */
   public synchronized void add(List<MapillaryAbstractImage> images) {
@@ -60,5 +71,5 @@
    *
    * @param image
-   *          The image to be added.
+   *        The image to be added.
    */
   public synchronized void add(MapillaryAbstractImage image) {
@@ -70,8 +81,18 @@
   }
 
+  /**
+   * Adds a new listener.
+   *
+   * @param lis Listener to be added.
+   */
   public void addListener(MapillaryDataListener lis) {
     listeners.add(lis);
   }
 
+  /**
+   * Removes a listener.
+   *
+   * @param lis Listener to be removed.
+   */
   public void removeListener(MapillaryDataListener lis) {
     listeners.remove(lis);
@@ -83,5 +104,5 @@
    *
    * @param images
-   *          The set of images to be added.
+   *        The set of images to be added.
    */
   public synchronized void addWithoutUpdate(List<MapillaryAbstractImage> images) {
@@ -95,5 +116,5 @@
    *
    * @param image
-   *          The image under the cursor.
+   *        The image under the cursor.
    */
   public void setHighlightedImage(MapillaryAbstractImage image) {
@@ -115,5 +136,5 @@
    *
    * @param image
-   *          The image to be added.
+   *        The image to be added.
    */
   public synchronized void addWithoutUpdate(MapillaryAbstractImage image) {
@@ -198,10 +219,8 @@
 
   /**
-   * Selects a new image and then starts a new
-   * {@link MapillaryImageDownloadThread} thread in order to download its
-   * surrounding thumbnails. If the user does ctrl+click, this isn't triggered.
-   *
-   * @param image
-   *          The MapillaryImage which is going to be selected
+   * Selects a new image.If the user does ctrl+click, this isn't triggered.
+   *
+   * @param image
+   *        The MapillaryImage which is going to be selected
    */
   public void setSelectedImage(MapillaryAbstractImage image) {
@@ -210,13 +229,11 @@
 
   /**
-   * Selects a new image and then starts a new
-   * {@link MapillaryImageDownloadThread} thread in order to download its
-   * surrounding thumbnails. If the user does ctrl+click, this isn't triggered.
+   * Selects a new image.If the user does ctrl+click, this isn't triggered.
    * You can choose whether to center the view on the new image or not.
    *
    * @param image
-   *          The {@link MapillaryImage} which is going to be selected.
+   *        The {@link MapillaryImage} which is going to be selected.
    * @param zoom
-   *          True if the view must be centered on the image; false otherwise.
+   *        True if the view must be centered on the image; false otherwise.
    */
   public void setSelectedImage(MapillaryAbstractImage image, boolean zoom) {
@@ -264,5 +281,5 @@
    *
    * @param image
-   *          The MapillaryImage object to be added.
+   *        The MapillaryImage object to be added.
    */
   public void addMultiSelectedImage(MapillaryAbstractImage image) {
@@ -281,5 +298,5 @@
    *
    * @param images
-   *          A List object containing the set of images to be added.
+   *        A List object containing the set of images to be added.
    */
   public void addMultiSelectedImage(List<MapillaryAbstractImage> images) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryDataListener.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryDataListener.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryDataListener.java	(revision 31386)
@@ -1,4 +1,10 @@
 package org.openstreetmap.josm.plugins.mapillary;
 
+/**
+ * Interface for listeners of the class {@link MapillaryData}.
+ *
+ * @author nokutu
+ *
+ */
 public interface MapillaryDataListener {
 
@@ -11,4 +17,7 @@
    * Fired when the selected image is changed by something different from
    * manually clicking on the icon.
+   *
+   * @param oldImage Old selected {@link MapillaryAbstractImage}
+   * @param newImage New selected {@link MapillaryAbstractImage}
    */
   public void selectedImageChanged(MapillaryAbstractImage oldImage,
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java	(revision 31386)
@@ -21,8 +21,18 @@
   private String location;
 
+  /**
+   * Returns the localtion where the image was taken.
+   *
+   * @return A String containing the location where the picture was taken.
+   */
   public String getLocation() {
     return location;
   }
 
+  /**
+   * Sets the location of the image.
+   *
+   * @param location
+   */
   public void setLocation(String location) {
     this.location = location;
@@ -85,4 +95,9 @@
   }
 
+  /**
+   * Returns the username of the person who took the picture.
+   *
+   * @return A String containing the username of the person who took the picture.
+   */
   public String getUser() {
     return user;
@@ -91,5 +106,6 @@
   @Override
   public String toString() {
-    return "Image[key=" + this.key + ";lat=" + this.latLon.lat() + ";lon=" + this.latLon.lon() + ";ca=" + this.ca + "]";
+    return "Image[key=" + this.key + ";lat=" + this.latLon.lat() + ";lon="
+        + this.latLon.lon() + ";ca=" + this.ca + "]";
   }
 
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImportedImage.java	(revision 31386)
@@ -9,16 +9,48 @@
 import javax.imageio.ImageIO;
 
+/**
+ * A MapillaryImoprtedImage object represents a picture imported locally.
+ *
+ * @author nokutu
+ *
+ */
 public class MapillaryImportedImage extends MapillaryAbstractImage {
 
-  /**
-   * The picture file.
-   */
+  /** The picture file. */
   protected File file;
+  /** The date when the picture was taken. */
   public final long datetimeOriginal;
 
+  /**
+   * Creates a new MapillaryImportedImage object using as date the current date,
+   * because it is missing in the file.
+   *
+   * @param lat
+   *          Latitude where the picture was taken.
+   * @param lon
+   *          Longitude where the picture was taken.
+   * @param ca
+   *          Direction of the picture (0 means north).
+   * @param file
+   *          The file containing the picture.
+   */
   public MapillaryImportedImage(double lat, double lon, double ca, File file) {
     this(lat, lon, ca, file, currentDate());
   }
 
+  /**
+   * Main constructor of the class.
+   *
+   * @param lat
+   *          Latitude where the picture was taken.
+   * @param lon
+   *          Longitude where the picture was taken.
+   * @param ca
+   *          Direction of the picture (0 means north),
+   * @param file
+   *          The file containing the picture.
+   * @param datetimeOriginal
+   *          The date the picture was taken.
+   */
   public MapillaryImportedImage(double lat, double lon, double ca, File file,
       String datetimeOriginal) {
@@ -42,5 +74,5 @@
   /**
    * Returns the File object where the picture is located.
-   * 
+   *
    * @return The File object where the picture is located.
    */
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31386)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.marktr;
 
-import org.apache.commons.jcs.access.CacheAccess;
 import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryDownloadViewAction;
 import org.openstreetmap.josm.plugins.mapillary.cache.MapillaryCache;
@@ -21,6 +20,4 @@
 import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
-import org.openstreetmap.josm.data.cache.JCSCacheManager;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
@@ -50,5 +47,4 @@
 import java.awt.image.AffineTransformOp;
 import java.awt.image.BufferedImage;
-import java.io.IOException;
 
 import javax.swing.ImageIcon;
@@ -60,25 +56,40 @@
 import java.util.ArrayList;
 
-public class MapillaryLayer extends AbstractModifiableLayer implements DataSetListener, EditLayerChangeListener,
-    LayerChangeListener {
-
-  public final static int SEQUENCE_MAX_JUMP_DISTANCE = Main.pref
-      .getInteger("mapillary.sequence-max-jump-distance", 100);
+/**
+ * This class represents the layer shown in JOSM. There can only exist one
+ * instance of this object.
+ *
+ * @author nokutu
+ *
+ */
+public class MapillaryLayer extends AbstractModifiableLayer implements
+    DataSetListener, EditLayerChangeListener, LayerChangeListener {
+
+  /** Maximum distance for the red/blue lines. */
+  public final static int SEQUENCE_MAX_JUMP_DISTANCE = Main.pref.getInteger(
+      "mapillary.sequence-max-jump-distance", 100);
 
   private boolean TEMP_MANUAL = false;
 
+  /** Unique instance of the class */
   public static MapillaryLayer INSTANCE;
-  public static CacheAccess<String, BufferedImageCacheEntry> CACHE;
+  /** The image pointed by the blue line */
   public static MapillaryImage BLUE;
+  /** The image pointed by the red line */
   public static MapillaryImage RED;
 
-  private final MapillaryData data = MapillaryData.getInstance();
-
+  /** {@link MapillaryData} object that stores the database */
+  public final MapillaryData data = MapillaryData.getInstance();
+
+  /** The bounds of the areas for which the pictures have been downloaded */
   public ArrayList<Bounds> bounds;
 
+  /** Mode of the layer */
   public AbstractMode mode;
 
-  private int highlightPointRadius = Main.pref.getInteger("mappaint.highlight.radius", 7);
-  private int highlightStep = Main.pref.getInteger("mappaint.highlight.step", 4);
+  private int highlightPointRadius = Main.pref.getInteger(
+      "mappaint.highlight.radius", 7);
+  private int highlightStep = Main.pref
+      .getInteger("mappaint.highlight.step", 4);
 
   private volatile TexturePaint hatched;
@@ -95,9 +106,4 @@
   private void init() {
     mode = new SelectMode();
-    try {
-      CACHE = JCSCacheManager.getCache("Mapillary");
-    } catch (IOException e) {
-      Main.error(e);
-    }
     if (Main.map != null && Main.map.mapView != null) {
       Main.map.mapView.addMouseListener(mode);
@@ -120,4 +126,10 @@
   }
 
+  /**
+   * Changes the mode the the given one.
+   *
+   * @param mode
+   *          The mode that is going to be activated.
+   */
   public void setMode(AbstractMode mode) {
     Main.map.mapView.removeMouseListener(this.mode);
@@ -130,4 +142,9 @@
   }
 
+  /**
+   * Returns the unique instance of this class.
+   *
+   * @return The unique isntance of this class.
+   */
   public synchronized static MapillaryLayer getInstance() {
     if (MapillaryLayer.INSTANCE == null)
@@ -144,5 +161,6 @@
     if (Main.pref.getBoolean("mapillary.download-manually") || TEMP_MANUAL)
       return;
-    for (Bounds bounds : Main.map.mapView.getEditLayer().data.getDataSourceBounds()) {
+    for (Bounds bounds : Main.map.mapView.getEditLayer().data
+        .getDataSourceBounds()) {
       if (!this.bounds.contains(bounds)) {
         this.bounds.add(bounds);
@@ -160,5 +178,6 @@
   private void checkAreaTooBig() {
     double area = 0;
-    for (Bounds bounds : Main.map.mapView.getEditLayer().data.getDataSourceBounds()) {
+    for (Bounds bounds : Main.map.mapView.getEditLayer().data
+        .getDataSourceBounds()) {
       area += bounds.getArea();
     }
@@ -174,7 +193,8 @@
 
   /**
-   * Returns the MapillaryData object, which acts as the database of the Layer.
-   *
-   * @return
+   * Returns the {@link MapillaryData} object, which acts as the database of the
+   * Layer.
+   *
+   * @return The {@link MapillaryData} object that stores the database.
    */
   public MapillaryData getMapillaryData() {
@@ -292,6 +312,6 @@
         Point p1 = mv.getPoint(bounds.getMin());
         Point p2 = mv.getPoint(bounds.getMax());
-        Rectangle r = new Rectangle(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y), Math.abs(p2.x - p1.x), Math.abs(p2.y
-            - p1.y));
+        Rectangle r = new Rectangle(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y),
+            Math.abs(p2.x - p1.x), Math.abs(p2.y - p1.y));
         a.subtract(new Area(r));
       }
@@ -314,6 +334,6 @@
         MapillaryLayer.BLUE = closestImages[0];
         g.setColor(Color.BLUE);
-        g.drawLine(mv.getPoint(closestImages[0].getLatLon()).x, mv.getPoint(closestImages[0].getLatLon()).y,
-            selected.x, selected.y);
+        g.drawLine(mv.getPoint(closestImages[0].getLatLon()).x,
+            mv.getPoint(closestImages[0].getLatLon()).y, selected.x, selected.y);
         MapillaryMainDialog.getInstance().blueButton.setEnabled(true);
       }
@@ -321,6 +341,6 @@
         MapillaryLayer.RED = closestImages[1];
         g.setColor(Color.RED);
-        g.drawLine(mv.getPoint(closestImages[1].getLatLon()).x, mv.getPoint(closestImages[1].getLatLon()).y,
-            selected.x, selected.y);
+        g.drawLine(mv.getPoint(closestImages[1].getLatLon()).x,
+            mv.getPoint(closestImages[1].getLatLon()).y, selected.x, selected.y);
         MapillaryMainDialog.getInstance().redButton.setEnabled(true);
       }
@@ -356,6 +376,7 @@
         draw(g, image, icon, p);
         if (!image.getSigns().isEmpty()) {
-          g.drawImage(MapillaryPlugin.MAP_SIGN.getImage(), p.x + icon.getIconWidth() / 2, p.y - icon.getIconHeight()
-              / 2, Main.map.mapView);
+          g.drawImage(MapillaryPlugin.MAP_SIGN.getImage(),
+              p.x + icon.getIconWidth() / 2, p.y - icon.getIconHeight() / 2,
+              Main.map.mapView);
         }
       } else if (imageAbs instanceof MapillaryImportedImage) {
@@ -384,6 +405,6 @@
     Color oldColor = g.getColor();
     Color highlightColor = PaintColors.HIGHLIGHT.get();
-    Color highlightColorTransparent = new Color(highlightColor.getRed(), highlightColor.getGreen(),
-        highlightColor.getBlue(), 100);
+    Color highlightColorTransparent = new Color(highlightColor.getRed(),
+        highlightColor.getGreen(), highlightColor.getBlue(), 100);
     g.setColor(highlightColorTransparent);
     int s = size + highlightPointRadius;
@@ -405,5 +426,6 @@
    * @param p
    */
-  private void draw(Graphics2D g, MapillaryAbstractImage image, ImageIcon icon, Point p) {
+  private void draw(Graphics2D g, MapillaryAbstractImage image, ImageIcon icon,
+      Point p) {
     Image imagetemp = icon.getImage();
     BufferedImage bi = (BufferedImage) imagetemp;
@@ -473,5 +495,6 @@
           ret[0] = image;
           distances[0] = image.getLatLon().greatCircleDistance(selectedCoords);
-        } else if ((ret[1] == null || image.getLatLon().greatCircleDistance(selectedCoords) < distances[1])
+        } else if ((ret[1] == null || image.getLatLon().greatCircleDistance(
+            selectedCoords) < distances[1])
             && image.getSequence() != ret[0].getSequence()) {
           ret[1] = image;
@@ -482,7 +505,9 @@
     // Predownloads the thumbnails
     if (ret[0] != null)
-      new MapillaryCache(ret[0].getKey(), MapillaryCache.Type.THUMBNAIL).submit(data, false);
+      new MapillaryCache(ret[0].getKey(), MapillaryCache.Type.THUMBNAIL)
+          .submit(data, false);
     if (ret[1] != null)
-      new MapillaryCache(ret[1].getKey(), MapillaryCache.Type.THUMBNAIL).submit(data, false);
+      new MapillaryCache(ret[1].getKey(), MapillaryCache.Type.THUMBNAIL)
+          .submit(data, false);
     return ret;
   }
@@ -589,4 +614,7 @@
   }
 
+  /**
+   * Updates the help text at the bottom of the window.
+   */
   public void updateHelpText() {
     String ret = "";
@@ -597,5 +625,5 @@
     ret += " -- " + tr(mode.toString());
 
-     Main.map.statusLine.setHelpText(ret);
+    Main.map.statusLine.setHelpText(ret);
   }
 }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31386)
@@ -30,12 +30,22 @@
 public class MapillaryPlugin extends Plugin {
 
+  /** 24x24 icon. */
   public static final ImageIcon ICON24 = new ImageProvider("icon24.png").get();
+  /** 16x16 icon. */
   public static final ImageIcon ICON16 = new ImageProvider("icon16.png").get();
-  public static final ImageIcon MAP_ICON = new ImageProvider("mapicon.png").get();
-  public static final ImageIcon MAP_ICON_SELECTED = new ImageProvider("mapiconselected.png").get();
-  public static final ImageIcon MAP_ICON_IMPORTED = new ImageProvider("mapiconimported.png").get();
+  /** Icon representing an image in the map. */
+  public static final ImageIcon MAP_ICON = new ImageProvider("mapicon.png")
+      .get();
+  /** Icon representing a selected image in the map. */
+  public static final ImageIcon MAP_ICON_SELECTED = new ImageProvider(
+      "mapiconselected.png").get();
+  /** Icon representing an imported iage in the map. */
+  public static final ImageIcon MAP_ICON_IMPORTED = new ImageProvider(
+      "mapiconimported.png").get();
+  /** Icon used to identify which images have signs on them */
   public static final ImageIcon MAP_SIGN = new ImageProvider("sign.png").get();
   public static final int ICON_SIZE = 24;
 
+  /** Cache that stores the pictures the downloaded pictures. */
   public static CacheAccess<String, BufferedImageCacheEntry> CACHE;
 
@@ -48,12 +58,24 @@
   private final MapillaryJoinAction joinAction;
 
+  /** Menu button for the {@link MapillaryDownloadAction} action. */
   public static JMenuItem DOWNLOAD_MENU;
+  /** Menu button for the {@link MapillaryExportAction} action. */
   public static JMenuItem EXPORT_MENU;
+  /** Menu button for the {@link MapillaryImportAction} action. */
   public static JMenuItem IMPORT_MENU;
+  /** Menu button for the {@link MapillaryZoomAction} action. */
   public static JMenuItem ZOOM_MENU;
+  /** Menu button for the {@link MapillaryDownloadViewAction} action. */
   public static JMenuItem DOWNLOAD_VIEW_MENU;
+  /** Menu button for the {@link MapillaryImportIntoSequenceAction} action. */
   public static JMenuItem IMPORT_INTO_SEQUENCE_MENU;
+  /** Menu button for the {@link MapillaryJoinAction} action. */
   public static JMenuItem JOIN_MENU;
 
+  /**
+   * Main constructor.
+   *
+   * @param info
+   */
   public MapillaryPlugin(PluginInformation info) {
     super(info);
@@ -67,10 +89,15 @@
 
     if (Main.main != null) { // important for headless mode
-      DOWNLOAD_MENU = MainMenu.add(Main.main.menu.imageryMenu, downloadAction, false);
-      EXPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, exportAction, false, 14);
-      IMPORT_INTO_SEQUENCE_MENU = MainMenu.add(Main.main.menu.fileMenu, importIntoSequenceAction, false, 14);
-      IMPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, importAction, false, 14);
+      DOWNLOAD_MENU = MainMenu.add(Main.main.menu.imageryMenu, downloadAction,
+          false);
+      EXPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, exportAction, false,
+          14);
+      IMPORT_INTO_SEQUENCE_MENU = MainMenu.add(Main.main.menu.fileMenu,
+          importIntoSequenceAction, false, 14);
+      IMPORT_MENU = MainMenu.add(Main.main.menu.fileMenu, importAction, false,
+          14);
       ZOOM_MENU = MainMenu.add(Main.main.menu.viewMenu, zoomAction, false, 15);
-      DOWNLOAD_VIEW_MENU = MainMenu.add(Main.main.menu.fileMenu, downloadViewAction, false, 14);
+      DOWNLOAD_VIEW_MENU = MainMenu.add(Main.main.menu.fileMenu,
+          downloadViewAction, false, 14);
       JOIN_MENU = MainMenu.add(Main.main.menu.dataMenu, joinAction, false);
     }
@@ -85,5 +112,6 @@
 
     try {
-      CACHE = JCSCacheManager.getCache("mapillary", 10, 10000, this.getPluginDir() + "/cache/");
+      CACHE = JCSCacheManager.getCache("mapillary", 10, 10000,
+          this.getPluginDir() + "/cache/");
     } catch (IOException e) {
       Main.error(e);
@@ -117,4 +145,12 @@
   }
 
+  /**
+   * Enables/disables a JMenuItem.
+   *
+   * @param menu
+   *          The JMenuItem object that is going to be enabled or disabled.
+   * @param value
+   *          true to enable de JMenuItem; false to disable it.
+   */
   public static void setMenuEnabled(JMenuItem menu, boolean value) {
     menu.setEnabled(value);
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySequence.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySequence.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillarySequence.java	(revision 31386)
@@ -6,5 +6,5 @@
 /**
  * Class that stores a sequence of MapillaryImage objects.
- * 
+ *
  * @author nokutu
  * @see MapillaryImage
@@ -15,9 +15,21 @@
   private String key;
   private long created_at;
-  
+
+  /**
+   * Creates a sequence without key or timestamp. Used for
+   * {@link MapillaryImportedImage} sequences.
+   */
   public MapillarySequence() {
     this.images = new ArrayList<>();
   }
 
+  /**
+   * Creates a sequence object with the given parameters
+   *
+   * @param key
+   *          The unique identifier of the sequence.
+   * @param created_at
+   *          The date the sequence was created.
+   */
   public MapillarySequence(String key, long created_at) {
     this.images = new ArrayList<>();
@@ -28,6 +40,7 @@
   /**
    * Returns all MapillaryImages objects contained by this object.
-   * 
-   * @return
+   *
+   * @return A List object containing all the {@link MapillaryAbstractImage}
+   *         objects that are part of the sequence.
    */
   public List<MapillaryAbstractImage> getImages() {
@@ -35,4 +48,10 @@
   }
 
+  /**
+   * Returns the Epoch time when the sequence was captured.
+   *
+   * @return A long containing the Epoch time when the sequence was captured.
+   *
+   */
   public long getCreatedAt() {
     return created_at;
@@ -41,5 +60,5 @@
   /**
    * Adds a new MapillaryImage object to this object.
-   * 
+   *
    * @param image
    */
@@ -48,4 +67,11 @@
   }
 
+  /**
+   * Returns the unique identifier of the sequence.
+   *
+   * @return A String containing the unique identifier of the sequence. null
+   *         means that the sequence has been created locally for imported
+   *         images.
+   */
   public String getKey() {
     return this.key;
@@ -54,5 +80,5 @@
   /**
    * Adds a set of MapillaryImage objects to this object.
-   * 
+   *
    * @param images
    */
@@ -64,5 +90,5 @@
   /**
    * Removes a MapillaryImage object from this object.
-   * 
+   *
    * @param image
    */
@@ -72,8 +98,10 @@
 
   /**
-   * Returns the next MapillaryImage in the sequence.
-   * 
+   * Returns the next {@link MapillaryAbstractImage} in the sequence.
+   *
    * @param image
-   * @return
+   *          The {@link MapillaryAbstractImage} object whose next image is
+   *          going to be returned.
+   * @return The next {@link MapillaryAbstractImage} object in the sequence.
    */
   public MapillaryAbstractImage next(MapillaryAbstractImage image) {
@@ -89,7 +117,9 @@
   /**
    * Returns the previous {@link MapillaryAbstractImage} in the sequence.
-   * 
+   *
    * @param image
-   * @return
+   *          The {@link MapillaryAbstractImage} object whose previous image is
+   *          going to be returned.
+   * @return The previous {@link MapillaryAbstractImage} object in the sequence.
    */
   public MapillaryAbstractImage previous(MapillaryAbstractImage image) {
@@ -106,10 +136,12 @@
    * Returns the difference of index between two {@link MapillaryAbstractImage}
    * objects belonging to the same {@link MapillarySequence}.
-   * 
+   *
    * @param image1
    * @param image2
-   * @return
+   * @return The distance between two {@link MapillaryAbstractImage} objects
+   *         belonging to the same {@link MapillarySequence}.
    */
-  public int getDistance(MapillaryAbstractImage image1, MapillaryAbstractImage image2) {
+  public int getDistance(MapillaryAbstractImage image1,
+      MapillaryAbstractImage image2) {
     if (!this.images.contains(image1) || !this.images.contains(image2))
       throw new IllegalArgumentException();
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java	(revision 31386)
@@ -24,4 +24,9 @@
 public class MapillaryDownloadAction extends JosmAction {
 
+  private static final long serialVersionUID = 325060354730454948L;
+
+  /**
+   * Main constructor.
+   */
   public MapillaryDownloadAction() {
     super(tr("Mapillary"), new ImageProvider("icon24.png"),
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadViewAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadViewAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadViewAction.java	(revision 31386)
@@ -23,7 +23,13 @@
 public class MapillaryDownloadViewAction extends JosmAction {
 
+  private static final long serialVersionUID = -6837073336175123503L;
+
+  /** Max area to be downloaded */
   public static final double MAX_AREA = Main.pref.getDouble(
       "mapillary.max-download-area", 0.020);
 
+  /**
+   * Main constructor.
+   */
   public MapillaryDownloadViewAction() {
     super(tr("Download Mapillary images in current view"), new ImageProvider(
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryExportAction.java	(revision 31386)
@@ -28,5 +28,5 @@
 /**
  * Action that launches a MapillaryExportDialog and lets you export the images.
- * 
+ *
  * @author nokutu
  *
@@ -34,6 +34,11 @@
 public class MapillaryExportAction extends JosmAction {
 
-  MapillaryExportDialog dialog;
+  private static final long serialVersionUID = 6009490043174837948L;
 
+  private MapillaryExportDialog dialog;
+
+  /**
+   * Main constructor.
+   */
   public MapillaryExportAction() {
     super(tr("Export pictures"), new ImageProvider("icon24.png"),
@@ -100,4 +105,7 @@
   /**
    * Exports the given images from the database.
+   *
+   * @param images
+   *          The set of images to be exported.
    */
   public void export(List<MapillaryAbstractImage> images) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportAction.java	(revision 31386)
@@ -36,5 +36,7 @@
 public class MapillaryImportAction extends JosmAction {
 
-  public JFileChooser chooser;
+  private static final long serialVersionUID = 4995924098228081806L;
+
+  private JFileChooser chooser;
 
   /**
@@ -43,4 +45,7 @@
   private int noTagsPics = 0;
 
+  /**
+   * Main constructor.
+   */
   public MapillaryImportAction() {
     super(tr("Import pictures"), new ImageProvider("icon24.png"),
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31386)
@@ -32,7 +32,15 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Imports a set of images and puts them in a single {@link MapillarySequence}.
+ *
+ * @author nokutu
+ *
+ */
 public class MapillaryImportIntoSequenceAction extends JosmAction {
 
-  public JFileChooser chooser;
+  private static final long serialVersionUID = -9190217809965894878L;
+
+  private JFileChooser chooser;
 
   private LinkedList<MapillaryImportedImage> images;
@@ -129,8 +137,6 @@
       final TiffField datetimeOriginal = jpegMetadata
           .findEXIFValueWithExactMatch(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL);
-      if (lat_ref == null || lat == null || lon == null || lon_ref == null
-          || datetimeOriginal == null)
-        throw new IllegalArgumentException(
-            "The picture has not correct EXIF tags");
+      if (lat_ref == null || lat == null || lon == null || lon_ref == null || datetimeOriginal == null)
+        throw new IllegalArgumentException("The picture has not correct EXIF tags");
 
       double latValue = 0;
@@ -155,4 +161,7 @@
   }
 
+  /**
+   * Joins all the images in a unique {@link MapillarySequence}.
+   */
   public void joinImages() {
     Collections.sort(images, new MapillaryEpochComparator());
@@ -164,4 +173,11 @@
   }
 
+  /**
+   * Comparator that comperes two {@link MapillaryAbstractImage} objects
+   * depending on the time they were taken.
+   *
+   * @author nokutu
+   *
+   */
   public class MapillaryEpochComparator implements
       Comparator<MapillaryAbstractImage> {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryJoinAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryJoinAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryJoinAction.java	(revision 31386)
@@ -13,6 +13,17 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Changes the mode of the Layer, from Select mode to Join mode and viceversa.
+ *
+ * @author nokutu
+ *
+ */
 public class MapillaryJoinAction extends JosmAction {
 
+  private static final long serialVersionUID = -7082300908202843706L;
+
+  /**
+   * Main constructor.
+   */
   public MapillaryJoinAction() {
     super(tr("Join mode"), new ImageProvider("icon24.png"),
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryZoomAction.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryZoomAction.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryZoomAction.java	(revision 31386)
@@ -17,5 +17,5 @@
 /**
  * Zooms to the currently selected image.
- * 
+ *
  * @author nokutu
  *
@@ -24,4 +24,9 @@
     MapillaryDataListener {
 
+  private static final long serialVersionUID = -6050566219765623059L;
+
+  /**
+   * Main constructor.
+   */
   public MapillaryZoomAction() {
     super(tr("Zoom to selected image"), new ImageProvider("icon24.png"),
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/MapillaryCache.java	(revision 31386)
@@ -10,4 +10,10 @@
 import org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin;
 
+/**
+ * Sotres the
+ *
+ * @author nokutu
+ *
+ */
 public class MapillaryCache extends
     JCSCachedTileLoaderJob<String, BufferedImageCacheEntry> {
@@ -16,8 +22,19 @@
   private volatile String key;
 
+  /**
+   * Types of images.
+   *
+   * @author nokutu
+   */
   public static enum Type {
     FULL_IMAGE, THUMBNAIL
   }
 
+  /**
+   * Main constructor.
+   *
+   * @param key
+   * @param type
+   */
   public MapillaryCache(String key, Type type) {
     super(MapillaryPlugin.CACHE, 50000, 50000, new HashMap<String, String>());
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31385)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31386)
@@ -19,4 +19,10 @@
 import java.awt.Desktop;
 
+/**
+ * JLabel that acts as a hyperlink.
+ *
+ * @author nokutu
+ *
+ */
 public class HyperlinkLabel extends JLabel implements ActionListener {
 
