Index: java/GraphTest.java
===================================================================
--- java/GraphTest.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/GraphTest.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -6,5 +6,4 @@
 import net.deterlab.abac.Credential;
 import net.deterlab.abac.Context;
-import net.deterlab.abac.Query;
 import net.deterlab.abac.Role;
 import net.deterlab.abac.Identity;
Index: java/net/deterlab/abac/Context.java
===================================================================
--- java/net/deterlab/abac/Context.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/net/deterlab/abac/Context.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -15,4 +15,6 @@
 import java.security.cert.*;
 
+import org.bouncycastle.asn1.*;
+import org.bouncycastle.asn1.x509.*;
 import org.bouncycastle.x509.*;
 import org.bouncycastle.x509.util.*;
@@ -415,5 +417,5 @@
 		    else if (o instanceof KeyPair ) {
 			KeyPair kp = (KeyPair) o;
-			String kid = Identity.extractKeyID(kp.getPublic());
+			String kid = extractKeyID(kp.getPublic());
 
 			if (ids.containsKey(kid)) {
@@ -539,5 +541,5 @@
 		    else if (o instanceof KeyPair ) {
 			KeyPair kp = (KeyPair) o;
-			String kid = Identity.extractKeyID(kp.getPublic());
+			String kid = extractKeyID(kp.getPublic());
 
 			if (ids.containsKey(kid)) {
@@ -605,3 +607,37 @@
     }
 
+    /**
+     * Get to the SHA1 hash of the key.
+     */
+    public static String extractKeyID(PublicKey k) {
+	SubjectPublicKeyInfo ki = extractSubjectPublicKeyInfo(k);
+	SubjectKeyIdentifier id = 
+	    SubjectKeyIdentifier.createSHA1KeyIdentifier(ki);
+
+	// Now format it into a string for keeps
+	Formatter fmt = new Formatter(new StringWriter());
+	for (byte b: id.getKeyIdentifier())
+	    fmt.format("%02x", b);
+	return fmt.out().toString();
+    }
+
+    /**
+     * Extratct the SubjectPublicKeyInfo.  Useful for some other encryptions,
+     * notably Certificate.make_cert().
+     */
+    public static SubjectPublicKeyInfo extractSubjectPublicKeyInfo(
+	    PublicKey k) {
+	ASN1Sequence seq = null;
+	try {
+	    seq = (ASN1Sequence) new ASN1InputStream(
+		    k.getEncoded()).readObject();
+	}
+	catch (IOException ie) {
+	    // Badly formatted key??
+	    return null;
+	}
+	return new SubjectPublicKeyInfo(seq);
+    }
+
+
 }
Index: java/net/deterlab/abac/Credential.java
===================================================================
--- java/net/deterlab/abac/Credential.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/net/deterlab/abac/Credential.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -26,4 +26,9 @@
     protected static String authKeyOID = "2.5.29.35";
 
+    private Role m_head;
+    private Role m_tail;
+    private X509V2AttributeCertificate ac;
+    private Identity id;
+
     /**
      * A dummy credential.
@@ -31,6 +36,6 @@
     public Credential() {
 	m_head = m_tail = null;
-	m_ac = null;
-	m_id = null;
+	ac = null;
+	id = null;
     }
     /**
@@ -42,6 +47,6 @@
         m_head = head;
         m_tail = tail;
-	m_ac = null; 
-	m_id = null;
+	ac = null; 
+	id = null;
     }
 
@@ -53,5 +58,5 @@
         X509AttrCertParser parser = new X509AttrCertParser();
         parser.engineInit(stream);
-        m_ac = (X509V2AttributeCertificate)parser.engineRead();
+        ac = (X509V2AttributeCertificate)parser.engineRead();
     }
 
@@ -60,23 +65,25 @@
 	    throws Exception {
 	read_certificate(stream);
-	if (m_ac == null) throw new IOException("Unknown Format");
+	if (ac == null) throw new IOException("Unknown Format");
 	init(ids);
     }
 
     protected void init(Collection<Identity> ids) 
-	    throws CertificateException, InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException,SignatureException {
-	for (Identity id: ids) {
+	    throws CertificateException, InvalidKeyException, 
+		NoSuchAlgorithmException, NoSuchProviderException,
+		SignatureException {
+	for (Identity i: ids) {
 	    try {
-		m_ac.verify(id.getCertificate().getPublicKey(), "BC");
-		m_id = id;
+		ac.verify(i.getCertificate().getPublicKey(), "BC");
+		id = i;
 		break;
 	    }
 	    catch (InvalidKeyException e) { }
 	}
-	if (m_id == null) throw new InvalidKeyException("Unknown identity");
+	if (id == null) throw new InvalidKeyException("Unknown identity");
 
         load_roles();
 
-	if (!m_id.getKeyID().equals(m_head.issuer_part()))
+	if (!id.getKeyID().equals(m_head.issuer_part()))
 	    throw new InvalidKeyException("Unknown identity");
     }
@@ -103,5 +110,5 @@
     public Credential(X509V2AttributeCertificate c, Collection<Identity> ids) 
 	throws Exception {
-	m_ac = c;
+	ac = c;
 	init(ids);
     }
@@ -114,5 +121,5 @@
     public void make_cert(Identity i) {
 	PrivateKey key = i.getKeyPair().getPrivate();
-	SubjectPublicKeyInfo pki = Identity.extractSubjectPublicKeyInfo(
+	SubjectPublicKeyInfo pki = Context.extractSubjectPublicKeyInfo(
 		i.getKeyPair().getPublic());
 	X509V2AttributeCertificateGenerator gen = 
@@ -138,5 +145,5 @@
 		    new AuthorityKeyIdentifier(pki));
 	    // Create the cert.
-	    m_ac = (X509V2AttributeCertificate) gen.generate(key, "BC");
+	    ac = (X509V2AttributeCertificate) gen.generate(key, "BC");
 	}
 	catch (Exception e) { 
@@ -152,5 +159,5 @@
         String roles = null;
         try {
-            X509Attribute attr = m_ac.getAttributes()[0];
+            X509Attribute attr = ac.getAttributes()[0];
 
             DERSequence    java     = (DERSequence)attr.getValues()[0];
@@ -161,5 +168,5 @@
         }
         catch (Exception e) {
-            throw new RuntimeException("Your attribute certificate is funky and I'm not gonna debug it", e);
+            throw new RuntimeException("Badly formatted certificate");
         }
 
@@ -199,21 +206,15 @@
      * Get the head role from the credential.
      */
-    public Role head() {
-        return m_head;
-    }
+    public Role head() { return m_head; }
 
     /**
      * Get the tail role from the credential
      */
-    public Role tail() {
-        return m_tail;
-    }
+    public Role tail() { return m_tail; }
 
     /**
      * Gets the cert associated with this credential (if any).
      */
-    public X509V2AttributeCertificate cert() {
-        return m_ac;
-    }
+    public X509V2AttributeCertificate cert() { return ac; }
 
     /**
@@ -230,5 +231,5 @@
 
     public void write(OutputStream s) throws IOException {
-	s.write(m_ac.getEncoded());
+	s.write(ac.getEncoded());
 	s.flush();
     }
@@ -238,12 +239,8 @@
     }
 
-    public boolean hasCertificate() { return m_ac != null; }
-
-    public Identity getID() { return m_id; }
-
-private Role m_head, m_tail;
-
-private X509V2AttributeCertificate m_ac;
-private Identity m_id;
+    public boolean hasCertificate() { return ac != null; }
+
+    public Identity getID() { return id; }
+
 
 }
Index: java/net/deterlab/abac/Identity.java
===================================================================
--- java/net/deterlab/abac/Identity.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/net/deterlab/abac/Identity.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -20,7 +20,7 @@
 
 public class Identity implements Comparable {
-    private X509Certificate m_cert;
-    private String m_keyid;
-    private String m_cn;
+    private X509Certificate cert;
+    private String keyid;
+    private String cn;
     private KeyPair kp;
 
@@ -38,5 +38,5 @@
 
 	    if (c instanceof X509Certificate) {
-		if ( m_cn == null ) 
+		if ( cn == null ) 
 		    init((X509Certificate)c);
 		else
@@ -59,11 +59,11 @@
 	CertificateException, NoSuchAlgorithmException,InvalidKeyException,
 	NoSuchProviderException, SignatureException, IOException {
-	    m_cert = (X509Certificate) c;
-	    m_cert.verify(m_cert.getPublicKey());
+	    cert = (X509Certificate) c;
+	    cert.verify(cert.getPublicKey());
 	    // Cert is valid, fill in the CN and keyid
-	    m_keyid = extractKeyID(m_cert.getPublicKey());
-	    m_cn = m_cert.getSubjectDN().getName();
+	    keyid = Context.extractKeyID(cert.getPublicKey());
+	    cn = cert.getSubjectDN().getName();
 	    /// XXX: better parse
-	    if (m_cn.startsWith("CN=")) m_cn = m_cn.substring(3);
+	    if (cn.startsWith("CN=")) cn = cn.substring(3);
     }
 
@@ -179,5 +179,5 @@
 	PEMWriter pw = new PEMWriter(w);
 
-	pw.writeObject(m_cert);
+	pw.writeObject(cert);
 	pw.flush();
     }
@@ -206,44 +206,11 @@
 
 
-    /**
-     * Get to the SHA1 hash of the key.
-     */
-    public static String extractKeyID(PublicKey k) {
-	SubjectPublicKeyInfo ki = extractSubjectPublicKeyInfo(k);
-	SubjectKeyIdentifier id = 
-	    SubjectKeyIdentifier.createSHA1KeyIdentifier(ki);
-
-	// Now format it into a string for keeps
-	Formatter fmt = new Formatter(new StringWriter());
-	for (byte b: id.getKeyIdentifier())
-	    fmt.format("%02x", b);
-	return fmt.out().toString();
-    }
-
-    /**
-     * Extratct the SubjectPublicKeyInfo.  Useful for some other encryptions,
-     * notably Certificate.make_cert().
-     */
-    public static SubjectPublicKeyInfo extractSubjectPublicKeyInfo(PublicKey k) {
-	ASN1Sequence seq = null;
-	try {
-	    seq = (ASN1Sequence) new ASN1InputStream(
-		    k.getEncoded()).readObject();
-	}
-	catch (IOException ie) {
-	    // Badly formatted key??
-	    return null;
-	}
-	return new SubjectPublicKeyInfo(seq);
-    }
-
-
     // Accessors
-    public String getKeyID() { return m_keyid; }
-    public String getName() { return m_cn; }
+    public String getKeyID() { return keyid; }
+    public String getName() { return cn; }
     public String toString() { 
-	String s = m_keyid + " (" + m_cn ;
-
-	if (m_keyid != null ) s += " [keyed]";
+	String s = keyid + " (" + cn ;
+
+	if (keyid != null ) s += " [keyed]";
 	s += ")";
 	return s;
@@ -255,8 +222,8 @@
      */
     public void setKeyPair(KeyPair k) {
-	if (m_keyid != null) {
-	    String kid = extractKeyID(k.getPublic());
-
-	    if ( kid != null && kid.equals(m_keyid)) kp = k;
+	if (keyid != null) {
+	    String kid = Context.extractKeyID(k.getPublic());
+
+	    if ( kid != null && kid.equals(keyid)) kp = k;
 	    else 
 		throw new IllegalArgumentException(
@@ -275,5 +242,5 @@
 	else return getKeyID().compareTo(((Identity)o).getKeyID());
     }
-    public X509Certificate getCertificate() { return m_cert; }
+    public X509Certificate getCertificate() { return cert; }
 
 };
Index: java/net/deterlab/abac/Query.java
===================================================================
--- java/net/deterlab/abac/Query.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/net/deterlab/abac/Query.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -12,5 +12,5 @@
  * well as reachability in either direction. See the run method for details.
  */
-public class Query {
+class Query {
     private Graph<Role,Credential> g;
     private int vertex_count;
Index: java/net/deterlab/abac/Role.java
===================================================================
--- java/net/deterlab/abac/Role.java	(revision 418b58675a3e732dddb30dc4c556fe250c8c16d1)
+++ java/net/deterlab/abac/Role.java	(revision 05953726ec721137e596dd936e8ee15f70ba66a9)
@@ -14,9 +14,4 @@
     private String m_prefix;
     private Role[] m_prereqs;
-
-    protected static TreeMap<String, String> nicknames = 
-	new TreeMap<String, String>();
-    protected static TreeMap<String, String> keys = 
-	new TreeMap<String, String>();
 
     /**
