Index: /applications/editors/josm/plugins/piclayer/build.xml
===================================================================
--- /applications/editors/josm/plugins/piclayer/build.xml	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/build.xml	(revision 34544)
@@ -3,5 +3,5 @@
     <property name="commit.message" value="[josm/PicLayer] - #12045 add ability to localize dialog titles"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="13050"/>
+    <property name="plugin.main.version" value="14153"/>
 	
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java	(revision 34544)
@@ -9,5 +9,4 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.actions.mapmode.MapMode;
@@ -151,5 +150,5 @@
     public void layerRemoving(LayerRemoveEvent e) {
         if (e.getRemovedLayer() instanceof PicLayerAbstract && ((PicLayerAbstract) e.getRemovedLayer()).getTransformer().isModified()) {
-            if (JOptionPane.showConfirmDialog(Main.parent, tr("Do you want to save current calibration of layer {0}?",
+            if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(), tr("Do you want to save current calibration of layer {0}?",
                     ((PicLayerAbstract) e.getRemovedLayer()).getPicLayerName()),
                     tr("Select an option"),
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationAction.java	(revision 34544)
@@ -11,6 +11,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.piclayer.layer.CalibrationFileFilter;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
@@ -48,5 +48,5 @@
         fc.setFileFilter(new CalibrationFileFilter());
         fc.setSelectedFile(new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
-        int result = fc.showOpenDialog(Main.parent);
+        int result = fc.showOpenDialog(MainApplication.getMainFrame());
 
         if (result == JFileChooser.APPROVE_OPTION) {
@@ -58,5 +58,5 @@
                 // Error
                 e.printStackTrace();
-                JOptionPane.showMessageDialog(Main.parent,
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
                         tr("Loading file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
             }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationFromWorldAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationFromWorldAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/LoadPictureCalibrationFromWorldAction.java	(revision 34544)
@@ -10,6 +10,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
 
@@ -32,5 +32,5 @@
         JFileChooser fc = new JFileChooser();
         fc.setAcceptAllFileFilterUsed(true);
-        int result = fc.showOpenDialog(Main.parent);
+        int result = fc.showOpenDialog(MainApplication.getMainFrame());
 
         if (result == JFileChooser.APPROVE_OPTION) {
@@ -42,5 +42,5 @@
                 // Error
                 ex.printStackTrace();
-                JOptionPane.showMessageDialog(Main.parent,
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
                         tr("Loading file failed: {0}", ex.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
             }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationAction.java	(revision 34544)
@@ -12,6 +12,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.piclayer.layer.CalibrationFileFilter;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
@@ -47,5 +47,5 @@
         fc.setFileFilter(new CalibrationFileFilter());
         fc.setSelectedFile(new File(m_owner.getPicLayerName() + CalibrationFileFilter.EXTENSION));
-        int result = fc.showSaveDialog(Main.parent);
+        int result = fc.showSaveDialog(MainApplication.getMainFrame());
 
         if (result == JFileChooser.APPROVE_OPTION) {
@@ -66,5 +66,5 @@
                 // Error
                 e.printStackTrace();
-                JOptionPane.showMessageDialog(Main.parent,
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
                         tr("Saving file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
             }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationToWorldAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationToWorldAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/SavePictureCalibrationToWorldAction.java	(revision 34544)
@@ -13,6 +13,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.piclayer.layer.PicLayerAbstract;
 
@@ -63,5 +63,5 @@
         fc.setAcceptAllFileFilterUsed(true);
         fc.setSelectedFile(new File(picFilenameNoext + "." + wext));
-        int result = fc.showSaveDialog(Main.parent);
+        int result = fc.showSaveDialog(MainApplication.getMainFrame());
 
         if (result == JFileChooser.APPROVE_OPTION) {
@@ -83,5 +83,5 @@
                 // Error
                 e.printStackTrace();
-                JOptionPane.showMessageDialog(Main.parent,
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(),
                         tr("Saving file failed: {0}", e.getMessage()), tr("Problem occurred"), JOptionPane.WARNING_MESSAGE);
             }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java	(revision 34544)
@@ -15,5 +15,4 @@
 import javax.swing.filechooser.FileFilter;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
@@ -25,4 +24,5 @@
 import org.openstreetmap.josm.plugins.piclayer.layer.kml.KMLGroundOverlay;
 import org.openstreetmap.josm.plugins.piclayer.layer.kml.KMLReader;
+import org.openstreetmap.josm.spi.preferences.Config;
 
 /**
@@ -88,10 +88,10 @@
 
         // Choose a file
-        JFileChooser fc = new JFileChooser(Main.pref.get(m_lastdirprefname));
+        JFileChooser fc = new JFileChooser(Config.getPref().get(m_lastdirprefname));
         fc.setAcceptAllFileFilterUsed(true);
         fc.setFileFilter(new ImageFileFilter());
 
         fc.setMultiSelectionEnabled(true);
-        int result = fc.showOpenDialog(Main.parent);
+        int result = fc.showOpenDialog(MainApplication.getMainFrame());
 
         // Create a layer?
@@ -109,5 +109,5 @@
                 // TODO: we need a progress bar here, it can take quite some time
 
-                Main.pref.put(m_lastdirprefname, file.getParent());
+                Config.getPref().put(m_lastdirprefname, file.getParent());
 
                 // Create layer from file
@@ -148,5 +148,5 @@
         MainApplication.getMap().mapView.moveLayer(layer, newLayerPos++);
 
-        if (isZoomToLayer && Main.pref.getInt("piclayer.zoom-on-load", 1) != 0) {
+        if (isZoomToLayer && Config.getPref().getInt("piclayer.zoom-on-load", 1) != 0) {
             // if we are loading a single picture file, zoom on it, so that the user can see something
             BoundingXYVisitor v = new BoundingXYVisitor();
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/MovePointAction.java	(revision 34544)
@@ -10,4 +10,5 @@
 import org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -30,5 +31,5 @@
             }
         } catch (NoninvertibleTransformException e1) {
-            e1.printStackTrace();
+            Logging.error(e1);
         }
     }
@@ -46,5 +47,5 @@
             currentCommand.addIfChanged();
         } catch (NoninvertibleTransformException e1) {
-            e1.printStackTrace();
+            Logging.error(e1);
         }
     }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/transform/affine/TransformPointAction.java	(revision 34544)
@@ -10,4 +10,5 @@
 import org.openstreetmap.josm.plugins.piclayer.actions.GenericPicTransformAction;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Logging;
 
 /**
@@ -37,5 +38,5 @@
             currentCommand.addIfChanged();
         } catch (NoninvertibleTransformException e1) {
-            e1.printStackTrace();
+            Logging.error(e1);
         }
     }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/command/TransformCommand.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/command/TransformCommand.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/command/TransformCommand.java	(revision 34544)
@@ -8,6 +8,6 @@
 import javax.swing.Icon;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.Command;
+import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -81,5 +81,5 @@
             !(beforeTransform.getImagePosition().equals(afterTransform.getImagePosition()));
         if (changed && !alreadyAdded) {
-            Main.main.undoRedo.add(this);
+            UndoRedoHandler.getInstance().add(this);
             alreadyAdded = true;
         }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java	(revision 34544)
@@ -18,4 +18,5 @@
 import java.io.InputStreamReader;
 import java.io.Reader;
+import java.nio.charset.StandardCharsets;
 import java.util.Properties;
 
@@ -24,5 +25,4 @@
 import javax.swing.ImageIcon;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
 import org.openstreetmap.josm.data.Bounds;
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapView;
@@ -127,5 +128,5 @@
         }
 
-        projection = Main.getProjection();
+        projection = ProjectionRegistry.getProjection();
     }
 
@@ -462,5 +463,5 @@
 
         try (
-            Reader reader = new InputStreamReader(is);
+            Reader reader = new InputStreamReader(is, StandardCharsets.UTF_8);
             BufferedReader br = new BufferedReader(reader)
         ) {
@@ -480,6 +481,4 @@
                     dy + w/2*ry + h/2*sy
             );
-//            initialImagePosition.setLocation(imagePosition);
-//            m_angle = 0;
             double scalex = 100*sx*getMetersPerEasting(imagePosition);
             double scaley = -100*sy*getMetersPerNorthing(imagePosition);
@@ -613,5 +612,5 @@
             return selected;
         } catch (NoninvertibleTransformException e) {
-            e.printStackTrace();
+            Logging.error(e);
         }
         return selected;
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerFromFile.java	(revision 34544)
@@ -17,5 +17,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.Logging;
 
@@ -181,5 +182,5 @@
     protected boolean confirmCalibrationLoading(String fileName) {
         String prefkey = "piclayer.autoloadcal";
-        String policy = Main.pref.get(prefkey, "");
+        String policy = Config.getPref().get(prefkey, "");
         policy = policy.trim().toLowerCase();
         boolean loadcal = false;
@@ -194,5 +195,5 @@
                             "to control the autoloading of calibration files.", prefkey);
             msg += "\n" + tr("Do you want to apply it ?");
-            int answer = JOptionPane.showConfirmDialog(Main.parent, msg, tr("Load calibration file?"), JOptionPane.YES_NO_OPTION);
+            int answer = JOptionPane.showConfirmDialog(MainApplication.getMainFrame(), msg, tr("Load calibration file?"), JOptionPane.YES_NO_OPTION);
             if (answer == JOptionPane.YES_OPTION) {
                 loadcal = true;
@@ -204,7 +205,7 @@
                             "to control the autoloading of calibration files.", prefkey);
             // TODO: there should be here a yes/no dialog with a checkbox "do not ask again"
-            JOptionPane.showMessageDialog(Main.parent, msg,
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), msg,
                 "Automatic loading of the calibration", JOptionPane.INFORMATION_MESSAGE);
-            Main.pref.put(prefkey, "yes");
+            Config.getPref().put(prefkey, "yes");
             loadcal = true;
         }
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLHandler.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLHandler.java	(revision 34544)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLHandler.java	(revision 34544)
@@ -0,0 +1,72 @@
+package org.openstreetmap.josm.plugins.piclayer.layer.kml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+class KMLHandler extends DefaultHandler {
+
+    private boolean inGroundOverlay = false;
+    private boolean inIcon = false;
+    private boolean inLatLonBox = false;
+    private String value;
+    private List<KMLGroundOverlay> result;
+    private KMLGroundOverlay overlay;
+
+    KMLHandler() {
+        result = new ArrayList<>();
+    }
+
+    @Override
+    public void startElement(String uri, String localName, String qName,
+            Attributes attributes) throws SAXException {
+        if ("GroundOverlay".equals(localName)) {
+            inGroundOverlay = true;
+            overlay = new KMLGroundOverlay();
+        } else if (inGroundOverlay && "Icon".equals(localName)) {
+            inIcon = true;
+        } else if (inGroundOverlay && "LatLonBox".equals(localName)) {
+            inLatLonBox = true;
+        }
+    }
+
+    @Override
+    public void endElement(String uri, String localName, String qName)
+            throws SAXException {
+        if (inGroundOverlay && "name".equals(localName)) {
+            overlay.setName(value.trim());
+        } else if (inIcon && "href".equals(localName)) {
+            overlay.setFileName(value.trim());
+        } else if (inLatLonBox && "north".equals(localName)) {
+            overlay.setNorth(Double.valueOf(value.trim()));
+        } else if (inLatLonBox && "east".equals(localName)) {
+            overlay.setEast(Double.valueOf(value.trim()));
+        } else if (inLatLonBox && "south".equals(localName)) {
+            overlay.setSouth(Double.valueOf(value.trim()));
+        } else if (inLatLonBox && "west".equals(localName)) {
+            overlay.setWest(Double.valueOf(value.trim()));
+        } else if (inLatLonBox && "rotation".equals(localName)) {
+            overlay.setRotate(Double.valueOf(value.trim()));
+        } else if (inLatLonBox && "LatLonBox".equals(localName)) {
+            inLatLonBox = false;
+        } else if (inIcon && "Icon".equals(localName)) {
+            inIcon = false;
+        } else if (inGroundOverlay && "GroundOverlay".equals(localName)) {
+            inGroundOverlay = false;
+            result.add(overlay);
+        }
+    }
+
+    @Override
+    public void characters(char[] ch, int start, int length)
+            throws SAXException {
+        value = new String(ch, start, length);
+    }
+
+    public List<KMLGroundOverlay> getResult() {
+        return result;
+    }
+}
Index: /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java
===================================================================
--- /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java	(revision 34543)
+++ /applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/kml/KMLReader.java	(revision 34544)
@@ -5,12 +5,10 @@
 import java.io.FileReader;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.List;
 
-import org.xml.sax.Attributes;
+import org.openstreetmap.josm.tools.Logging;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
 import org.xml.sax.helpers.XMLReaderFactory;
 
@@ -30,8 +28,6 @@
             xr.setContentHandler(handler);
             xr.parse(new InputSource(new FileReader(file)));
-        } catch (SAXException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (SAXException | IOException e) {
+            Logging.error(e);
         }
         groundOverlays = handler.getResult();
@@ -42,66 +38,2 @@
     }
 }
-
-class KMLHandler extends DefaultHandler {
-
-    private boolean inGroundOverlay = false;
-    private boolean inIcon = false;
-    private boolean inLatLonBox = false;
-    private String value;
-    private List<KMLGroundOverlay> result;
-    private KMLGroundOverlay overlay;
-
-    KMLHandler() {
-        result = new ArrayList<>();
-    }
-
-    @Override
-    public void startElement(String uri, String localName, String qName,
-            Attributes attributes) throws SAXException {
-        if ("GroundOverlay".equals(localName)) {
-            inGroundOverlay = true;
-            overlay = new KMLGroundOverlay();
-        } else if (inGroundOverlay && "Icon".equals(localName)) {
-            inIcon = true;
-        } else if (inGroundOverlay && "LatLonBox".equals(localName)) {
-            inLatLonBox = true;
-        }
-    }
-
-    @Override
-    public void endElement(String uri, String localName, String qName)
-            throws SAXException {
-        if (inGroundOverlay && "name".equals(localName)) {
-            overlay.setName(value.trim());
-        } else if (inIcon && "href".equals(localName)) {
-            overlay.setFileName(value.trim());
-        } else if (inLatLonBox && "north".equals(localName)) {
-            overlay.setNorth(Double.valueOf(value.trim()));
-        } else if (inLatLonBox && "east".equals(localName)) {
-            overlay.setEast(Double.valueOf(value.trim()));
-        } else if (inLatLonBox && "south".equals(localName)) {
-            overlay.setSouth(Double.valueOf(value.trim()));
-        } else if (inLatLonBox && "west".equals(localName)) {
-            overlay.setWest(Double.valueOf(value.trim()));
-        } else if (inLatLonBox && "rotation".equals(localName)) {
-            overlay.setRotate(Double.valueOf(value.trim()));
-        } else if (inLatLonBox && "LatLonBox".equals(localName)) {
-            inLatLonBox = false;
-        } else if (inIcon && "Icon".equals(localName)) {
-            inIcon = false;
-        } else if (inGroundOverlay && "GroundOverlay".equals(localName)) {
-            inGroundOverlay = false;
-            result.add(overlay);
-        }
-    }
-
-    @Override
-    public void characters(char[] ch, int start, int length)
-            throws SAXException {
-        value = new String(ch, start, length);
-    }
-
-    public List<KMLGroundOverlay> getResult() {
-        return result;
-    }
-}
