Index: references/pom.xml
===================================================================
--- references/pom.xml	(revision 30)
+++ references/pom.xml	(revision 31)
@@ -6,5 +6,5 @@
 	<groupId>geniusweb</groupId>
 	<artifactId>references</artifactId>
-	<version>1.5.9</version> <!-- must equal ${geniusweb.version} -->
+	<version>1.6.0</version> <!-- must equal ${geniusweb.version} -->
 	<packaging>jar</packaging>
 
@@ -17,5 +17,5 @@
 		<passwd>${env.ARTIFACTORY_PASS}</passwd>
 		<jackson-2-version>2.9.10</jackson-2-version>
-		<geniusweb.version>1.5.9</geniusweb.version>
+		<geniusweb.version>1.6.0</geniusweb.version>
 	</properties>
 
Index: references/src/main/java/geniusweb/connection/DefaultConnection.java
===================================================================
--- references/src/main/java/geniusweb/connection/DefaultConnection.java	(revision 30)
+++ references/src/main/java/geniusweb/connection/DefaultConnection.java	(revision 31)
@@ -10,6 +10,6 @@
  * connection that something came in from the other side.
  *
- * @param INTYPE  the datatype of objects received from the other side
- * @param OUTTYPE the datatype of objects sent to the other side.
+ * @param <INTYPE>  the datatype of objects received from the other side
+ * @param <OUTTYPE> the datatype of objects sent to the other side.
  */
 public abstract class DefaultConnection<INTYPE, OUTTYPE> extends
Index: references/src/main/java/geniusweb/references/Parameters.java
===================================================================
--- references/src/main/java/geniusweb/references/Parameters.java	(revision 30)
+++ references/src/main/java/geniusweb/references/Parameters.java	(revision 31)
@@ -2,4 +2,7 @@
 
 import java.util.HashMap;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
 
 /**
@@ -9,5 +12,55 @@
  *
  */
-public class Parameters extends HashMap<String, Object> {
+public class Parameters {
+
+	@JsonValue
+	private final HashMap<String, Object> params = new HashMap<>();
+
+	public Parameters() {
+	}
+
+	@JsonCreator
+	public Parameters(HashMap<String, Object> vals) {
+		params.putAll(vals);
+	}
+
+	/**
+	 * 
+	 * @param key the key to get the value for.
+	 * @return the raw value
+	 */
+	public Object get(String key) {
+		return params.get(key);
+	}
+
+	/**
+	 * 
+	 * @return true iff params is empty
+	 */
+	public boolean isEmpty() {
+		return params.isEmpty();
+	}
+
+	/**
+	 * 
+	 * @param key the key to be checked
+	 * @return true iff params contains the given key
+	 */
+	public boolean containsKey(String key) {
+		return params.containsKey(key);
+	}
+
+	/**
+	 * 
+	 * @param key the key. Key may already in params.
+	 * @param val the new value for the key
+	 * @return new Parameters , which is copy of this but with key-value pair
+	 *         added/overridden
+	 */
+	public Parameters with(String key, Object val) {
+		HashMap<String, Object> newparams = new HashMap<String, Object>(params);
+		newparams.put(key, val);
+		return new Parameters(newparams);
+	}
 
 	/**
@@ -22,8 +75,21 @@
 	@SuppressWarnings("unchecked")
 	public <T> T get(String paramname, Class<T> classType) {
-		if (!containsKey(paramname) || !(classType.isInstance(get(paramname))))
+		if (!params.containsKey(paramname)
+				|| !(classType.isInstance(params.get(paramname))))
 			throw new IllegalArgumentException(" Missing a parameter "
 					+ paramname + " with a " + classType.getName() + " value");
-		return (T) get(paramname);
+		return (T) params.get(paramname);
+	}
+
+	/**
+	 * 
+	 * @param parameters the parameters to be added/overridden
+	 * @return new Parameters, with new parameters ADDED to existing. The new
+	 *         parameters override existing ones.
+	 */
+	public Parameters with(Parameters parameters) {
+		HashMap<String, Object> newparams = new HashMap<String, Object>(params);
+		newparams.putAll(parameters.params);
+		return new Parameters(newparams);
 	}
 
@@ -41,7 +107,7 @@
 	public Double getDouble(String name, Double defaultval, Double min,
 			Double max) {
-		if (!containsKey(name) || !(get(name) instanceof Double))
+		if (!params.containsKey(name) || !(params.get(name) instanceof Double))
 			return defaultval;
-		Double val = (Double) get(name);
+		Double val = (Double) params.get(name);
 		if (min != null && val < min)
 			return defaultval;
@@ -50,3 +116,34 @@
 		return val;
 	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((params == null) ? 0 : params.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Parameters other = (Parameters) obj;
+		if (params == null) {
+			if (other.params != null)
+				return false;
+		} else if (!params.equals(other.params))
+			return false;
+		return true;
+	}
+
+	@Override
+	public String toString() {
+		return params.toString();
+	}
+
 }
Index: references/src/main/java/geniusweb/references/PartyWithParameters.java
===================================================================
--- references/src/main/java/geniusweb/references/PartyWithParameters.java	(revision 30)
+++ references/src/main/java/geniusweb/references/PartyWithParameters.java	(revision 31)
@@ -48,4 +48,13 @@
 	}
 
+	/**
+	 * 
+	 * @param parameters2 the additional parameters
+	 * @return this party but with the given parameters added to our parameters
+	 */
+	public PartyWithParameters with(Parameters parameters2) {
+		return new PartyWithParameters(partyref, parameters.with(parameters2));
+	}
+
 	@Override
 	public boolean equals(Object obj) {
Index: references/src/test/java/geniusweb/references/ParametersTest.java
===================================================================
--- references/src/test/java/geniusweb/references/ParametersTest.java	(revision 30)
+++ references/src/test/java/geniusweb/references/ParametersTest.java	(revision 31)
@@ -2,9 +2,10 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.List;
 
-import org.junit.Before;
 import org.junit.Test;
 
@@ -15,11 +16,6 @@
 	private final Parameters params1 = new Parameters();
 	private final Parameters params1a = new Parameters();
-	private final Parameters params2 = new Parameters();
-
-	@Before
-	public void before() {
-		params2.put("a", 1);
-		params2.put("b", 2d);
-	}
+	private final Parameters params2 = new Parameters().with("a", 1).with("b",
+			2d);
 
 	@Override
@@ -67,3 +63,34 @@
 
 	}
+
+	@Test
+	public void withTest() {
+		Parameters p = params2.with("a", 2);
+		assertEquals(1, params2.get("a"));
+		assertEquals(2d, params2.get("b"));
+		assertEquals(2, p.get("a"));
+		assertEquals(2d, p.get("b"));
+	}
+
+	@Test
+	public void withParamsTest() {
+		Parameters upd = new Parameters().with("a", 2);
+		Parameters p = params2.with(upd);
+		assertEquals(1, params2.get("a"));
+		assertEquals(2d, params2.get("b"));
+		assertEquals(2, p.get("a"));
+		assertEquals(2d, p.get("b"));
+	}
+
+	@Test
+	public void isEmptyTest() {
+		assertTrue(params1.isEmpty());
+		assertFalse(params2.isEmpty());
+	}
+
+	@Test
+	public void containsKeyTest() {
+		assertTrue(params2.containsKey("a"));
+		assertFalse(params2.containsKey("c"));
+	}
 }
Index: references/src/test/java/geniusweb/references/PartiWithParamsTest.java
===================================================================
--- references/src/test/java/geniusweb/references/PartiWithParamsTest.java	(revision 30)
+++ references/src/test/java/geniusweb/references/PartiWithParamsTest.java	(revision 31)
@@ -32,6 +32,5 @@
 		party2 = new PartyRef(new URI("ws:party2"));
 		param1 = new Parameters();
-		param2 = new Parameters();
-		param2.put("a", 1);
+		param2 = new Parameters().with("a", 1);
 		party1param1 = new PartyWithParameters(party1, param1);
 		party1param1a = new PartyWithParameters(party1, param1);
Index: references/src/test/java/geniusweb/references/PartyWithProfileTest.java
===================================================================
--- references/src/test/java/geniusweb/references/PartyWithProfileTest.java	(revision 30)
+++ references/src/test/java/geniusweb/references/PartyWithProfileTest.java	(revision 31)
@@ -38,6 +38,5 @@
 
 		Parameters settings1 = new Parameters();
-		Parameters settings2 = new Parameters();
-		settings2.put("a", 1);
+		Parameters settings2 = new Parameters().with("a", 1);
 
 		PartyWithParameters party1withparams1 = new PartyWithParameters(party1,
