public void startup() {
        if (serversocket != null) {
            throw new IllegalStateException("Server already started up.");
        }

        // =====================================
        // Logger initialization
        // =====================================
        try {
            PropertyConfigurator.configure(getLogConfig());
            logger = Logger.getLogger("MarleLogger");
        } catch (Exception ex) {
            System.out.println("Could not initialize logger..");
            System.exit(500);
            return;
        }

        logger.info("========================");
        logger.info("Starting MarleServer....");
        // =====================================
        // Load Configuration
        // =====================================

        // TODO!
        try {
            serverid = UUID.nameUUIDFromBytes(java.net.Inet4Address.getLocalHost().getAddress());
        } catch (UnknownHostException ex) {

            // Just get a random one
            serverid = UUID.randomUUID();
            System.out.println("Could not generate from local address, using random UUID.");
        }

        // =====================================
        // Setup archive and replicate stack
        // =====================================
        try {
            this.archive = new Archive();
        } catch (IOException ex) {
            logger.info("Could not load the archive.");
        }

        this.replicatestack = new ReplicateStack();

        // =====================================
        // Neightbourhood scan (just to inform what is in the network)
        // =====================================

        try {
            logger.info("Quick network scan..");
            Map<InetAddress, ServerNode> addresses = new NodeSpotter(5000).findNodes();
            logger.info("Found " + addresses.size() + " nodes in the network.");
        } catch (IOException ex) {
            logger.fatal("Could not scan the network.", ex);
            System.exit(502);
            return;
        }
        
        // =====================================
        // Start the networking thread (Multicaster)
        // =====================================
        try {
            logger.info("Starting multicaster..");
            networkthread = new NetworkThread(this);
            networkthread.start();

        } catch (IOException ex) {
            logger.fatal("Could not start the background network thread.", ex);
            System.exit(502);
            return;
        }

        // =====================================
        // Start the Socket thread (Data transfers)
        // =====================================
        logger.info("Starting data transfer listener..");
        serversocket = new ServerSocketThread(this);
        serversocket.start();

        // =====================================
        // Starting file replication thread
        // =====================================
        logger.info("Starting replicator..");
        replicator = new FileReplicator(this);
        replicator.start();

        // =====================================
        // Update?
        // =====================================

        // Do something with the addresses?
        // Maybe registering ourselves as new server node or ask for updates


        // =====================================
        // Loading complete!
        // =====================================

        logger.info("--------------------------------");
        logger.info("MarleServer succesfully started!");
        logger.info("--------------------------------");
    }