	public void StartClient(int SERVERpassedPort, String SERVERpassedTarget, int DROPOFFpassedPort,
			String DROPOFFpassedTarget) {
		ServerNetwork = new Networking(mylog, SERVERpassedPort, SERVERpassedTarget);
		Socket ServerSock = ServerNetwork.PassBackClient();
		ServerNetwork.BringUp(ServerSock);
		DropOffNetwork = new Networking(mylog, SERVERpassedPort, SERVERpassedTarget);
		Socket DropOffSock = DropOffNetwork.PassBackClient();
		DropOffNetwork.BringUp(DropOffSock);
		String UserInput = null;
		String ServerResponse = null;
		String OS = (String) clientSession.getAttribute("OS");
		String SecLev = (String) clientSession.getAttribute("SecurityLevel");
		String ClientID = (String) clientSession.getAttribute("ID");
		DisplayMenu();
		System.out.println("Connected to server [" + SERVERpassedTarget + "] on port [" + SERVERpassedPort + "]");
		crypt = new Crypto(mylog, subject.GetPSK());
		String rawTest = "Testing!!!12345";
		byte[] testdata = crypt.encrypt(rawTest); 
		ServerNetwork.Send(testdata); 
		byte[] fetched = ServerNetwork.ReceiveByte(); 
		String dec = crypt.decrypt(fetched); 
		if (dec.equals(rawTest + "<S>")) {
			mylog.out("INFO", "Functional bi-directional encryption established. (Server)");
		} else {
			mylog.out("ERROR", "Failed to establish a functional encrypted channel! (Server)");
			mylog.out("ERROR", "Expected [" + rawTest + "<S>" + "] but recieved [" + dec + "] (Server)");
			ServerNetwork.BringDown();
			try {
				ServerSock.close();
			} catch (IOException e) {
				mylog.out("ERROR", "Failed to close client socket (Server)");
			}
			System.exit(0);
		}
		DropOffNetwork.Send(testdata); 
		fetched = DropOffNetwork.ReceiveByte(); 
		dec = crypt.decrypt(fetched); 
		if (dec.equals(rawTest + "<S>")) {
			mylog.out("INFO", "Functional bi-directional encryption established. (Drop Off)");
		} else {
			mylog.out("ERROR", "Failed to establish a functional encrypted channel! (Drop Off)");
			mylog.out("ERROR", "Expected [" + rawTest + "<S>" + "] but recieved [" + dec + "] (Drop Off)");
			DropOffNetwork.BringDown();
			try {
				ServerSock.close();
			} catch (IOException e) {
				mylog.out("ERROR", "Failed to close client socket (Drop Off)");
			}
			System.exit(0);
		}
		DHrekey(ServerNetwork);
		DHrekey(DropOffNetwork);
		UserInput = readUI();
		int MaxBeforeREKEY = 100;
		int Current = 0;
		boolean serverUp = true;
		boolean flagJob = false;
		boolean noSend = false;
		while ((UserInput != null) && (UserInput.compareToIgnoreCase("quit") != 0) && (ServerSock.isConnected())
				&& (DropOffSock.isConnected())) {
			if (!noSend) {
				ServerNetwork.Send(crypt.encrypt(UserInput));
				fetched = ServerNetwork.ReceiveByte();
				ServerResponse = crypt.decrypt(fetched);
				if (ServerResponse == null) {
					mylog.out("WARN", "Server disconected");
					serverUp = false;
					break;
				}
			} else {
				noSend = false;
			}
			if (flagJob) {
				if (ServerResponse.length() > 0) {
					System.out.println("JobIn:[" + ServerResponse + "]");
					if (OS.contains("Windows")) {
						ServerResponse = "cmd /C " + ServerResponse;
					}
					try {
						Runtime rt = Runtime.getRuntime();
						Process proc = rt.exec(ServerResponse);
						StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
						StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
						errorGobbler.start();
						outputGobbler.start();
						int exitVal = 0;
						try {
							exitVal = proc.waitFor();
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
						System.out.println("ExitValue: " + exitVal);
					} catch (IOException e) {
						e.printStackTrace();
					}
					System.out.println("JobOut:[" + ServerResponse + "]");
				} else {
					System.out.println("Job:[No jobs available]");
				}
				flagJob = false;
			} else {
				System.out.println(ServerResponse);
			}
			UserInput = readUI().toLowerCase();
			if ((UserInput.contains("rekey")) && serverUp) {
				UserInput = "Rekey executed.";
				DHrekey(ServerNetwork);
				DHrekey(DropOffNetwork);
				Current = 0;
			} else if (UserInput.contains("job")) {
				flagJob = true; 
				UserInput = UserInput + ":" + ClientID + ":" + OS + ":" + SecLev;
			} else if (UserInput.contains("help")) {
				noSend = true; 
				DisplayMenu();
			}
			if (Current == MaxBeforeREKEY) {
				DHrekey(ServerNetwork);
				DHrekey(DropOffNetwork);
				Current = 0;
			} else {
				Current++;
			}
		}
		if ((UserInput.compareToIgnoreCase("quit") == 0) && serverUp) {
			ServerNetwork.Send(crypt.encrypt("quit"));
			DropOffNetwork.Send(crypt.encrypt("quit"));
		}
		ServerNetwork.BringDown();
		DropOffNetwork.BringDown();
		try {
			ServerSock.close();
			DropOffSock.close();
		} catch (IOException e) {
			mylog.out("ERROR", "Failed to close client socket");
		}
	}

	public void StartClient(int SERVERpassedPort, String SERVERpassedTarget, int DROPOFFpassedPort,
			String DROPOFFpassedTarget) {
		ServerNetwork = new Networking(mylog, SERVERpassedPort, SERVERpassedTarget);
		Socket ServerSock = ServerNetwork.PassBackClient();
		ServerNetwork.BringUp(ServerSock);
		System.out.println("Connected to Server [" + SERVERpassedTarget + "] on port [" + SERVERpassedPort + "]");
		DropOffNetwork = new Networking(mylog, DROPOFFpassedPort, DROPOFFpassedTarget);
		Socket DropOffSock = DropOffNetwork.PassBackClient();
		DropOffNetwork.BringUp(DropOffSock);
		System.out.println("Connected to Drop Off [" + DROPOFFpassedTarget + "] on port [" + DROPOFFpassedPort + "]");
		String UserInput = null;
		String ServerResponse = null;
		String OS = (String) clientSession.getAttribute("OS");
		String SecLev = (String) clientSession.getAttribute("SecurityLevel");
		String ClientID = (String) clientSession.getAttribute("ID");
		DisplayMenu();		
		crypt = new Crypto(mylog, subject.GetPSK());
		String rawTest = "Testing!!!12345";
		byte[] testdata = crypt.encrypt(rawTest); 
		ServerNetwork.Send(testdata); 
		byte[] fetched = ServerNetwork.ReceiveByte(); 
		String dec = crypt.decrypt(fetched); 
		if (dec.equals(rawTest + "<S>")) {
			mylog.out("INFO", "Functional bi-directional encryption established. (Server)");
		} else {
			mylog.out("ERROR", "Failed to establish a functional encrypted channel! (Server)");
			mylog.out("ERROR", "Expected [" + rawTest + "<S>" + "] but recieved [" + dec + "] (Server)");
			ServerNetwork.BringDown();
			try {
				ServerSock.close();
			} catch (IOException e) {
				mylog.out("ERROR", "Failed to close client socket (Server)");
			}
			System.exit(0);
		}
		DropOffNetwork.Send(testdata); 
		fetched = DropOffNetwork.ReceiveByte(); 
		dec = crypt.decrypt(fetched); 
		if (dec.equals(rawTest + "<S>")) {
			mylog.out("INFO", "Functional bi-directional encryption established. (Drop Off)");
		} else {
			mylog.out("ERROR", "Failed to establish a functional encrypted channel! (Drop Off)");
			mylog.out("ERROR", "Expected [" + rawTest + "<S>" + "] but recieved [" + dec + "] (Drop Off)");
			DropOffNetwork.BringDown();
			try {
				ServerSock.close();
			} catch (IOException e) {
				mylog.out("ERROR", "Failed to close client socket (Drop Off)");
			}
			System.exit(0);
		}
		DHrekey(ServerNetwork);
		DHrekey(DropOffNetwork);
		UserInput = readUI();
		int MaxBeforeREKEY = 100;
		int Current = 0;
		boolean serverUp = true;
		boolean flagJob = false;
		boolean noSend = false;
		while ((UserInput != null) && (UserInput.compareToIgnoreCase("quit") != 0) && (ServerSock.isConnected())
				&& (DropOffSock.isConnected())) {
			if (!noSend) {
				ServerNetwork.Send(crypt.encrypt(UserInput));
				fetched = ServerNetwork.ReceiveByte();
				ServerResponse = crypt.decrypt(fetched);
				if (ServerResponse == null) {
					mylog.out("WARN", "Server disconected");
					serverUp = false;
					break;
				}
			} else {
				noSend = false;
			}
			if (flagJob) {
				if (ServerResponse.length() > 0) {
					System.out.println("JobIn:[" + ServerResponse + "]");
					if (OS.contains("Windows")) {
						ServerResponse = "cmd /C " + ServerResponse;
					}
					try {
						Runtime rt = Runtime.getRuntime();
						Process proc = rt.exec(ServerResponse);
						StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), "ERROR");
						StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), "OUTPUT");
						errorGobbler.start();
						outputGobbler.start();
						int exitVal = 0;
						try {
							exitVal = proc.waitFor();
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
						System.out.println("ExitValue: " + exitVal);
					} catch (IOException e) {
						e.printStackTrace();
					}
					System.out.println("JobOut:[" + ServerResponse + "]");
				} else {
					System.out.println("Job:[No jobs available]");
				}
				flagJob = false;
			} else {
				System.out.println(ServerResponse);
			}
			UserInput = readUI().toLowerCase();
			if ((UserInput.contains("rekey")) && serverUp) {
				UserInput = "Rekey executed.";
				DHrekey(ServerNetwork);
				DHrekey(DropOffNetwork);
				Current = 0;
			} else if (UserInput.contains("job")) {
				flagJob = true; 
				UserInput = UserInput + ":" + ClientID + ":" + OS + ":" + SecLev;
			} else if (UserInput.contains("help")) {
				noSend = true; 
				DisplayMenu();
			}
			if (Current == MaxBeforeREKEY) {
				DHrekey(ServerNetwork);
				DHrekey(DropOffNetwork);
				Current = 0;
			} else {
				Current++;
			}
		}
		if ((UserInput.compareToIgnoreCase("quit") == 0) && serverUp) {
			ServerNetwork.Send(crypt.encrypt("quit"));
			DropOffNetwork.Send(crypt.encrypt("quit"));
		}
		ServerNetwork.BringDown();
		DropOffNetwork.BringDown();
		try {
			ServerSock.close();
			DropOffSock.close();
		} catch (IOException e) {
			mylog.out("ERROR", "Failed to close client socket");
		}
	}
