diff --git application/0.regen_all.sh application/0.regen_all.sh
old mode 100644
new mode 100755
diff --git application/2.compile_all_components.sh application/2.compile_all_components.sh
old mode 100644
new mode 100755
diff --git application/3.run_all_tests.sh application/3.run_all_tests.sh
old mode 100644
new mode 100755
diff --git application/4.build_installation_package.sh application/4.build_installation_package.sh
old mode 100644
new mode 100755
diff --git application/Common/Global.cpp application/Common/Global.cpp
index f28cb36..67c68f5 100644
--- application/Common/Global.cpp
+++ application/Common/Global.cpp
@@ -23,7 +23,7 @@ using namespace Common;
 
 #include <QDir>
 #include <QDirIterator>
-#include <qDebug>
+#include <QDebug>
 #include <QtGlobal>
 
 #ifdef Q_OS_WIN32
diff --git application/Common/TestsCommon/Tests.cpp application/Common/TestsCommon/Tests.cpp
new file mode 100644
index 0000000..c45093a
--- /dev/null
+++ application/Common/TestsCommon/Tests.cpp
@@ -0,0 +1,339 @@
+/**
+  * D-LAN - A decentralized LAN file sharing software.
+  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
+  *
+  * This program is free software: you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation, either version 3 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+  
+#include <Tests.h>
+
+#include <QtDebug>
+#include <QByteArray>
+#include <QFile>
+#include <QDir>
+#include <QElapsedTimer>
+
+#include <Protos/common.pb.h>
+#include <Protos/core_settings.pb.h>
+
+#include <Network/MessageHeader.h>
+#include <PersistentData.h>
+#include <Settings.h>
+#include <Global.h>
+#include <ZeroCopyStreamQIODevice.h>
+using namespace Common;
+
+Tests::Tests()
+{
+}
+
+void Tests::initTestCase()
+{
+   qDebug() << "Application folder path (where the settings and persistent data are put) : " << Global::getDataFolder(Common::Global::ROAMING, false);
+}
+
+void Tests::nCombinations()
+{
+   QCOMPARE(Global::nCombinations(5, 4), 5);
+   QCOMPARE(Global::nCombinations(4, 2), 6);
+   QCOMPARE(Global::nCombinations(4, 4), 1);
+   QCOMPARE(Global::nCombinations(42, 6), 5245786);
+
+   QCOMPARE(Global::nCombinations(2, 4), 0);
+   QCOMPARE(Global::nCombinations(-1, 1), 0);
+   QCOMPARE(Global::nCombinations(1, -1), 0);
+   QCOMPARE(Global::nCombinations(-1, -1), 0);
+}
+
+void Tests::formatByteSize()
+{
+   QCOMPARE(Global::formatByteSize(-42), QString("0 B"));
+   QCOMPARE(Global::formatByteSize(0), QString("0 B"));
+   QCOMPARE(Global::formatByteSize(42), QString("42 B"));
+   QCOMPARE(Global::formatByteSize(1023), QString("1023 B"));
+   QCOMPARE(Global::formatByteSize(1024), QString("1.0 KiB"));
+   QCOMPARE(Global::formatByteSize(1484), QString("1.4 KiB"));
+   QCOMPARE(Global::formatByteSize(1485), QString("1.5 KiB"));
+   QCOMPARE(Global::formatByteSize(1996), QString("1.9 KiB"));
+   QCOMPARE(Global::formatByteSize(1997), QString("2.0 KiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1484), QString("1.4 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1485), QString("1.5 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1996), QString("1.9 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1997), QString("2.0 MiB"));
+   QCOMPARE(Global::formatByteSize(42LL * 1024 * 1024 * 1024 * 1024 * 1024), QString("42.0 PiB"));
+   QCOMPARE(Global::formatByteSize(42LL * 1020 * 1024 * 1024 * 1024 * 1024), QString("41.8 PiB"));
+
+
+   QCOMPARE(Global::formatByteSize(-42, 2), QString("0 B"));
+   QCOMPARE(Global::formatByteSize(0, 2), QString("0 B"));
+   QCOMPARE(Global::formatByteSize(42, 2), QString("42 B"));
+   QCOMPARE(Global::formatByteSize(1023, 2), QString("1023 B"));
+   QCOMPARE(Global::formatByteSize(1024, 2), QString("1.00 KiB"));
+   QCOMPARE(Global::formatByteSize(1484, 2), QString("1.45 KiB"));
+   QCOMPARE(Global::formatByteSize(1485, 2), QString("1.45 KiB"));
+   QCOMPARE(Global::formatByteSize(1996, 2), QString("1.95 KiB"));
+   QCOMPARE(Global::formatByteSize(1997, 2), QString("1.95 KiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1484, 2), QString("1.45 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1485, 2), QString("1.45 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1996, 2), QString("1.95 MiB"));
+   QCOMPARE(Global::formatByteSize(1024 * 1997, 2), QString("1.95 MiB"));
+   QCOMPARE(Global::formatByteSize(42LL * 1024 * 1024 * 1024 * 1024 * 1024, 2), QString("42.00 PiB"));
+   QCOMPARE(Global::formatByteSize(42LL * 1020 * 1024 * 1024 * 1024 * 1024, 2), QString("41.84 PiB"));
+}
+
+void Tests::availableDiskSpace()
+{
+   qDebug() << "Available disk space [Mo] : " << Global::availableDiskSpace(".") / 1024 / 1024;
+}
+
+void Tests::writePersistentData()
+{
+   this->hash = Hash::rand();
+   Protos::Common::Hash hashMessage;
+   hashMessage.set_hash(this->hash.getData(), Hash::HASH_SIZE);
+   PersistentData::setValue("paul", hashMessage, Global::ROAMING);
+}
+
+void Tests::readPersistentData()
+{
+   Protos::Common::Hash hashMessage;
+   PersistentData::getValue("paul", hashMessage, Global::ROAMING);
+   Hash hashRead(hashMessage.hash().data());
+
+   QVERIFY(this->hash == hashRead);
+
+   try
+   {
+      PersistentData::getValue("john", hashMessage, Global::ROAMING);
+      QFAIL("'john' shouldn't exist");
+   }
+   catch (UnknownValueException)
+   {
+      qDebug() << "Ok, exception UnknownValueException catched for the value 'john'";
+   }
+   catch (...)
+   {
+      QFAIL("Unknown exception occured");
+   }
+}
+
+void Tests::removePersistentData()
+{
+   QVERIFY(PersistentData::rmValue("paul", Global::ROAMING));
+}
+
+void Tests::writeSettings()
+{
+   this->hash = Hash::rand();
+
+   SETTINGS.setFilename("tests_core_settings.txt");
+   SETTINGS.setSettingsMessage(new Protos::Core::Settings());
+
+   SETTINGS.set("nick", QString("paul"));
+   SETTINGS.set("peer_id", this->hash);
+   SETTINGS.save();
+}
+
+void Tests::readSettings()
+{
+   SETTINGS.load();
+
+   QString nick = SETTINGS.get<QString>("nick");
+   Hash hash = SETTINGS.get<Hash>("peer_id");
+
+   QCOMPARE(nick, QString("paul"));
+   QCOMPARE(hash.toStr(), this->hash.toStr());
+}
+
+void Tests::removeSettings()
+{
+   SETTINGS.remove();
+}
+
+void Tests::generateAHash()
+{
+   const char array[Hash::HASH_SIZE] = {
+      0x2d, 0x73, 0x73, 0x6f,
+      0x34, 0xa7, 0x38, 0x37,
+      0xd4, 0x22, 0xf7, 0xab,
+      0xa2, 0x74, 0x0d, 0x84,
+      0x09, 0xac, 0x60, 0xdf
+   };
+   QByteArray byteArray(array, Hash::HASH_SIZE);
+
+   qDebug() << "Reference                     : " << byteArray.toHex();;
+
+   Hash h1 = Hash::rand();
+   qDebug() << "h1 (Randomly generated hash)  : " << h1.toStr();
+
+   Hash h2(byteArray);
+   qDebug() << "h2 (from QByteArray)          : " << h2.toStr();
+   QVERIFY(memcmp(h2.getData(), array, Hash::HASH_SIZE) == 0);
+
+   Hash h3(h2);
+   qDebug() << "h3 (copied from h2)           : " << h3.toStr();
+   QVERIFY(memcmp(h3.getData(), array, Hash::HASH_SIZE) == 0);
+
+   Hash h4(array);
+   qDebug() << "h4 (from char[])              : " << h4.toStr();
+   QVERIFY(memcmp(h4.getData(), array, Hash::HASH_SIZE) == 0);
+}
+
+void Tests::buildAnHashFromAString()
+{
+   QString str("2d73736f34a73837d422f7aba2740d8409ac60df");
+   Hash h = Hash::fromStr(str);
+   QCOMPARE(h.toStr(), str);
+}
+
+void Tests::compareTwoHash()
+{
+   const char array[Hash::HASH_SIZE] = {
+      0x2d, 0x73, 0x73, 0x6f,
+      0x34, 0xa7, 0x38, 0x37,
+      0xd4, 0x22, 0xf7, 0xab,
+      0xa2, 0x74, 0x0d, 0x84,
+      0x09, 0xac, 0x60, 0xdf
+   };
+   QByteArray byteArray(array, Hash::HASH_SIZE);
+   QString str("2d73736f34a73837d422f7aba2740d8409ac60df");
+
+   Hash h1 = Hash::fromStr(str);
+   Hash h2(byteArray);
+   Hash h3 = h1;
+   Hash h4;
+   h4 = h1;
+
+   QVERIFY(h1 == h1);
+   QVERIFY(h1 == h2);
+   QVERIFY(h1 == h3);
+   QVERIFY(h1 == h4);
+   QVERIFY(h2 == h3);
+   QVERIFY(h2 == h4);
+}
+
+void Tests::hasher()
+{
+   char str1[] = "abc";
+   char str2[] = "abc";
+   char str3[] = "cba";
+
+   Hasher hasher;
+   hasher.addData(str1, sizeof(str1));
+   hasher.addData(str3, sizeof(str3));
+   Hash h1 = hasher.getResult();
+
+   hasher.reset();
+   hasher.addData(str2, sizeof(str2));
+   hasher.addData(str3, sizeof(str3));
+   Hash h2 = hasher.getResult();
+
+   hasher.reset();
+   hasher.addData(str3, sizeof(str3));
+   Hash h3 = hasher.getResult();
+
+   hasher.reset();
+   hasher.addPredefinedSalt();
+   hasher.addData(str1, sizeof(str1));
+   Hash h4 = hasher.getResult();
+
+   hasher.reset();
+   hasher.addPredefinedSalt();
+   hasher.addData(str2, sizeof(str2));
+   Hash h5 = hasher.getResult();
+
+   QVERIFY(h1 == h2);
+   QVERIFY(h1 != h3);
+   QVERIFY(h2 != h3);
+   QVERIFY(h4 != h1);
+   QVERIFY(h4 == h5);
+}
+
+void Tests::messageHeader()
+{
+   const char data[MessageHeader::HEADER_SIZE] = {
+      0x00, 0x00, 0x00, 0x01,
+      0x00, 0x00, 0x00, 0x2a,
+      0x2d, 0x73, 0x73, 0x6f,
+      0x34, 0xa7, 0x38, 0x37,
+      0xd4, 0x22, 0xf7, 0xab,
+      0xa2, 0x74, 0x0d, 0x84,
+      0x09, 0xac, 0x60, 0xdf
+   };
+
+   const QString peerID("2d73736f34a73837d422f7aba2740d8409ac60df");
+
+   MessageHeader header = MessageHeader::readHeader(data);
+   qDebug() << header.toStr();
+
+   QVERIFY(!header.isNull());
+   QCOMPARE(header.getType(), MessageHeader::CORE_IM_ALIVE);
+   QCOMPARE(header.getSize(), 42u);
+   QCOMPARE(header.getSenderID().toStr(), peerID);
+
+   // We use a larger buffer to check if the last four bytes has been alterate.
+   char buffer[MessageHeader::HEADER_SIZE + 4];
+   memset(buffer, 0, sizeof(buffer));
+
+   MessageHeader::writeHeader(buffer, header);
+   QVERIFY(qstrncmp(data, buffer, MessageHeader::HEADER_SIZE) == 0);
+   QVERIFY(qstrncmp(buffer + MessageHeader::HEADER_SIZE, "\0\0\0\0", 4) == 0);
+}
+
+void Tests::readAndWriteWithZeroCopyStreamQIODevice()
+{
+   QString filePath(QDir::tempPath().append("/test.bin"));
+   QFile file(filePath);
+   file.remove();
+
+   Hash hash1 = Hash::fromStr("2c583d414e4a9eb956228209b367e48f59078a4b");
+   Hash hash2 = Hash::fromStr("5c9c3741bded231f84b8a8200eaf3e30a9c0a951");
+
+   qDebug() << "hash1 : " << hash1.toStr();
+   qDebug() << "hash2 : " << hash2.toStr();
+
+   Protos::Common::Hash hashMessage1;
+   Protos::Common::Hash hashMessage2;
+
+   file.open(QIODevice::WriteOnly);
+   {
+      ZeroCopyOutputStreamQIODevice outputStream(&file);
+
+      hashMessage1.set_hash(hash1.getData(), Hash::HASH_SIZE);
+      hashMessage1.SerializeToZeroCopyStream(&outputStream);
+
+      hashMessage2.set_hash(hash2.getData(), Hash::HASH_SIZE);
+      hashMessage2.SerializeToZeroCopyStream(&outputStream);
+   }
+   file.close();
+
+   QFileInfo fileInfo(filePath);
+   QCOMPARE(fileInfo.size(), static_cast<long long>(hashMessage1.ByteSize() + hashMessage2.ByteSize()));
+
+   hashMessage1.Clear();
+   hashMessage2.Clear();
+   file.open(QIODevice::ReadOnly);
+   {
+      ZeroCopyInputStreamQIODevice inputStream(&file);
+      hashMessage1.ParseFromBoundedZeroCopyStream(&inputStream, Hash::HASH_SIZE + 2);
+      hashMessage2.ParseFromBoundedZeroCopyStream(&inputStream, Hash::HASH_SIZE + 2);
+   }
+   file.close();
+
+   QCOMPARE(QByteArray(hashMessage1.hash().data(), Hash::HASH_SIZE), QByteArray(hash1.getData(), Hash::HASH_SIZE));
+   QCOMPARE(QByteArray(hashMessage2.hash().data(), Hash::HASH_SIZE), QByteArray(hash2.getData(), Hash::HASH_SIZE));
+}
+
+
+
diff --git application/Common/TestsCommon/Tests.h application/Common/TestsCommon/Tests.h
new file mode 100644
index 0000000..8f49c3a
--- /dev/null
+++ application/Common/TestsCommon/Tests.h
@@ -0,0 +1,65 @@
+/**
+  * D-LAN - A decentralized LAN file sharing software.
+  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
+  *
+  * This program is free software: you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation, either version 3 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+  
+#ifndef TESTS_COMMON_H
+#define TESTS_COMMON_H
+
+#include <QTest>
+
+#include <Hash.h>
+
+class Tests : public QObject
+{
+   Q_OBJECT
+public:
+   Tests();
+
+private slots:
+   void initTestCase();
+
+   // Global class.
+   void nCombinations();
+   void formatByteSize();
+   void availableDiskSpace();
+
+   // PersistentData class.
+   void writePersistentData();
+   void readPersistentData();
+   void removePersistentData();
+
+   // Settings class.
+   void writeSettings();
+   void readSettings();
+   void removeSettings();
+
+   // Hash class.
+   void generateAHash();
+   void buildAnHashFromAString();
+   void compareTwoHash();
+   void hasher();
+
+   void messageHeader();
+
+   // ZeroCopyOutputStreamQIODevice and ZeroCopyInputStreamQIODevice classes.
+   void readAndWriteWithZeroCopyStreamQIODevice();
+
+private:
+   Common::Hash hash;
+};
+
+#endif
diff --git application/Common/TestsCommon/TestsCommon.pro application/Common/TestsCommon/TestsCommon.pro
new file mode 100644
index 0000000..2cf35f4
--- /dev/null
+++ application/Common/TestsCommon/TestsCommon.pro
@@ -0,0 +1,27 @@
+# -------------------------------------------------
+# Project created by QtCreator 2009-10-04T02:24:09
+# -------------------------------------------------
+QT += testlib
+QT -= gui
+TARGET = TestsCommon
+
+CONFIG += link_prl
+
+include(../common.pri)
+include(../../Libs/protobuf.pri)
+
+LIBS += -L"../output/$$FOLDER" -lCommon
+POST_TARGETDEPS += ../output/$$FOLDER/libCommon.a
+
+INCLUDEPATH += . \
+   .. \
+   ../..
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+    Tests.cpp \
+    ../../Protos/common.pb.cc \
+    ../../Protos/core_settings.pb.cc
+HEADERS += Tests.h
diff --git application/Common/TestsCommon/main.cpp application/Common/TestsCommon/main.cpp
new file mode 100644
index 0000000..631211e
--- /dev/null
+++ application/Common/TestsCommon/main.cpp
@@ -0,0 +1,28 @@
+/**
+  * D-LAN - A decentralized LAN file sharing software.
+  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
+  *
+  * This program is free software: you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License as published by
+  * the Free Software Foundation, either version 3 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+  
+#include <QCoreApplication>
+#include <QTest>
+
+#include <Tests.h>
+
+int main(int argc, char *argv[])
+{
+   Tests tests;
+   return QTest::qExec(&tests, argc, argv);
+}
diff --git application/Common/Version.h application/Common/Version.h
index a5bd575..4462331 100644
--- application/Common/Version.h
+++ application/Common/Version.h
@@ -23,7 +23,7 @@
 #define VERSION_TAG "Beta10"
 
 // These two values are automatically updated during the release building process. See the script 'Application/Tools/update_version.sh'
-#define BUILD_TIME "2011-03-16_18-02"
-#define GIT_VERSION "d95667c422c53c67353299de443bfa4ad905a162"
+#define BUILD_TIME "2011-03-28_13-03"
+#define GIT_VERSION "57073952baf03b969debc1c36411eb755a03e2ca"
 
 #endif
diff --git application/Common/testsCommon/Tests.cpp application/Common/testsCommon/Tests.cpp
deleted file mode 100644
index c45093a..0000000
--- application/Common/testsCommon/Tests.cpp
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
-  * D-LAN - A decentralized LAN file sharing software.
-  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
-  *
-  * This program is free software: you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation, either version 3 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  */
-  
-#include <Tests.h>
-
-#include <QtDebug>
-#include <QByteArray>
-#include <QFile>
-#include <QDir>
-#include <QElapsedTimer>
-
-#include <Protos/common.pb.h>
-#include <Protos/core_settings.pb.h>
-
-#include <Network/MessageHeader.h>
-#include <PersistentData.h>
-#include <Settings.h>
-#include <Global.h>
-#include <ZeroCopyStreamQIODevice.h>
-using namespace Common;
-
-Tests::Tests()
-{
-}
-
-void Tests::initTestCase()
-{
-   qDebug() << "Application folder path (where the settings and persistent data are put) : " << Global::getDataFolder(Common::Global::ROAMING, false);
-}
-
-void Tests::nCombinations()
-{
-   QCOMPARE(Global::nCombinations(5, 4), 5);
-   QCOMPARE(Global::nCombinations(4, 2), 6);
-   QCOMPARE(Global::nCombinations(4, 4), 1);
-   QCOMPARE(Global::nCombinations(42, 6), 5245786);
-
-   QCOMPARE(Global::nCombinations(2, 4), 0);
-   QCOMPARE(Global::nCombinations(-1, 1), 0);
-   QCOMPARE(Global::nCombinations(1, -1), 0);
-   QCOMPARE(Global::nCombinations(-1, -1), 0);
-}
-
-void Tests::formatByteSize()
-{
-   QCOMPARE(Global::formatByteSize(-42), QString("0 B"));
-   QCOMPARE(Global::formatByteSize(0), QString("0 B"));
-   QCOMPARE(Global::formatByteSize(42), QString("42 B"));
-   QCOMPARE(Global::formatByteSize(1023), QString("1023 B"));
-   QCOMPARE(Global::formatByteSize(1024), QString("1.0 KiB"));
-   QCOMPARE(Global::formatByteSize(1484), QString("1.4 KiB"));
-   QCOMPARE(Global::formatByteSize(1485), QString("1.5 KiB"));
-   QCOMPARE(Global::formatByteSize(1996), QString("1.9 KiB"));
-   QCOMPARE(Global::formatByteSize(1997), QString("2.0 KiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1484), QString("1.4 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1485), QString("1.5 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1996), QString("1.9 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1997), QString("2.0 MiB"));
-   QCOMPARE(Global::formatByteSize(42LL * 1024 * 1024 * 1024 * 1024 * 1024), QString("42.0 PiB"));
-   QCOMPARE(Global::formatByteSize(42LL * 1020 * 1024 * 1024 * 1024 * 1024), QString("41.8 PiB"));
-
-
-   QCOMPARE(Global::formatByteSize(-42, 2), QString("0 B"));
-   QCOMPARE(Global::formatByteSize(0, 2), QString("0 B"));
-   QCOMPARE(Global::formatByteSize(42, 2), QString("42 B"));
-   QCOMPARE(Global::formatByteSize(1023, 2), QString("1023 B"));
-   QCOMPARE(Global::formatByteSize(1024, 2), QString("1.00 KiB"));
-   QCOMPARE(Global::formatByteSize(1484, 2), QString("1.45 KiB"));
-   QCOMPARE(Global::formatByteSize(1485, 2), QString("1.45 KiB"));
-   QCOMPARE(Global::formatByteSize(1996, 2), QString("1.95 KiB"));
-   QCOMPARE(Global::formatByteSize(1997, 2), QString("1.95 KiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1484, 2), QString("1.45 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1485, 2), QString("1.45 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1996, 2), QString("1.95 MiB"));
-   QCOMPARE(Global::formatByteSize(1024 * 1997, 2), QString("1.95 MiB"));
-   QCOMPARE(Global::formatByteSize(42LL * 1024 * 1024 * 1024 * 1024 * 1024, 2), QString("42.00 PiB"));
-   QCOMPARE(Global::formatByteSize(42LL * 1020 * 1024 * 1024 * 1024 * 1024, 2), QString("41.84 PiB"));
-}
-
-void Tests::availableDiskSpace()
-{
-   qDebug() << "Available disk space [Mo] : " << Global::availableDiskSpace(".") / 1024 / 1024;
-}
-
-void Tests::writePersistentData()
-{
-   this->hash = Hash::rand();
-   Protos::Common::Hash hashMessage;
-   hashMessage.set_hash(this->hash.getData(), Hash::HASH_SIZE);
-   PersistentData::setValue("paul", hashMessage, Global::ROAMING);
-}
-
-void Tests::readPersistentData()
-{
-   Protos::Common::Hash hashMessage;
-   PersistentData::getValue("paul", hashMessage, Global::ROAMING);
-   Hash hashRead(hashMessage.hash().data());
-
-   QVERIFY(this->hash == hashRead);
-
-   try
-   {
-      PersistentData::getValue("john", hashMessage, Global::ROAMING);
-      QFAIL("'john' shouldn't exist");
-   }
-   catch (UnknownValueException)
-   {
-      qDebug() << "Ok, exception UnknownValueException catched for the value 'john'";
-   }
-   catch (...)
-   {
-      QFAIL("Unknown exception occured");
-   }
-}
-
-void Tests::removePersistentData()
-{
-   QVERIFY(PersistentData::rmValue("paul", Global::ROAMING));
-}
-
-void Tests::writeSettings()
-{
-   this->hash = Hash::rand();
-
-   SETTINGS.setFilename("tests_core_settings.txt");
-   SETTINGS.setSettingsMessage(new Protos::Core::Settings());
-
-   SETTINGS.set("nick", QString("paul"));
-   SETTINGS.set("peer_id", this->hash);
-   SETTINGS.save();
-}
-
-void Tests::readSettings()
-{
-   SETTINGS.load();
-
-   QString nick = SETTINGS.get<QString>("nick");
-   Hash hash = SETTINGS.get<Hash>("peer_id");
-
-   QCOMPARE(nick, QString("paul"));
-   QCOMPARE(hash.toStr(), this->hash.toStr());
-}
-
-void Tests::removeSettings()
-{
-   SETTINGS.remove();
-}
-
-void Tests::generateAHash()
-{
-   const char array[Hash::HASH_SIZE] = {
-      0x2d, 0x73, 0x73, 0x6f,
-      0x34, 0xa7, 0x38, 0x37,
-      0xd4, 0x22, 0xf7, 0xab,
-      0xa2, 0x74, 0x0d, 0x84,
-      0x09, 0xac, 0x60, 0xdf
-   };
-   QByteArray byteArray(array, Hash::HASH_SIZE);
-
-   qDebug() << "Reference                     : " << byteArray.toHex();;
-
-   Hash h1 = Hash::rand();
-   qDebug() << "h1 (Randomly generated hash)  : " << h1.toStr();
-
-   Hash h2(byteArray);
-   qDebug() << "h2 (from QByteArray)          : " << h2.toStr();
-   QVERIFY(memcmp(h2.getData(), array, Hash::HASH_SIZE) == 0);
-
-   Hash h3(h2);
-   qDebug() << "h3 (copied from h2)           : " << h3.toStr();
-   QVERIFY(memcmp(h3.getData(), array, Hash::HASH_SIZE) == 0);
-
-   Hash h4(array);
-   qDebug() << "h4 (from char[])              : " << h4.toStr();
-   QVERIFY(memcmp(h4.getData(), array, Hash::HASH_SIZE) == 0);
-}
-
-void Tests::buildAnHashFromAString()
-{
-   QString str("2d73736f34a73837d422f7aba2740d8409ac60df");
-   Hash h = Hash::fromStr(str);
-   QCOMPARE(h.toStr(), str);
-}
-
-void Tests::compareTwoHash()
-{
-   const char array[Hash::HASH_SIZE] = {
-      0x2d, 0x73, 0x73, 0x6f,
-      0x34, 0xa7, 0x38, 0x37,
-      0xd4, 0x22, 0xf7, 0xab,
-      0xa2, 0x74, 0x0d, 0x84,
-      0x09, 0xac, 0x60, 0xdf
-   };
-   QByteArray byteArray(array, Hash::HASH_SIZE);
-   QString str("2d73736f34a73837d422f7aba2740d8409ac60df");
-
-   Hash h1 = Hash::fromStr(str);
-   Hash h2(byteArray);
-   Hash h3 = h1;
-   Hash h4;
-   h4 = h1;
-
-   QVERIFY(h1 == h1);
-   QVERIFY(h1 == h2);
-   QVERIFY(h1 == h3);
-   QVERIFY(h1 == h4);
-   QVERIFY(h2 == h3);
-   QVERIFY(h2 == h4);
-}
-
-void Tests::hasher()
-{
-   char str1[] = "abc";
-   char str2[] = "abc";
-   char str3[] = "cba";
-
-   Hasher hasher;
-   hasher.addData(str1, sizeof(str1));
-   hasher.addData(str3, sizeof(str3));
-   Hash h1 = hasher.getResult();
-
-   hasher.reset();
-   hasher.addData(str2, sizeof(str2));
-   hasher.addData(str3, sizeof(str3));
-   Hash h2 = hasher.getResult();
-
-   hasher.reset();
-   hasher.addData(str3, sizeof(str3));
-   Hash h3 = hasher.getResult();
-
-   hasher.reset();
-   hasher.addPredefinedSalt();
-   hasher.addData(str1, sizeof(str1));
-   Hash h4 = hasher.getResult();
-
-   hasher.reset();
-   hasher.addPredefinedSalt();
-   hasher.addData(str2, sizeof(str2));
-   Hash h5 = hasher.getResult();
-
-   QVERIFY(h1 == h2);
-   QVERIFY(h1 != h3);
-   QVERIFY(h2 != h3);
-   QVERIFY(h4 != h1);
-   QVERIFY(h4 == h5);
-}
-
-void Tests::messageHeader()
-{
-   const char data[MessageHeader::HEADER_SIZE] = {
-      0x00, 0x00, 0x00, 0x01,
-      0x00, 0x00, 0x00, 0x2a,
-      0x2d, 0x73, 0x73, 0x6f,
-      0x34, 0xa7, 0x38, 0x37,
-      0xd4, 0x22, 0xf7, 0xab,
-      0xa2, 0x74, 0x0d, 0x84,
-      0x09, 0xac, 0x60, 0xdf
-   };
-
-   const QString peerID("2d73736f34a73837d422f7aba2740d8409ac60df");
-
-   MessageHeader header = MessageHeader::readHeader(data);
-   qDebug() << header.toStr();
-
-   QVERIFY(!header.isNull());
-   QCOMPARE(header.getType(), MessageHeader::CORE_IM_ALIVE);
-   QCOMPARE(header.getSize(), 42u);
-   QCOMPARE(header.getSenderID().toStr(), peerID);
-
-   // We use a larger buffer to check if the last four bytes has been alterate.
-   char buffer[MessageHeader::HEADER_SIZE + 4];
-   memset(buffer, 0, sizeof(buffer));
-
-   MessageHeader::writeHeader(buffer, header);
-   QVERIFY(qstrncmp(data, buffer, MessageHeader::HEADER_SIZE) == 0);
-   QVERIFY(qstrncmp(buffer + MessageHeader::HEADER_SIZE, "\0\0\0\0", 4) == 0);
-}
-
-void Tests::readAndWriteWithZeroCopyStreamQIODevice()
-{
-   QString filePath(QDir::tempPath().append("/test.bin"));
-   QFile file(filePath);
-   file.remove();
-
-   Hash hash1 = Hash::fromStr("2c583d414e4a9eb956228209b367e48f59078a4b");
-   Hash hash2 = Hash::fromStr("5c9c3741bded231f84b8a8200eaf3e30a9c0a951");
-
-   qDebug() << "hash1 : " << hash1.toStr();
-   qDebug() << "hash2 : " << hash2.toStr();
-
-   Protos::Common::Hash hashMessage1;
-   Protos::Common::Hash hashMessage2;
-
-   file.open(QIODevice::WriteOnly);
-   {
-      ZeroCopyOutputStreamQIODevice outputStream(&file);
-
-      hashMessage1.set_hash(hash1.getData(), Hash::HASH_SIZE);
-      hashMessage1.SerializeToZeroCopyStream(&outputStream);
-
-      hashMessage2.set_hash(hash2.getData(), Hash::HASH_SIZE);
-      hashMessage2.SerializeToZeroCopyStream(&outputStream);
-   }
-   file.close();
-
-   QFileInfo fileInfo(filePath);
-   QCOMPARE(fileInfo.size(), static_cast<long long>(hashMessage1.ByteSize() + hashMessage2.ByteSize()));
-
-   hashMessage1.Clear();
-   hashMessage2.Clear();
-   file.open(QIODevice::ReadOnly);
-   {
-      ZeroCopyInputStreamQIODevice inputStream(&file);
-      hashMessage1.ParseFromBoundedZeroCopyStream(&inputStream, Hash::HASH_SIZE + 2);
-      hashMessage2.ParseFromBoundedZeroCopyStream(&inputStream, Hash::HASH_SIZE + 2);
-   }
-   file.close();
-
-   QCOMPARE(QByteArray(hashMessage1.hash().data(), Hash::HASH_SIZE), QByteArray(hash1.getData(), Hash::HASH_SIZE));
-   QCOMPARE(QByteArray(hashMessage2.hash().data(), Hash::HASH_SIZE), QByteArray(hash2.getData(), Hash::HASH_SIZE));
-}
-
-
-
diff --git application/Common/testsCommon/Tests.h application/Common/testsCommon/Tests.h
deleted file mode 100644
index 8f49c3a..0000000
--- application/Common/testsCommon/Tests.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
-  * D-LAN - A decentralized LAN file sharing software.
-  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
-  *
-  * This program is free software: you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation, either version 3 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  */
-  
-#ifndef TESTS_COMMON_H
-#define TESTS_COMMON_H
-
-#include <QTest>
-
-#include <Hash.h>
-
-class Tests : public QObject
-{
-   Q_OBJECT
-public:
-   Tests();
-
-private slots:
-   void initTestCase();
-
-   // Global class.
-   void nCombinations();
-   void formatByteSize();
-   void availableDiskSpace();
-
-   // PersistentData class.
-   void writePersistentData();
-   void readPersistentData();
-   void removePersistentData();
-
-   // Settings class.
-   void writeSettings();
-   void readSettings();
-   void removeSettings();
-
-   // Hash class.
-   void generateAHash();
-   void buildAnHashFromAString();
-   void compareTwoHash();
-   void hasher();
-
-   void messageHeader();
-
-   // ZeroCopyOutputStreamQIODevice and ZeroCopyInputStreamQIODevice classes.
-   void readAndWriteWithZeroCopyStreamQIODevice();
-
-private:
-   Common::Hash hash;
-};
-
-#endif
diff --git application/Common/testsCommon/TestsCommon.pro application/Common/testsCommon/TestsCommon.pro
deleted file mode 100644
index 2cf35f4..0000000
--- application/Common/testsCommon/TestsCommon.pro
+++ /dev/null
@@ -1,27 +0,0 @@
-# -------------------------------------------------
-# Project created by QtCreator 2009-10-04T02:24:09
-# -------------------------------------------------
-QT += testlib
-QT -= gui
-TARGET = TestsCommon
-
-CONFIG += link_prl
-
-include(../common.pri)
-include(../../Libs/protobuf.pri)
-
-LIBS += -L"../output/$$FOLDER" -lCommon
-POST_TARGETDEPS += ../output/$$FOLDER/libCommon.a
-
-INCLUDEPATH += . \
-   .. \
-   ../..
-
-CONFIG += console
-CONFIG -= app_bundle
-TEMPLATE = app
-SOURCES += main.cpp \
-    Tests.cpp \
-    ../../Protos/common.pb.cc \
-    ../../Protos/core_settings.pb.cc
-HEADERS += Tests.h
diff --git application/Common/testsCommon/main.cpp application/Common/testsCommon/main.cpp
deleted file mode 100644
index 631211e..0000000
--- application/Common/testsCommon/main.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
-  * D-LAN - A decentralized LAN file sharing software.
-  * Copyright (C) 2010-2011 Greg Burri <greg.burri@gmail.com>
-  *
-  * This program is free software: you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation, either version 3 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public License
-  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-  */
-  
-#include <QCoreApplication>
-#include <QTest>
-
-#include <Tests.h>
-
-int main(int argc, char *argv[])
-{
-   Tests tests;
-   return QTest::qExec(&tests, argc, argv);
-}
diff --git application/Core/ConsoleReader.cpp application/Core/ConsoleReader.cpp
index 53fa6aa..d13fa5f 100644
--- application/Core/ConsoleReader.cpp
+++ application/Core/ConsoleReader.cpp
@@ -20,7 +20,11 @@
 using namespace CoreSpace;
 
 #include <cstdio>
-#include <windows.h>
+
+#if defined(Q_OS_LINUX)
+#elif defined(Q_OS_WIN32)
+   #include <windows.h>
+#endif
 
 #include <QCoreApplication>
 
diff --git application/Core/FileManager/priv/FileUpdater/DirWatcher.cpp application/Core/FileManager/priv/FileUpdater/DirWatcher.cpp
index 2cb1ad2..80571c0 100644
--- application/Core/FileManager/priv/FileUpdater/DirWatcher.cpp
+++ application/Core/FileManager/priv/FileUpdater/DirWatcher.cpp
@@ -32,7 +32,7 @@ DirWatcher* DirWatcher::getNewWatcher()
 #if defined(Q_OS_WIN32)
    return new DirWatcherWin();
 #else
-   LOG_WARN("Cannot create a watcher for the current platform, no implementation.");
+   L_WARN("Cannot create a watcher for the current platform, no implementation.");
    return 0;
 #endif
 }
diff --git application/Core/NetworkListener/priv/UDPListener.cpp application/Core/NetworkListener/priv/UDPListener.cpp
index a8eb7f2..b873e5a 100644
--- application/Core/NetworkListener/priv/UDPListener.cpp
+++ application/Core/NetworkListener/priv/UDPListener.cpp
@@ -87,7 +87,7 @@ UDPListener::UDPListener(
    mreq.imr_multiaddr.s_addr = htonl(MULTICAST_GROUP.toIPv4Address());
    mreq.imr_interface.s_addr = htonl(INADDR_ANY);
 #if defined(Q_OS_LINUX)
-   if (int error = setsockopt(socketDescriptor, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof mreq))
+   if (int error = setsockopt(multicastSocketDescriptor, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof mreq))
 #elif defined(Q_OS_WIN32)
    if (int error = setsockopt(multicastSocketDescriptor, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&mreq, sizeof mreq))
 #endif
diff --git application/Core/PeerManager/priv/PeerManager.cpp application/Core/PeerManager/priv/PeerManager.cpp
index 0e2e7db..8f739c7 100644
--- application/Core/PeerManager/priv/PeerManager.cpp
+++ application/Core/PeerManager/priv/PeerManager.cpp
@@ -26,7 +26,7 @@ using namespace PM;
 #include <Common/Settings.h>
 #include <Common/Network/MessageHeader.h>
 
-#include <Priv/Constants.h>
+#include <priv/Constants.h>
 
 /**
   * @class PM::PeerManager
diff --git application/D-LAN.pro application/D-LAN.pro
new file mode 100644
index 0000000..eb5118f
--- /dev/null
+++ application/D-LAN.pro
@@ -0,0 +1,19 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = Common \
+   Common/TestsCommon \
+   Common/LogManager \
+   Common/RemoteCoreController \
+   Core/FileManager \
+   Core/FileManager/TestsFileManager \
+   Core/PeerManager \
+   Core/PeerManager/TestsPeerManager \
+   Core/UploadManager \
+   Core/DownloadManager \
+   Core/NetworkListener \
+   Core/RemoteControlManager \
+   Core \
+   GUI \
+   Tools/LogViewer \
+   Tools/PasswordHasher 
+
diff --git application/GUI/CheckBoxList.cpp application/GUI/CheckBoxList.cpp
index 9a87b38..c88f68d 100644
--- application/GUI/CheckBoxList.cpp
+++ application/GUI/CheckBoxList.cpp
@@ -19,7 +19,7 @@
 #include <CheckBoxList.h>
 using namespace GUI;
 
-#include <QCHeckBox>
+#include <QCheckBox>
 #include <QApplication>
 #include <QStylePainter>
 #include <QAbstractItemView>
diff --git application/Tools/compute_code_metrics.sh application/Tools/compute_code_metrics.sh
old mode 100644
new mode 100755
diff --git application/Tools/normalize_endlines.sh application/Tools/normalize_endlines.sh
old mode 100644
new mode 100755
diff --git application/Tools/update_copyright.sh application/Tools/update_copyright.sh
old mode 100644
new mode 100755
diff --git application/Tools/update_version.sh application/Tools/update_version.sh
old mode 100644
new mode 100755
diff --git application/configure_linux.sh application/configure_linux.sh
new file mode 100755
index 0000000..8f6b6c3
--- /dev/null
+++ application/configure_linux.sh
@@ -0,0 +1 @@
+qmake D-LAN.pro -r -spec linux-g++
diff --git application/configure_windows.sh application/configure_windows.sh
new file mode 100755
index 0000000..ade9ad0
--- /dev/null
+++ application/configure_windows.sh
@@ -0,0 +1 @@
+qmake D-LAN.pro -r -spec win32-g++
