diff --git a/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
index bf7a31b..153674e 100644
--- a/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
@@ -288,11 +288,15 @@
 			String url = e.getKey();
 			if (selected == null)
 				selected = url;
-
-			int size = Converter.cnv(Integer.class, e.getValue().get("size"));
-			if (size != 0 && Math.abs(requestedSize - size) < dist) {
-				dist = Math.abs(requestedSize - size);
-				selected = url;
+			if (e.getValue() != null) {
+				String s = e.getValue().get("size");
+				if (s != null) {
+					int size = Converter.cnv(Integer.class, s);
+					if (size != 0 && Math.abs(requestedSize - size) < dist) {
+						dist = Math.abs(requestedSize - size);
+						selected = url;
+					}
+				}
 			}
 		}
 		return selected;
@@ -300,6 +304,6 @@
 
 	public void setConditionalPackage(String string) {
 		set(CONDITIONAL_PACKAGE, string);
-		
+
 	}
 }
diff --git a/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java b/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
index 17b4df3..b153cb9 100755
--- a/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
+++ b/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
@@ -358,6 +358,9 @@
 					Class< ? > c = loader.loadClass(key);
 					Object plugin = c.newInstance();
 					customize(plugin, entry.getValue());
+					if ( plugin instanceof Closeable){
+						addClose((Closeable)plugin);
+					}
 					list.add(plugin);
 				}
 				catch (Throwable t) {
diff --git a/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo b/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo
new file mode 100644
index 0000000..7c8de03
--- /dev/null
+++ b/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo
@@ -0,0 +1 @@
+version 1.0
diff --git a/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java b/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
index 5256594..922b39c 100644
--- a/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
+++ b/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
@@ -147,21 +147,26 @@
 		else
 			version = new Version(versionString);
 
-		reporter.trace("bsn=%s version=%s", bsn, version);
+		if (reporter != null)
+			reporter.trace("bsn=%s version=%s", bsn, version);
 
 		File dir = new File(root, bsn);
 		dir.mkdirs();
 		String fName = bsn + "-" + version.getWithoutQualifier() + ".jar";
 		File file = new File(dir, fName);
 
-		reporter.trace("updating %s ", file.getAbsolutePath());
+		if (reporter != null)
+			reporter.trace("updating %s ", file.getAbsolutePath());
 		if (!file.exists() || file.lastModified() < jar.lastModified()) {
 			jar.write(file);
-			reporter.progress(-1, "updated " + file.getAbsolutePath());
+			if (reporter != null)
+				reporter.progress(-1, "updated " + file.getAbsolutePath());
 			fireBundleAdded(jar, file);
 		} else {
-			reporter.progress(-1, "Did not update " + jar + " because repo has a newer version");
-			reporter.trace("NOT Updating " + fName + " (repo is newer)");
+			if (reporter != null) {
+				reporter.progress(-1, "Did not update " + jar + " because repo has a newer version");
+				reporter.trace("NOT Updating " + fName + " (repo is newer)");
+			}
 		}
 
 		File latest = new File(dir, bsn + "-latest.jar");
diff --git a/bundleplugin/src/main/java/aQute/lib/io/IO.java b/bundleplugin/src/main/java/aQute/lib/io/IO.java
index 183d92a..616dfa4 100644
--- a/bundleplugin/src/main/java/aQute/lib/io/IO.java
+++ b/bundleplugin/src/main/java/aQute/lib/io/IO.java
@@ -222,6 +222,38 @@
 		return sw.toString();
 	}
 
+	/**
+	 * Create a temporary file.
+	 *
+	 * @param directory
+	 *            the directory in which to create the file. Can be null, in
+	 *            which case the system TMP directory is used
+	 * @param pattern
+	 *            the filename prefix pattern. Must be at least 3 characters
+	 *            long
+	 * @param suffix
+	 *            the filename suffix. Can be null, in which case (system)
+	 *            default suffix is used
+	 * @return
+	 * @throws IllegalArgumentException
+	 *             when pattern is null or too short
+	 * @throws IOException
+	 *             when the specified (non-null) directory is not a directory
+	 */
+	public static File createTempFile(File directory, String pattern, String suffix) throws IllegalArgumentException,
+			IOException {
+		if ((pattern == null) || (pattern.length() < 3)) {
+			throw new IllegalArgumentException("Pattern must be at least 3 characters long, got "
+					+ ((pattern == null) ? "null" : pattern.length()));
+		}
+
+		if ((directory != null) && !directory.isDirectory()) {
+			throw new FileNotFoundException("Directory " + directory + " is not a directory");
+		}
+
+		return File.createTempFile(pattern, suffix, directory);
+	}
+
 	public static File getFile(String filename) {
 		return new File(filename.replace("/", File.separator));
 	}
diff --git a/bundleplugin/src/main/java/aQute/lib/io/packageinfo b/bundleplugin/src/main/java/aQute/lib/io/packageinfo
index 897578f..71cb898 100644
--- a/bundleplugin/src/main/java/aQute/lib/io/packageinfo
+++ b/bundleplugin/src/main/java/aQute/lib/io/packageinfo
@@ -1 +1 @@
-version 1.2.0
+version 1.3.0
diff --git a/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java b/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java
index 5dd4990..9dfbaf4 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java
@@ -12,22 +12,22 @@
 	}
 
 	@Override
-	Object decode(boolean s) {
+	Object decode(Decoder dec, boolean s) {
 		return s;
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		return Boolean.parseBoolean(s);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		return s.intValue() != 0;
 	}
 
 	@Override
-	Object decode() {
+	Object decode(Decoder dec) {
 		return false;
 	}
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java b/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java
index d956a6c..957369f 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java
@@ -5,12 +5,16 @@
 import java.util.*;
 
 import aQute.lib.base64.*;
+import aQute.lib.hex.*;
 
 public class ByteArrayHandler extends Handler {
 
 	@Override
 	void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException, Exception {
-		StringHandler.string(app, Base64.encodeBase64((byte[]) object));
+		if ( app.codec.isHex())
+			StringHandler.string(app, Hex.toHexString((byte[]) object));
+		else
+			StringHandler.string(app, Base64.encodeBase64((byte[]) object));
 	}
 
 	@Override
@@ -26,7 +30,10 @@
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
-		return Base64.decodeBase64(s);
+	Object decode(Decoder dec, String s) throws Exception {
+		if ( dec.codec.isHex())
+			return Hex.toByteArray(s);
+		else
+			return Base64.decodeBase64(s);
 	}
 }
diff --git a/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java b/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java
index 23605bf..799f73c 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java
@@ -13,22 +13,22 @@
 	}
 
 	@Override
-	Object decode(boolean s) {
+	Object decode(Decoder dec, boolean s) {
 		return s ? 't' : 'f';
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		return (char) Integer.parseInt(s);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		return (char) s.shortValue();
 	}
 
 	@Override
-	Object decode() {
+	Object decode(Decoder dec) {
 		return 0;
 	}
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java b/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java
index 784fcbe..cb3c27e 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java
@@ -18,14 +18,14 @@
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		synchronized (sdf) {
 			return sdf.parse(s);
 		}
 	}
 
 	@Override
-	Object decode(Number s) throws Exception {
+	Object decode(Decoder dec, Number s) throws Exception {
 		return new Date(s.longValue());
 	}
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java b/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java
index 85aad12..9b5eaf3 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java
@@ -17,8 +17,9 @@
 		StringHandler.string(app, object.toString());
 	}
 
+	@Override
 	@SuppressWarnings("unchecked")
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		return Enum.valueOf(type, s);
 	}
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java b/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java
index c024090..b2c0838 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java
@@ -25,7 +25,8 @@
 		}
 	}
 
-	Object decode(String s) throws Exception {
+	@Override
+	Object decode(Decoder dec, String s) throws Exception {
 		File tmp = File.createTempFile("json", ".bin");
 		FileOutputStream fout = new FileOutputStream(tmp);
 		try {
diff --git a/bundleplugin/src/main/java/aQute/lib/json/Handler.java b/bundleplugin/src/main/java/aQute/lib/json/Handler.java
index c5e8b17..5738b04 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/Handler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/Handler.java
@@ -15,19 +15,19 @@
 		throw new UnsupportedOperationException("Cannot be mapped to array " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") String s) throws Exception {
+	Object decode(Decoder dec, @SuppressWarnings("unused") String s) throws Exception {
 		throw new UnsupportedOperationException("Cannot be mapped to string " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") Number s) throws Exception {
+	Object decode(Decoder dec, @SuppressWarnings("unused") Number s) throws Exception {
 		throw new UnsupportedOperationException("Cannot be mapped to number " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") boolean s) {
+	Object decode(Decoder dec, @SuppressWarnings("unused") boolean s) {
 		throw new UnsupportedOperationException("Cannot be mapped to boolean " + this);
 	}
 
-	Object decode() {
+	Object decode(Decoder dec) {
 		return null;
 	}
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java b/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java
index 8e608f8..47ad4ab 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java
@@ -51,6 +51,7 @@
 	private static ByteArrayHandler					byteh				= new ByteArrayHandler();
 
 	boolean											ignorenull;
+	boolean											useHex;
 
 	/**
 	 * Create a new Encoder with the state and appropriate API.
@@ -191,7 +192,8 @@
 					else if (Map.class.isAssignableFrom(rawClass))
 						h = new MapHandler(rawClass, pt.getActualTypeArguments()[0], pt.getActualTypeArguments()[1]);
 					else if (Dictionary.class.isAssignableFrom(rawClass))
-						h = new MapHandler(Hashtable.class, pt.getActualTypeArguments()[0], pt.getActualTypeArguments()[1]);
+						h = new MapHandler(Hashtable.class, pt.getActualTypeArguments()[0],
+								pt.getActualTypeArguments()[1]);
 					else
 						throw new IllegalArgumentException("Found a parameterized type that is not a map or collection");
 				}
@@ -270,19 +272,19 @@
 				return h.decodeArray(isr);
 
 			case '"' :
-				return h.decode(parseString(isr));
+				return h.decode(isr, parseString(isr));
 
 			case 'n' :
 				isr.expect("ull");
-				return h.decode();
+				return h.decode(isr);
 
 			case 't' :
 				isr.expect("rue");
-				return h.decode(Boolean.TRUE);
+				return h.decode(isr,Boolean.TRUE);
 
 			case 'f' :
 				isr.expect("alse");
-				return h.decode(Boolean.FALSE);
+				return h.decode(isr,Boolean.FALSE);
 
 			case '0' :
 			case '1' :
@@ -295,7 +297,7 @@
 			case '8' :
 			case '9' :
 			case '-' :
-				return h.decode(parseNumber(isr));
+				return h.decode(isr,parseNumber(isr));
 
 			default :
 				throw new IllegalArgumentException("Unexpected character in input stream: " + (char) c);
@@ -486,4 +488,19 @@
 		return ignorenull;
 	}
 
+	/**
+	 * Use hex instead of default base 64 encoding
+	 * 
+	 * @param useHex
+	 * @return
+	 */
+	public JSONCodec setHex(boolean useHex) {
+		this.useHex = useHex;
+		return this;
+	}
+
+	public boolean isHex() {
+		return useHex;
+	}
+
 }
\ No newline at end of file
diff --git a/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java b/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java
index 62bf07f..504bb07 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java
@@ -62,7 +62,7 @@
 			Object key = r.codec.parseString(r);
 			if (!(keyType == null || keyType == Object.class)) {
 				Handler h = r.codec.getHandler(keyType);
-				key = h.decode((String) key);
+				key = h.decode(r,(String) key);
 			}
 
 			c = r.skipWs();
diff --git a/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java b/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java
index 310ca3e..d8e6160 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java
@@ -21,23 +21,23 @@
 	}
 
 	@Override
-	Object decode(boolean s) {
-		return decode(s ? 1d : 0d);
+	Object decode(Decoder dec, boolean s) {
+		return decode(dec,s ? 1d : 0d);
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		double d = Double.parseDouble(s);
-		return decode(d);
+		return decode(dec, d);
 	}
 
 	@Override
-	Object decode() {
-		return decode(0d);
+	Object decode(Decoder dec) {
+		return decode(dec,0d);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		double dd = s.doubleValue();
 
 		if (type == double.class || type == Double.class)
diff --git a/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java b/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java
index bcd05ef..36218c8 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java
@@ -25,7 +25,7 @@
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		if (type == Pattern.class)
 			return Pattern.compile(s);
 
diff --git a/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java b/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java
index 0971826..ba62a13 100644
--- a/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java
+++ b/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java
@@ -59,19 +59,23 @@
 		app.append('"');
 	}
 
-	Object decode(String s) throws Exception {
+	@Override
+	Object decode(Decoder dec, String s) throws Exception {
 		return s;
 	}
 
-	Object decode(Number s) {
+	@Override
+	Object decode(Decoder dec, Number s) {
 		return s.toString();
 	}
 
-	Object decode(boolean s) {
+	@Override
+	Object decode(Decoder dec, boolean s) {
 		return Boolean.toString(s);
 	}
 
-	Object decode() {
+	@Override
+	Object decode(Decoder dec ) {
 		return null;
 	}
 
@@ -87,6 +91,7 @@
 	 * An array can be assigned to a string. This means that the stream is
 	 * interpreted as the array but stored in its complete in the string.
 	 */
+	@Override
 	Object decodeArray(Decoder r) throws Exception {
 		return collect(r, ']');
 	}
