Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryTrafficSignLayer.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryTrafficSignLayer.java	(revision 31809)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryTrafficSignLayer.java	(revision 31810)
@@ -26,5 +26,5 @@
 import org.openstreetmap.josm.tools.I18n;
 
-public class MapillaryTrafficSignLayer extends AbstractModifiableLayer {
+public final class MapillaryTrafficSignLayer extends AbstractModifiableLayer {
   private static final String TRAFFICO_PATH = "data/fonts/traffico/traffico.ttf";
   private static MapillaryTrafficSignLayer instance;
@@ -49,5 +49,5 @@
    *         if the traffico font has the wrong format
    */
-  public static MapillaryTrafficSignLayer getInstance() throws IOException {
+  public static synchronized MapillaryTrafficSignLayer getInstance() throws IOException {
     if (instance == null)
       instance = new MapillaryTrafficSignLayer();
@@ -89,5 +89,5 @@
       for (TrafficoSignElement layer : signs[i]) { // TODO: NPE
         g.setColor(layer.getColor());
-        g.drawString("" + layer.getGlyph(), points[i].x - 25, points[i].y + 25);
+        g.drawString(Character.toString(layer.getGlyph()), points[i].x - 25, points[i].y + 25);
       }
     }
@@ -98,9 +98,9 @@
       if (img instanceof MapillaryImage) {
         g.fillOval(mv.getPoint(img.getLatLon()).x - 3, mv.getPoint(img.getLatLon()).y - 3, 6, 6);
-        if (((MapillaryImage) img).getSigns().size() >= 1) {
+        if (!((MapillaryImage) img).getSigns().isEmpty()) {
           Point imgLoc = mv.getPoint(img.getLatLon());
           for (TrafficoSignElement e : TrafficoSign.getSign("de", ((MapillaryImage) img).getSigns().get(0))) {
             g.setColor(e.getColor());
-            g.drawString("" + e.getGlyph(), imgLoc.x, imgLoc.y);
+            g.drawString(Character.toString(e.getGlyph()), imgLoc.x, imgLoc.y);
           }
         }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 31809)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 31810)
@@ -3,5 +3,4 @@
 
 import java.awt.FlowLayout;
-import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
@@ -9,5 +8,4 @@
 import java.net.URL;
 
-import javax.json.Json;
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
@@ -42,18 +40,18 @@
 public class MapillaryPreferenceSetting implements SubPreferenceSetting, MapillaryLoginListener {
 
-  private JCheckBox reverseButtons = new JCheckBox(I18n.tr("Reverse buttons position when displaying images."));
-  private JComboBox<String> downloadMode = new JComboBox<>(new String[]{
+  private final JCheckBox reverseButtons = new JCheckBox(I18n.tr("Reverse buttons position when displaying images."));
+  private final JComboBox<String> downloadMode = new JComboBox<>(new String[]{
       MapillaryDownloader.MODES.Automatic.toString(),
       MapillaryDownloader.MODES.Semiautomatic.toString(),
       MapillaryDownloader.MODES.Manual.toString()
   });
-  private JCheckBox displayHour = new JCheckBox(I18n.tr("Display hour when the picture was taken"));
-  private JCheckBox format24 = new JCheckBox(I18n.tr("Use 24 hour format"));
-  private JCheckBox moveTo = new JCheckBox(I18n.tr("Move to picture''s location with next/previous buttons"));
+  private final JCheckBox displayHour = new JCheckBox(I18n.tr("Display hour when the picture was taken"));
+  private final JCheckBox format24 = new JCheckBox(I18n.tr("Use 24 hour format"));
+  private final JCheckBox moveTo = new JCheckBox(I18n.tr("Move to picture''s location with next/previous buttons"));
 
-  private JButton loginButton = new JButton(new LoginAction(this));
-  private JButton logoutButton = new JButton(new LogoutAction());
-  private JLabel loginLabel = new JLabel();
-  private JPanel loginPanel = new JPanel();
+  private final JButton loginButton = new JButton(new LoginAction(this));
+  private final JButton logoutButton = new JButton(new LogoutAction());
+  private final JLabel loginLabel = new JLabel();
+  private final JPanel loginPanel = new JPanel();
 
   @Override
@@ -113,9 +111,5 @@
   }
 
-  /**
-   * Should be called whenever the user logs into a mapillary account.
-   * This updates the GUI to reflect the login status.
-   * @param username the username that the user is now logged in with
-   */
+  @Override
   public void onLogin(final String username) {
     loginPanel.add(logoutButton, 1);
@@ -125,8 +119,5 @@
   }
 
-  /**
-   * Should be called whenever the user logs out of a mapillary account.
-   * This updates the GUI to reflect the login status.
-   */
+  @Override
   public void onLogout() {
     loginPanel.remove(logoutButton);
@@ -168,5 +159,5 @@
   public class LoginAction extends AbstractAction {
     private static final long serialVersionUID = -3908477563072057344L;
-    final transient MapillaryLoginListener callback;
+    private final transient MapillaryLoginListener callback;
 
     public LoginAction(MapillaryLoginListener loginCallback) {
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryLoginListener.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryLoginListener.java	(revision 31809)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryLoginListener.java	(revision 31810)
@@ -1,6 +1,21 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.mapillary.oauth;
 
+/**
+ * This interface should be implemented by components that want to get notified when the user
+ * logs in or logs out of his Mapillary account.
+ * Such listeners can be registered e.g. at a {@link OAuthPortListener}.
+ */
 public interface MapillaryLoginListener {
+  /**
+   * Should be called whenever the user logs into a mapillary account.
+   * E.g. for updating the GUI to reflect the login status.
+   * @param username the username that the user is now logged in with
+   */
   public void onLogin(final String username);
+  /**
+   * Should be called whenever the user logs out of a mapillary account.
+   * E.g. for updating the GUI to reflect the login status.
+   */
   public void onLogout();
 }
Index: applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryUser.java
===================================================================
--- applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryUser.java	(revision 31809)
+++ applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/MapillaryUser.java	(revision 31810)
@@ -17,5 +17,5 @@
  *
  */
-public class MapillaryUser {
+public final class MapillaryUser {
 
   private static String username;
