public ServerGUI() {
		initialize();
		try {
			
			// Parse conf.txt
			Configuration c = Configuration.fromFile("conf.txt");
			
			// Get local ip
			String serverIp = (InetAddress.getLocalHost().getHostAddress()).toString();
			
			// Port should gradually be increased until a free port is gotten
			int serverPort = 3232;
			for (int i = serverPort; i < 4000; i++) {
				try {
					ServerSocket s = new ServerSocket(i);
					s.close();
		        } catch (IOException ex) {
		            continue;
		        }
				
				serverPort = i;
				break;
			}

			// Determine the id of this server
			Integer serverId = null;
			for (Entry<Integer, String> e : c.getAllServers().entrySet()) {
				String ip = e.getValue().split(":")[0];
				int port = Integer.valueOf(e.getValue().split(":")[1]);
				
				if (ip.equals(serverIp) && port == serverPort) {
					serverId = e.getKey();
					break;
				}
			}
			
			if (serverId == null) {
				log("Server: " + serverIp + ":" + serverPort + " not found in configurationfile");
				return;
			}
			
			// Init server
			server = new Server(serverIp, serverPort, serverId);
			server.initialNeighbour(c);
			
			lblServerIP.setText(serverIp);
			lblServerPort.setText(String.valueOf(serverPort));
			
			butFail = new JButton("Fail");
			butNormal = new JButton("Normal");
			butNormal.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					
					// Return to normal running operation
					doNormalOp();
				}
			});
			
			
			butFail.addActionListener(new ActionListener() {
				public void actionPerformed(ActionEvent arg0) {
					
					// Simulate failure
					doFail();
				}
			});
			butFail.setBounds(473, 34, 114, 25);
			frame.getContentPane().add(butFail);
			
			
			butNormal.setEnabled(false);
			butNormal.setBounds(344, 34, 117, 25);
			frame.getContentPane().add(butNormal);
			
			chckbxUsePopups = new JCheckBox("Use popups");
			chckbxUsePopups.setBounds(458, 8, 129, 23);
			frame.getContentPane().add(chckbxUsePopups);
			
			JScrollPane scrollPane = new JScrollPane();
			scrollPane.setBounds(12, 68, 575, 237);
			frame.getContentPane().add(scrollPane);
			
			txtOutput = new JTextArea();
			scrollPane.setViewportView(txtOutput);
        } catch(UnknownHostException uhe){
        	System.out.println(uhe.toString());
        	log(uhe.toString());
        	return;
        } catch (RemoteException re) {
        	System.out.println(re.toString());
			log(re.toString());
			return;
        } catch (IOException ie) {
        	System.out.println(ie.toString());
        	log(ie.toString());
			return;
		}
		log("Ready...");
	}