Index: applications/editors/josm/plugins/smed2/js57toosm/build.xml
===================================================================
--- applications/editors/josm/plugins/smed2/js57toosm/build.xml	(revision 30189)
+++ applications/editors/josm/plugins/smed2/js57toosm/build.xml	(revision 30190)
@@ -2,5 +2,5 @@
   <property name="src" location="src"/>
   <property name="build" location="build"/>
-  <property name="dist"  location="dist"/>
+  <property name="jarfile" location="./js57toosm.jar"/>
 
   <target name="init">
@@ -13,7 +13,8 @@
 
   <target name="dist" depends="compile" description="generate the distribution" >
-    <jar jarfile="./js57toosm.jar" basedir="${build}" >
+    <jar jarfile="${jarfile}" basedir="${build}" >
       <manifest>
-        <attribute name="Main-Class" value="Js57toosm"/>
+        <attribute name="Main-Class" value="js57toosm.Js57toosm"/>
+        <attribute name="Class-Path" value="$jarfile"/>
       </manifest>
     </jar>
@@ -22,6 +23,5 @@
   <target name="clean" description="clean up" >
     <delete dir="${build}"/>
-    <delete dir="${dist}"/>
-    <delete file="./js57toosm.jar"/>
+    <delete file="${jarfile}"/>
   </target>
 </project>
Index: applications/editors/josm/plugins/smed2/src/render/Renderer.java
===================================================================
--- applications/editors/josm/plugins/smed2/src/render/Renderer.java	(revision 30189)
+++ applications/editors/josm/plugins/smed2/src/render/Renderer.java	(revision 30190)
@@ -307,4 +307,6 @@
 			}
 			break;
+		default:
+			break;
 		}
 		if (style.line != null) {
@@ -385,4 +387,6 @@
 	    g2.fill(p);
 	    break;
+		default:
+			break;
 		}
 	}
Index: applications/editors/josm/plugins/smed2/src/render/Signals.java
===================================================================
--- applications/editors/josm/plugins/smed2/src/render/Signals.java	(revision 30189)
+++ applications/editors/josm/plugins/smed2/src/render/Signals.java	(revision 30190)
@@ -19,5 +19,4 @@
 import s57.S57val.*;
 import s57.S57map.*;
-import render.Renderer.*;
 import symbols.Beacons;
 import symbols.Topmarks;
Index: applications/editors/josm/plugins/smed2/src/s57/S57dat.java
===================================================================
--- applications/editors/josm/plugins/smed2/src/s57/S57dat.java	(revision 30189)
+++ applications/editors/josm/plugins/smed2/src/s57/S57dat.java	(revision 30190)
@@ -165,5 +165,5 @@
 	}
 
-	public static Object getSubf(S57subf subf) {
+	private static S57conv findSubf(S57subf subf) {
 		ArrayList<S57subf> subs = fields.get(field);
 		boolean wrap = false;
@@ -181,35 +181,5 @@
 			S57conv conv = convs.get(sub);
 			if (sub == subf) {
-				if (conv.bin == 0) {
-					String str = "";
-					if (conv.asc == 0) {
-						while (buffer[offset] != 0x1f) {
-							str += buffer[offset++];
-						}
-					} else {
-						str = new String(buffer, offset, conv.asc);
-						offset += conv.asc;
-					}
-					return str;
-				} else {
-					int f = Math.abs(conv.bin);
-					if (f < 8) {
-						long val = buffer[offset + --f];
-						if (conv.bin > 0)
-							val &= 0xff;
-						while (f > 0) {
-							val = (val << 8) + (buffer[offset + --f] & 0xff);
-						}
-						offset += Math.abs(conv.bin);
-						return val;
-					} else {
-						f /= 8;
-						long val = 0;
-						for (int i = 0; i < f; i++) {
-							val = (val << 8) + (buffer[offset++] & 0xff);
-						}
-						return val;
-					}
-				}
+				return conv;
 			} else {
 				offset += (conv.bin != 0) ? ((conv.bin < 8) ? Math.abs(conv.bin) : conv.bin / 8) : conv.asc;
@@ -217,4 +187,58 @@
 		}
 	}
-
+	
+	public static Object getSubf(S57subf subf) {
+		S57conv conv = findSubf(subf);
+		if (conv.bin == 0) {
+			String str = "";
+			if (conv.asc == 0) {
+				while (buffer[offset] != 0x1f) {
+					str += buffer[offset++];
+				}
+			} else {
+				str = new String(buffer, offset, conv.asc);
+				offset += conv.asc;
+			}
+			return str;
+		} else {
+			int f = Math.abs(conv.bin);
+			if (f < 8) {
+				long val = buffer[offset + --f];
+				if (conv.bin > 0)
+					val &= 0xff;
+				while (f > 0) {
+					val = (val << 8) + (buffer[offset + --f] & 0xff);
+				}
+				offset += Math.abs(conv.bin);
+				return val;
+			} else {
+				f /= 8;
+				long val = 0;
+				for (int i = 0; i < f; i++) {
+					val = (val << 8) + (buffer[offset++] & 0xff);
+				}
+				return val;
+			}
+		}
+	}
+
+	public static void putSubf(byte[] buf, int off, S57field fld, S57subf subf, Object val) {
+		buffer = buf;
+		offset = off;
+		index = 0;
+		putSubf(fld, subf, val);
+	}
+	
+	public static void putSubf(S57field fld, S57subf subf, Object val) {
+		field = fld;
+		index = 0;
+		putSubf(subf, val);
+	}
+
+	public static void putSubf(S57subf subf, Object val) {
+		S57conv conv = findSubf(subf);
+		if (conv.bin == 0) {
+		} else {
+		}
+	}
 }
