 
         private function tor_connected(e:Event):void
         {
-	    /* Got a connection to tor, now let's get served a client from the facilitator */
+            /* Got a connection to tor, now let's get served a client from the facilitator */
             s_f = new Socket();
 
             puts("Tor: connected.");


        // Socket to Tor relay.
        private var s_t:Socket;
	// Socket to Facilitator.
	private var s_f:Socket;
        // Socket to client.
        private var s_c:Socket;

        private var fac_address:String;
        private var fac_port:int;

	private var client_address:String;
	private var client_port:int;

        private function puts(s:String):void
        {


            puts("Facilitator: connecting to " + fac_address + ":" + fac_port + ".");
            s_f.connect(fac_address, fac_port);
        }

        private function fac_connected(e:Event):void
        {
            puts("Facilitator: connected.");

            s_f.addEventListener(ProgressEvent.SOCKET_DATA, function (e:ProgressEvent):void {
                var client_spec:String = new String();
                var parts:Array;

                client_spec = s_f.readMultiByte(e.bytesLoaded, "utf-8");
                puts("Facilitator: got \"" + client_spec + "\"");

                parts = client_spec.split(":", 2);
                if (parts.length != 2 || !parseInt(parts[1])) {
                    puts("Error: Facilitator spec must be in the form \"host:port\".");
                    return;
                }
                if (parts[0] == "0.0.0.0" && parseInt(parts[1]) == 0) {
                    puts("Error: Facilitator has no clients.");
                    return;
                }
                client_address = parts[0];
                client_port = parseInt(parts[1]);

                puts("Client: connecting to " + client_address + ":" + client_port + ".");
                s_c.connect(client_address, client_port);

            });

            s_f.writeUTFBytes("GET / HTTP/1.0\r\n\r\n");
        }

        private function client_connected(e:Event):void
