Index: applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/Correlator.java	(revision 32638)
@@ -25,10 +25,14 @@
  * @author zverik
  */
-public class Correlator {
+public final class Correlator {
+
+    private Correlator() {
+        // Hide default constructor for utilities classes
+    }
 
     /**
      * Matches entries to GPX so most points are on the trace.
      */
-    public static long crudeMatch( List<NanoLogEntry> entries, GpxData data ) {
+    public static long crudeMatch(List<NanoLogEntry> entries, GpxData data) {
         List<NanoLogEntry> sortedEntries = new ArrayList<>(entries);
         Collections.sort(sortedEntries);
@@ -36,9 +40,9 @@
         long firstGPXDate = -1;
         outer:
-        for( GpxTrack trk : data.tracks ) {
-            for( GpxTrackSegment segment : trk.getSegments() ) {
-                for( WayPoint curWp : segment.getWayPoints() ) {
-                    String curDateWpStr = (String)curWp.attr.get("time");
-                    if( curDateWpStr == null ) {
+        for (GpxTrack trk : data.tracks) {
+            for (GpxTrackSegment segment : trk.getSegments()) {
+                for (WayPoint curWp : segment.getWayPoints()) {
+                    String curDateWpStr = (String) curWp.attr.get("time");
+                    if (curDateWpStr == null) {
                         continue;
                     }
@@ -47,5 +51,5 @@
                         firstGPXDate = DateUtils.fromString(curDateWpStr).getTime();
                         break outer;
-                    } catch( Exception e ) {
+                    } catch (Exception e) {
                         Main.warn(e);
                     }
@@ -55,5 +59,5 @@
 
         // No GPX timestamps found, exit
-        if( firstGPXDate < 0 ) {
+        if (firstGPXDate < 0) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("The selected GPX track does not contain timestamps. Please select another one."),
@@ -65,6 +69,6 @@
     }
 
-    public static void revertPos( List<NanoLogEntry> entries ) {
-        for( NanoLogEntry entry : entries ) {
+    public static void revertPos(List<NanoLogEntry> entries) {
+        for (NanoLogEntry entry : entries) {
             entry.setPos(entry.getBasePos());
         }
@@ -73,21 +77,18 @@
     /**
      * Offset is in 1/1000 of a second.
-     * @param entries
-     * @param data
-     * @param offset
      */
-    public static void correlate( List<NanoLogEntry> entries, GpxData data, long offset ) {
+    public static void correlate(List<NanoLogEntry> entries, GpxData data, long offset) {
         List<NanoLogEntry> sortedEntries = new ArrayList<>(entries);
         //int ret = 0;
         Collections.sort(sortedEntries);
-        for( GpxTrack track : data.tracks ) {
-            for( GpxTrackSegment segment : track.getSegments() ) {
+        for (GpxTrack track : data.tracks) {
+            for (GpxTrackSegment segment : track.getSegments()) {
                 long prevWpTime = 0;
                 WayPoint prevWp = null;
 
-                for( WayPoint curWp : segment.getWayPoints() ) {
-
-                    String curWpTimeStr = (String)curWp.attr.get("time");
-                    if( curWpTimeStr != null ) {
+                for (WayPoint curWp : segment.getWayPoints()) {
+
+                    String curWpTimeStr = (String) curWp.attr.get("time");
+                    if (curWpTimeStr != null) {
                         try {
                             long curWpTime = DateUtils.fromString(curWpTimeStr).getTime() + offset;
@@ -97,5 +98,5 @@
                             prevWpTime = curWpTime;
 
-                        } catch( UncheckedParseException e ) {
+                        } catch (UncheckedParseException e) {
                             Main.error("Error while parsing date \"" + curWpTimeStr + '"');
                             Main.error(e);
@@ -112,6 +113,6 @@
     }
 
-    private static int matchPoints( List<NanoLogEntry> entries, WayPoint prevWp, long prevWpTime,
-            WayPoint curWp, long curWpTime, long offset ) {
+    private static int matchPoints(List<NanoLogEntry> entries, WayPoint prevWp, long prevWpTime,
+            WayPoint curWp, long curWpTime, long offset) {
         // Time between the track point and the previous one, 5 sec if first point, i.e. photos take
         // 5 sec before the first track point can be assumed to be take at the starting position
@@ -123,9 +124,9 @@
 
         // no photos match
-        if( i < 0 )
+        if (i < 0)
             return 0;
 
         Integer direction = null;
-        if( prevWp != null ) {
+        if (prevWp != null) {
             direction = Long.valueOf(Math.round(180.0 / Math.PI * prevWp.getCoor().heading(curWp.getCoor()))).intValue();
         }
@@ -133,15 +134,15 @@
         // First trackpoint, then interval is set to five seconds, i.e. photos up to five seconds
         // before the first point will be geotagged with the starting point
-        if( prevWpTime == 0 || curWpTime <= prevWpTime ) {
-            while( true ) {
-                if( i < 0 ) {
+        if (prevWpTime == 0 || curWpTime <= prevWpTime) {
+            while (true) {
+                if (i < 0) {
                     break;
                 }
                 final NanoLogEntry curImg = entries.get(i);
                 long time = curImg.getTime().getTime();
-                if( time > curWpTime || time < curWpTime - interval ) {
+                if (time > curWpTime || time < curWpTime - interval) {
                     break;
                 }
-                if( curImg.getPos() == null ) {
+                if (curImg.getPos() == null) {
                     curImg.setPos(curWp.getCoor());
                     curImg.setDirection(direction);
@@ -155,17 +156,17 @@
         // This code gives a simple linear interpolation of the coordinates between current and
         // previous track point assuming a constant speed in between
-        while( true ) {
-            if( i < 0 ) {
+        while (true) {
+            if (i < 0) {
                 break;
             }
             NanoLogEntry curImg = entries.get(i);
             long imgTime = curImg.getTime().getTime();
-            if( imgTime < prevWpTime ) {
+            if (imgTime < prevWpTime) {
                 break;
             }
 
-            if( curImg.getPos() == null && prevWp != null ) {
+            if (curImg.getPos() == null && prevWp != null) {
                 // The values of timeDiff are between 0 and 1, it is not seconds but a dimensionless variable
-                double timeDiff = (double)(imgTime - prevWpTime) / interval;
+                double timeDiff = (double) (imgTime - prevWpTime) / interval;
                 curImg.setPos(prevWp.getCoor().interpolate(curWp.getCoor(), timeDiff));
                 curImg.setDirection(direction);
@@ -179,8 +180,8 @@
 
     private static int getLastIndexOfListBefore(List<NanoLogEntry> entries, long searchedTime) {
-        int lstSize= entries.size();
+        int lstSize = entries.size();
 
         // No photos or the first photo taken is later than the search period
-        if(lstSize == 0 || searchedTime < entries.get(0).getTime().getTime())
+        if (lstSize == 0 || searchedTime < entries.get(0).getTime().getTime())
             return -1;
 
@@ -190,13 +191,13 @@
 
         // The searched index is somewhere in the middle, do a binary search from the beginning
-        int curIndex= 0;
-        int startIndex= 0;
-        int endIndex= lstSize-1;
+        int curIndex = 0;
+        int startIndex = 0;
+        int endIndex = lstSize-1;
         while (endIndex - startIndex > 1) {
-            curIndex= (endIndex + startIndex) / 2;
+            curIndex = (endIndex + startIndex) / 2;
             if (searchedTime > entries.get(curIndex).getTime().getTime()) {
-                startIndex= curIndex;
+                startIndex = curIndex;
             } else {
-                endIndex= curIndex;
+                endIndex = curIndex;
             }
         }
@@ -215,26 +216,26 @@
      * Returns date of a potential point on GPX track (which can be between points).
      */
-    public static long getGpxDate( GpxData data, LatLon pos ) {
+    public static long getGpxDate(GpxData data, LatLon pos) {
         EastNorth en = Main.getProjection().latlon2eastNorth(pos);
-        for( GpxTrack track : data.tracks ) {
-            for( GpxTrackSegment segment : track.getSegments() ) {
+        for (GpxTrack track : data.tracks) {
+            for (GpxTrackSegment segment : track.getSegments()) {
                 long prevWpTime = 0;
                 WayPoint prevWp = null;
-                for( WayPoint curWp : segment.getWayPoints() ) {
-                    String curWpTimeStr = (String)curWp.attr.get("time");
-                    if( curWpTimeStr != null ) {
+                for (WayPoint curWp : segment.getWayPoints()) {
+                    String curWpTimeStr = (String) curWp.attr.get("time");
+                    if (curWpTimeStr != null) {
                         try {
                             long curWpTime = DateUtils.fromString(curWpTimeStr).getTime();
-                            if( prevWp != null ) {
+                            if (prevWp != null) {
                                 EastNorth c1 = Main.getProjection().latlon2eastNorth(prevWp.getCoor());
                                 EastNorth c2 = Main.getProjection().latlon2eastNorth(curWp.getCoor());
-                                if( !c1.equals(c2) ) {
+                                if (!c1.equals(c2)) {
                                     EastNorth middle = getSegmentAltitudeIntersection(c1, c2, en);
-                                    if( middle != null && en.distance(middle) < 1 ) {
+                                    if (middle != null && en.distance(middle) < 1) {
                                         // found our point, no further search is neccessary
                                         double prop = c1.east() == c2.east()
                                                 ? (middle.north() - c1.north()) / (c2.north() - c1.north())
                                                 : (middle.east() - c1.east()) / (c2.east() - c1.east());
-                                        if( prop >= 0 && prop <= 1 ) {
+                                        if (prop >= 0 && prop <= 1) {
                                             return Math.round(prevWpTime + prop * (curWpTime - prevWpTime));
                                         }
@@ -245,5 +246,5 @@
                             prevWp = curWp;
                             prevWpTime = curWpTime;
-                        } catch( UncheckedParseException e ) {
+                        } catch (UncheckedParseException e) {
                             Main.error("Error while parsing date \"" + curWpTimeStr + '"');
                             Main.error(e);
@@ -265,7 +266,4 @@
      * to it starting at point p. If the line defined with p1-p2 intersects
      * its altitude out of p1-p2, null is returned.
-     * @param p1
-     * @param p2
-     * @param point
      * @return Intersection coordinate or null
      **/
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/GPXChooser.java	(revision 32638)
@@ -1,5 +1,6 @@
 package nanolog;
 
-import javax.swing.*;
+import javax.swing.JDialog;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
@@ -19,7 +20,7 @@
     public static GpxLayer topLayer() {
         // return first found local layer
-        for( Layer layer : Main.getLayerManager().getLayers() ) {
-            if( layer instanceof GpxLayer && ((GpxLayer)layer).isLocalFile() )
-                return (GpxLayer)layer;
+        for (Layer layer : Main.getLayerManager().getLayers()) {
+            if (layer instanceof GpxLayer && ((GpxLayer) layer).isLocalFile())
+                return (GpxLayer) layer;
         }
         return null;
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java	(revision 32638)
@@ -7,5 +7,5 @@
 /**
  * This holds one NanoLog entry.
- * 
+ *
  * @author zverik
  */
@@ -18,5 +18,5 @@
     private LatLon basePos;
 
-    public NanoLogEntry( Date time, String message, LatLon basePos, Integer baseDir ) {
+    public NanoLogEntry(Date time, String message, LatLon basePos, Integer baseDir) {
         this.basePos = basePos;
         this.baseDir = baseDir;
@@ -27,8 +27,8 @@
     }
 
-    public NanoLogEntry( Date time, String message ) {
+    public NanoLogEntry(Date time, String message) {
         this(time, message, null, null);
     }
-    
+
     public Integer getDirection() {
         return direction;
@@ -43,9 +43,9 @@
     }
 
-    public void setPos( LatLon pos ) {
+    public void setPos(LatLon pos) {
         this.pos = pos;
     }
 
-    public void setDirection( Integer direction ) {
+    public void setDirection(Integer direction) {
         this.direction = direction;
     }
@@ -64,5 +64,5 @@
 
     @Override
-    public int compareTo( NanoLogEntry t ) {
+    public int compareTo(NanoLogEntry t) {
         return time.compareTo(t.time);
     }
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogLayer.java	(revision 32638)
@@ -57,5 +57,5 @@
     private NLLMouseAdapter mouseListener;
 
-    public NanoLogLayer( List<NanoLogEntry> entries ) {
+    public NanoLogLayer(List<NanoLogEntry> entries) {
         super(tr("NanoLog"));
         log = new ArrayList<>(entries);
@@ -76,24 +76,26 @@
     }
 
-    public NanoLogLayer( File file ) throws IOException {
+    public NanoLogLayer(File file) throws IOException {
         this(readNanoLog(file));
     }
 
-    public void addListener( NanoLogLayerListener listener ) {
+    public void addListener(NanoLogLayerListener listener) {
         listeners.add(listener);
     }
 
-    public void removeListener( NanoLogLayerListener listener ) {
+    public void removeListener(NanoLogLayerListener listener) {
         listeners.remove(listener);
     }
 
     protected void fireMarkersChanged() {
-        for( NanoLogLayerListener listener : listeners )
+        for (NanoLogLayerListener listener : listeners) {
             listener.markersUpdated(this);
+        }
     }
 
     protected void fireMarkerSelected() {
-        for( NanoLogLayerListener listener : listeners )
+        for (NanoLogLayerListener listener : listeners) {
             listener.markerActivated(this, selectedEntry < 0 ? null : log.get(selectedEntry));
+        }
     }
 
@@ -102,41 +104,42 @@
     }
 
-    public static List<NanoLogEntry> readNanoLog( File file ) throws IOException {
+    public static List<NanoLogEntry> readNanoLog(File file) throws IOException {
         final Pattern NANOLOG_LINE = Pattern.compile("(.+?)\\t(.+?)(?:\\s*\\{\\{(-?\\d+\\.\\d+),\\s*(-?\\d+\\.\\d+)(?:,\\s*(\\d+))?\\}\\})?");
         final SimpleDateFormat fmt = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss.SS");
         List<NanoLogEntry> result = new ArrayList<>();
         try (BufferedReader r = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF8"))) {
-	        while( r.ready() ) {
-	            String line = r.readLine();
-	            if( line != null ) {
-	                Matcher m = NANOLOG_LINE.matcher(line);
-	                if( m.matches() ) {
-	                    String time = m.group(1);
-	                    String message = m.group(2);
-	                    String lat = m.group(3);
-	                    String lon = m.group(4);
-	                    String dir = m.group(5);
-	                    Date timeDate = null;
-	                    try {
-	                        timeDate = fmt.parse(time);
-	                    } catch( ParseException e ) {
-	                    }
-	                    if( message == null || message.length() == 0 || timeDate == null )
-	                        continue;
-	                    LatLon pos = null;
-	                    Integer direction = null;
-	                    if( lat != null && lon != null ) {
-	                        try {
-	                            pos = new LatLon(Double.parseDouble(lat), Double.parseDouble(lon));
-	                            direction = new Integer(dir);
-	                        } catch( NumberFormatException e ) {
-	                            // well...
-	                        }
-	                    }
-	                    NanoLogEntry entry = new NanoLogEntry(timeDate, message, pos, direction);
-	                    result.add(entry);
-	                }
-	            }
-	        }
+            while (r.ready()) {
+                String line = r.readLine();
+                if (line != null) {
+                    Matcher m = NANOLOG_LINE.matcher(line);
+                    if (m.matches()) {
+                        String time = m.group(1);
+                        String message = m.group(2);
+                        String lat = m.group(3);
+                        String lon = m.group(4);
+                        String dir = m.group(5);
+                        Date timeDate = null;
+                        try {
+                            timeDate = fmt.parse(time);
+                        } catch (ParseException e) {
+                            Main.warn(e);
+                        }
+                        if (message == null || message.length() == 0 || timeDate == null)
+                            continue;
+                        LatLon pos = null;
+                        Integer direction = null;
+                        if (lat != null && lon != null) {
+                            try {
+                                pos = new LatLon(Double.parseDouble(lat), Double.parseDouble(lon));
+                                direction = new Integer(dir);
+                            } catch (NumberFormatException e) {
+                                Main.trace(e);
+                            }
+                        }
+                        NanoLogEntry entry = new NanoLogEntry(timeDate, message, pos, direction);
+                        result.add(entry);
+                    }
+                }
+            }
         }
         return result;
@@ -144,10 +147,10 @@
 
     @Override
-    public void paint( Graphics2D g, MapView mv, Bounds box ) {
+    public void paint(Graphics2D g, MapView mv, Bounds box) {
         // todo
-        for( int i = 0; i < log.size(); i++  ) {
+        for (int i = 0; i < log.size(); i++) {
             NanoLogEntry entry = log.get(i);
             int radius = 4;
-            if( entry.getPos() != null ) {
+            if (entry.getPos() != null) {
                 Point p = mv.getPoint(entry.getPos());
                 g.setColor(selectedEntry == i ? Color.red : Color.yellow);
@@ -168,17 +171,18 @@
 
     @Override
-    public void mergeFrom( Layer from ) {
+    public void mergeFrom(Layer from) {
         // todo
     }
 
     @Override
-    public boolean isMergable( Layer other ) {
+    public boolean isMergable(Layer other) {
         return other instanceof NanoLogLayer;
     }
 
     @Override
-    public void visitBoundingBox( BoundingXYVisitor v ) {
-        for( NanoLogEntry entry : log )
+    public void visitBoundingBox(BoundingXYVisitor v) {
+        for (NanoLogEntry entry : log) {
             v.visit(entry.getPos());
+        }
     }
 
@@ -187,7 +191,8 @@
         StringBuilder b = new StringBuilder();
         int cnt = 0;
-        for( NanoLogEntry e : log )
-            if( e.getPos() != null )
+        for (NanoLogEntry e : log) {
+            if (e.getPos() != null)
                 cnt++;
+        }
         b.append(tr("NanoLog of {0} lines, {1} of them with coordinates.", log.size(), cnt));
         return b.toString();
@@ -212,7 +217,7 @@
     public void jumpToNextMarker() {
         selectedEntry++;
-        if( selectedEntry < 0 )
+        if (selectedEntry < 0)
             selectedEntry = 0;
-        else if( selectedEntry >= log.size() )
+        else if (selectedEntry >= log.size())
             selectedEntry = log.size() - 1;
         Main.map.repaint();
@@ -222,14 +227,14 @@
     public void jumpToPreviousMarker() {
         selectedEntry--;
-        if( selectedEntry < 0 )
+        if (selectedEntry < 0)
             selectedEntry = 0;
-        else if( selectedEntry >= log.size() )
+        else if (selectedEntry >= log.size())
             selectedEntry = log.size() - 1;
         Main.map.repaint();
     }
 
-    protected void setSelected( int i ) {
+    protected void setSelected(int i) {
         int newSelected = i >= 0 && i < log.size() ? i : -1;
-        if( newSelected != selectedEntry ) {
+        if (newSelected != selectedEntry) {
 //            System.out.println("selected: " + log.get(newSelected).getMessage());
             selectedEntry = newSelected;
@@ -239,10 +244,10 @@
     }
 
-    public void setSelected( NanoLogEntry entry ) {
-        if( entry == null )
+    public void setSelected(NanoLogEntry entry) {
+        if (entry == null)
             setSelected(-1);
         else {
-            for( int i = 0; i < log.size(); i++ ) {
-                if( entry.equals(log.get(i)) ) {
+            for (int i = 0; i < log.size(); i++) {
+                if (entry.equals(log.get(i))) {
                     setSelected(i);
                     break;
@@ -255,20 +260,20 @@
         private int dragging;
 
-        public int nearestEntry( MouseEvent e ) {
+        public int nearestEntry(MouseEvent e) {
             LatLon ll = Main.map.mapView.getLatLon(e.getX(), e.getY());
             int radius = 8;
-            if( ll != null ) {
+            if (ll != null) {
                 LatLon lld = Main.map.mapView.getLatLon(e.getX() + radius, e.getY() + radius);
                 double distance = Math.max(lld.lat() - ll.lat(), lld.lon() - ll.lon());
                 boolean selectedIsSelected = false;
                 int newSelected = -1;
-                for( int i = 0; i < log.size(); i++ ) {
-                    if( log.get(i).getPos() != null && log.get(i).getPos().distance(ll) < distance ) {
+                for (int i = 0; i < log.size(); i++) {
+                    if (log.get(i).getPos() != null && log.get(i).getPos().distance(ll) < distance) {
                         newSelected = i;
-                        if( i == selectedEntry )
+                        if (i == selectedEntry)
                             selectedIsSelected = true;
                     }
                 }
-                if( newSelected >= 0 )
+                if (newSelected >= 0)
                     return selectedIsSelected ? selectedEntry : newSelected;
             }
@@ -277,18 +282,18 @@
 
         @Override
-        public void mouseMoved( MouseEvent e ) {
+        public void mouseMoved(MouseEvent e) {
             int nearest = nearestEntry(e);
-            if( nearest > 0 )
+            if (nearest > 0)
                 setSelected(nearest);
         }
 
         @Override
-        public void mouseDragged( MouseEvent e ) {
+        public void mouseDragged(MouseEvent e) {
             doDrag(e);
         }
 
         @Override
-        public void mouseReleased( MouseEvent e ) {
-            if( dragging > 0 ) {
+        public void mouseReleased(MouseEvent e) {
+            if (dragging > 0) {
                 dragging = 0;
             }
@@ -296,7 +301,7 @@
 
         @Override
-        public void mousePressed( MouseEvent e ) {
+        public void mousePressed(MouseEvent e) {
             int nearest = nearestEntry(e);
-            if( nearest > 0 && Main.getLayerManager().getActiveLayer() == NanoLogLayer.this ) {
+            if (nearest > 0 && Main.getLayerManager().getActiveLayer() == NanoLogLayer.this) {
                 dragging = nearest;
                 doDrag(e);
@@ -304,21 +309,21 @@
         }
 
-        private void doDrag( MouseEvent e ) {
-            if( dragging > 0 )
+        private void doDrag(MouseEvent e) {
+            if (dragging > 0)
                 dragTo(dragging, e.getX(), e.getY());
         }
     }
 
-    protected void dragTo( int entry, int x, int y ) {
+    protected void dragTo(int entry, int x, int y) {
         GpxLayer gpx = GPXChooser.topLayer();
-        if( gpx == null )
+        if (gpx == null)
             return;
         EastNorth eastNorth = Main.map.mapView.getEastNorth(x, y);
         double tolerance = eastNorth.distance(Main.map.mapView.getEastNorth(x + 300, y));
         WayPoint wp = gpx.data.nearestPointOnTrack(eastNorth, tolerance);
-        if( wp == null )
+        if (wp == null)
             return;
         long newTime = Correlator.getGpxDate(gpx.data, wp.getCoor());
-        if( newTime <= 0 )
+        if (newTime <= 0)
             return;
         Correlator.revertPos(log);
@@ -330,11 +335,12 @@
         private boolean toZero;
 
-        public CorrelateEntries( boolean toZero ) {
-            super(toZero ? tr("Correlate with GPX...") : tr("Put on GPX..."), "nanolog/correlate", tr("Correlate entries with GPS trace"), null, false);
+        CorrelateEntries(boolean toZero) {
+            super(toZero ? tr("Correlate with GPX...") : tr("Put on GPX..."), "nanolog/correlate",
+                    tr("Correlate entries with GPS trace"), null, false);
             this.toZero = toZero;
         }
 
         @Override
-        public void actionPerformed( ActionEvent e ) {
+        public void actionPerformed(ActionEvent e) {
             // 1. Select GPX trace or display message to load one
             // (better yet, disable when no GPX traces)
@@ -342,5 +348,5 @@
             // 2. Correlate by default, sticking by date
             // (if does not match, shift so hours-minutes stay)
-            if( layer != null ) {
+            if (layer != null) {
                 long offset = toZero ? 0 : Correlator.crudeMatch(log, layer.data);
                 Correlator.revertPos(log);
@@ -356,10 +362,10 @@
     private class SaveLayer extends JosmAction {
 
-        public SaveLayer() {
+        SaveLayer() {
             super(tr("Save layer..."), "nanolog/save", tr("Save NanoLog layer"), null, false);
         }
 
         @Override
-        public void actionPerformed( ActionEvent e ) {
+        public void actionPerformed(ActionEvent e) {
             // todo
             JOptionPane.showMessageDialog(Main.parent, "Sorry, no saving yet", "NanoLog", JOptionPane.ERROR_MESSAGE);
@@ -367,7 +373,8 @@
     }
 
-    public static interface NanoLogLayerListener {
-        void markersUpdated( NanoLogLayer layer );
-        void markerActivated( NanoLogLayer layer, NanoLogEntry entry );
+    public interface NanoLogLayerListener {
+        void markersUpdated(NanoLogLayer layer);
+
+        void markerActivated(NanoLogLayer layer, NanoLogEntry entry);
     }
 }
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPanel.java	(revision 32638)
@@ -11,6 +11,4 @@
 import javax.swing.JList;
 
-import nanolog.NanoLogLayer.NanoLogLayerListener;
-
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
@@ -20,4 +18,6 @@
 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+
+import nanolog.NanoLogLayer.NanoLogLayerListener;
 
 /**
@@ -40,5 +40,5 @@
     public void updateMarkers() {
         List<NanoLogEntry> entries = new ArrayList<>();
-        for( NanoLogLayer l : Main.getLayerManager().getLayersOfType(NanoLogLayer.class) ) {
+        for (NanoLogLayer l : Main.getLayerManager().getLayersOfType(NanoLogLayer.class)) {
             entries.addAll(l.getEntries());
         }
@@ -53,5 +53,5 @@
     public void layerAdded(LayerAddEvent e) {
         Layer newLayer = e.getAddedLayer();
-        if (newLayer instanceof NanoLogLayer )
+        if (newLayer instanceof NanoLogLayer)
             ((NanoLogLayer) newLayer).addListener(this);
         updateMarkers();
@@ -64,12 +64,12 @@
 
     @Override
-    public void markersUpdated( NanoLogLayer layer ) {
+    public void markersUpdated(NanoLogLayer layer) {
         updateMarkers();
     }
 
     @Override
-    public void markerActivated( NanoLogLayer layer, NanoLogEntry entry ) {
+    public void markerActivated(NanoLogLayer layer, NanoLogEntry entry) {
         int idx = entry == null ? -1 : listModel.find(entry);
-        if( idx >= 0 ) {
+        if (idx >= 0) {
             logPanel.setSelectedIndex(idx);
             Rectangle rect = logPanel.getCellBounds(Math.max(0, idx-2), Math.min(idx+4, listModel.getSize()));
@@ -83,19 +83,19 @@
 
         @Override
-		public int getSize() {
+        public int getSize() {
             return entries.size();
         }
 
         @Override
-		public String getElementAt( int index ) {
+        public String getElementAt(int index) {
             return TIME_FORMAT.format(entries.get(index).getTime()) + " " + entries.get(index).getMessage();
         }
 
-        public void setEntries( List<NanoLogEntry> entries ) {
+        public void setEntries(List<NanoLogEntry> entries) {
             this.entries = entries;
             fireContentsChanged(this, 0, entries.size());
         }
 
-        public int find( NanoLogEntry entry ) {
+        public int find(NanoLogEntry entry) {
             return entries.indexOf(entry);
         }
Index: applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java
===================================================================
--- applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java	(revision 32447)
+++ applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogPlugin.java	(revision 32638)
@@ -18,16 +18,16 @@
 /**
  * Add NanoLog opening menu item and the panel.
- * 
+ *
  * @author zverik
  */
 public class NanoLogPlugin extends Plugin {
-    public NanoLogPlugin( PluginInformation info ) {
+    public NanoLogPlugin(PluginInformation info) {
         super(info);
         Main.main.menu.fileMenu.insert(new OpenNanoLogLayerAction(), 4);
     }
-    
+
     @Override
-    public void mapFrameInitialized( MapFrame oldFrame, MapFrame newFrame ) {
-        if( oldFrame == null && newFrame != null ) {
+    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
+        if (oldFrame == null && newFrame != null) {
             NanoLogPanel panel = new NanoLogPanel();
             newFrame.addToggleDialog(panel);
@@ -35,26 +35,27 @@
         }
     }
-    
+
     private class OpenNanoLogLayerAction extends JosmAction {
 
-        public OpenNanoLogLayerAction() {
+        OpenNanoLogLayerAction() {
             super(tr("Open NanoLog file..."), "nanolog.png", tr("Open NanoLog file..."), null, false);
         }
 
-        public void actionPerformed( ActionEvent e ) {
+        @Override
+        public void actionPerformed(ActionEvent e) {
             JFileChooser fc = new JFileChooser();
-            if( fc.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION ) {
+            if (fc.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) {
                 try {
                     List<NanoLogEntry> entries = NanoLogLayer.readNanoLog(fc.getSelectedFile());
-                    if( !entries.isEmpty() ) {
+                    if (!entries.isEmpty()) {
                         NanoLogLayer layer = new NanoLogLayer(entries);
                         Main.getLayerManager().addLayer(layer);
                         layer.setupListeners();
                     }
-                } catch( IOException ex ) {
+                } catch (IOException ex) {
                     JOptionPane.showMessageDialog(Main.parent, tr("Could not read NanoLog file:") + "\n" + ex.getMessage());
                 }
             }
-        }        
+        }
     }
 }
