diff --git a/ContactsViewModel.cpp b/ContactsViewModel.cpp
index 40d98c0c2326f68f8c052159556d51bb42ae802d..9b5d6da7211696cab639e5229a93c64a6ff738aa 100644
--- a/ContactsViewModel.cpp
+++ b/ContactsViewModel.cpp
@@ -1,144 +1,144 @@
-/***************************************************************************
- * Copyright (C) 2016 by Savoir-faire Linux                                *
- * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
- * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
-#include "ContactsViewModel.h"
-
-using namespace Windows::Data::Json;
-using namespace Windows::Storage;
-
-using namespace RingClientUWP;
-using namespace ViewModel;
-
-ContactsViewModel::ContactsViewModel()
-{
-    contactsList_ = ref new Vector<Contact^>();
-    openContactsFromFile();
-}
-
-Contact^
-ContactsViewModel::findContactByName(String ^ name)
-{
-    for each (Contact^ contact in contactsList_)
-        if (contact->name_ == name)
-            return contact;
-
-    return nullptr;
-}
-
-Contact^
-ContactsViewModel::addNewContact(String^ name, String^ ringId)
-{
-    if (contactsList_ && !findContactByName(name)) {
-        Contact^ contact = ref new Contact(name, ringId);
-        contactsList_->Append(contact);
-        saveContactsToFile();
-        return contact;
-    }
-
-    return nullptr;
-}
-
-void
-ContactsViewModel::saveContactsToFile()
-{
-    StorageFolder^ localfolder = ApplicationData::Current->LocalFolder;
-    String^ contactsFile = ".profile\\contacts.json";
-
-    try {
-        create_task(localfolder->CreateFileAsync(contactsFile
-                    , Windows::Storage::CreationCollisionOption::ReplaceExisting))
-        .then([&](StorageFile^ newFile) {
-            try {
-                FileIO::WriteTextAsync(newFile, Stringify());
-            }
-            catch (Exception^ e) {
-                RingDebug::instance->print("Exception while writing to contacts file");
-            }
-        });
-    }
-    catch (Exception^ e) {
-        RingDebug::instance->print("Exception while opening contacts file");
-    }
-}
-
-void
-ContactsViewModel::openContactsFromFile()
-{
-    String^ contactsFile = ".profile\\contacts.json";
-
-    Utils::fileExists(ApplicationData::Current->LocalFolder,
-        contactsFile)
-        .then([this,contactsFile](bool contacts_file_exists)
-    {
-        if (contacts_file_exists) {
-            try {
-                create_task(ApplicationData::Current->LocalFolder->GetFileAsync(contactsFile))
-                    .then([this](StorageFile^ file)
-                {
-                    create_task(FileIO::ReadTextAsync(file))
-                        .then([this](String^ fileContents){
-                        if (fileContents != nullptr)
-                            Destringify(fileContents);
-                    });
-                });
-            }
-            catch (Exception^ e) {
-                RingDebug::instance->print("Exception while opening contacts file");
-            }
-        }
-    });
-}
-
-String^
-ContactsViewModel::Stringify()
-{
-    JsonArray^ jsonArray = ref new JsonArray();
-
-    for (unsigned int i = 0; i < contactsList_->Size; i++) {
-        jsonArray->Append(contactsList_->GetAt(i)->ToJsonObject());
-    }
-
-    JsonObject^ jsonObject = ref new JsonObject();
-    jsonObject->SetNamedValue(contactListKey, jsonArray);
-
-    return jsonObject->Stringify();
-}
-
-void
-ContactsViewModel::Destringify(String^ data)
-{
-    JsonObject^ jsonObject = JsonObject::Parse(data);
-    String^     name;
-    String^     ringid;
-
-    JsonArray^ contactlist = jsonObject->GetNamedArray(contactListKey, ref new JsonArray());
-    for (unsigned int i = 0; i < contactlist->Size; i++) {
-        IJsonValue^ contact = contactlist->GetAt(i);
-        if (contact->ValueType == JsonValueType::Object) {
-            JsonObject^ jsonContactObject = contact->GetObject();
-            JsonObject^ contactObject = jsonContactObject->GetNamedObject(contactKey, nullptr);
-            if (contactObject != nullptr) {
-                name = contactObject->GetNamedString(nameKey, "");
-                ringid = contactObject->GetNamedString(ringIDKey, "");
-            }
-            contactsList_->Append(ref new Contact(name, ringid));
-        }
-    }
-}
+/***************************************************************************
+ * Copyright (C) 2016 by Savoir-faire Linux                                *
+ * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
+ * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
+#include "ContactsViewModel.h"
+
+using namespace Windows::Data::Json;
+using namespace Windows::Storage;
+
+using namespace RingClientUWP;
+using namespace ViewModel;
+
+ContactsViewModel::ContactsViewModel()
+{
+    contactsList_ = ref new Vector<Contact^>();
+    openContactsFromFile();
+}
+
+Contact^
+ContactsViewModel::findContactByName(String ^ name)
+{
+    for each (Contact^ contact in contactsList_)
+        if (contact->name_ == name)
+            return contact;
+
+    return nullptr;
+}
+
+Contact^
+ContactsViewModel::addNewContact(String^ name, String^ ringId)
+{
+    if (contactsList_ && !findContactByName(name)) {
+        Contact^ contact = ref new Contact(name, ringId);
+        contactsList_->Append(contact);
+        saveContactsToFile();
+        return contact;
+    }
+
+    return nullptr;
+}
+
+void
+ContactsViewModel::saveContactsToFile()
+{
+    StorageFolder^ localfolder = ApplicationData::Current->LocalFolder;
+    String^ contactsFile = ".profile\\contacts.json";
+
+    try {
+        create_task(localfolder->CreateFileAsync(contactsFile
+                    , Windows::Storage::CreationCollisionOption::ReplaceExisting))
+        .then([&](StorageFile^ newFile) {
+            try {
+                FileIO::WriteTextAsync(newFile, Stringify());
+            }
+            catch (Exception^ e) {
+                RingDebug::instance->print("Exception while writing to contacts file");
+            }
+        });
+    }
+    catch (Exception^ e) {
+        RingDebug::instance->print("Exception while opening contacts file");
+    }
+}
+
+void
+ContactsViewModel::openContactsFromFile()
+{
+    String^ contactsFile = ".profile\\contacts.json";
+
+    Utils::fileExists(ApplicationData::Current->LocalFolder,
+        contactsFile)
+        .then([this,contactsFile](bool contacts_file_exists)
+    {
+        if (contacts_file_exists) {
+            try {
+                create_task(ApplicationData::Current->LocalFolder->GetFileAsync(contactsFile))
+                    .then([this](StorageFile^ file)
+                {
+                    create_task(FileIO::ReadTextAsync(file))
+                        .then([this](String^ fileContents){
+                        if (fileContents != nullptr)
+                            Destringify(fileContents);
+                    });
+                });
+            }
+            catch (Exception^ e) {
+                RingDebug::instance->print("Exception while opening contacts file");
+            }
+        }
+    });
+}
+
+String^
+ContactsViewModel::Stringify()
+{
+    JsonArray^ jsonArray = ref new JsonArray();
+
+    for (unsigned int i = 0; i < contactsList_->Size; i++) {
+        jsonArray->Append(contactsList_->GetAt(i)->ToJsonObject());
+    }
+
+    JsonObject^ jsonObject = ref new JsonObject();
+    jsonObject->SetNamedValue(contactListKey, jsonArray);
+
+    return jsonObject->Stringify();
+}
+
+void
+ContactsViewModel::Destringify(String^ data)
+{
+    JsonObject^ jsonObject = JsonObject::Parse(data);
+    String^     name;
+    String^     ringid;
+
+    JsonArray^ contactlist = jsonObject->GetNamedArray(contactListKey, ref new JsonArray());
+    for (unsigned int i = 0; i < contactlist->Size; i++) {
+        IJsonValue^ contact = contactlist->GetAt(i);
+        if (contact->ValueType == JsonValueType::Object) {
+            JsonObject^ jsonContactObject = contact->GetObject();
+            JsonObject^ contactObject = jsonContactObject->GetNamedObject(contactKey, nullptr);
+            if (contactObject != nullptr) {
+                name = contactObject->GetNamedString(nameKey, "");
+                ringid = contactObject->GetNamedString(ringIDKey, "");
+            }
+            contactsList_->Append(ref new Contact(name, ringid));
+        }
+    }
+}
diff --git a/ContactsViewModel.h b/ContactsViewModel.h
index 1bb057ebeb30473b479a816ac2a4e845aff40aea..29dfec8a467b5de6ca6b59f06122f7791a75f8bb 100644
--- a/ContactsViewModel.h
+++ b/ContactsViewModel.h
@@ -1,91 +1,91 @@
-/***************************************************************************
- * Copyright (C) 2016 by Savoir-faire Linux                                *
- * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
- * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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/>.   *
- **************************************************************************/
-
-#pragma once
-
-using namespace Platform::Collections;
-using namespace Concurrency;
-
-namespace RingClientUWP
-{
-
-delegate void NewContactSelected();
-delegate void NoContactSelected();
-
-namespace ViewModel {
-public ref class ContactsViewModel sealed
-{
-internal:
-    /* singleton */
-    static property ContactsViewModel^ instance
-    {
-        ContactsViewModel^ get()
-        {
-            static ContactsViewModel^ instance_ = ref new ContactsViewModel();
-            return instance_;
-        }
-    }
-
-    /* functions */
-    Contact^    findContactByName(String^ name);
-    Contact^    addNewContact(String^ name, String^ ringId);
-    void        saveContactsToFile();
-    void        openContactsFromFile();
-    String^     Stringify();
-    void        Destringify(String^ data);
-
-    /* properties */
-    property Contact^ selectedContact
-    {
-        Contact^ get()
-        {
-            return currentItem_;
-        }
-        void set(Contact^ value)
-        {
-            oldItem_ = currentItem_;
-            currentItem_ = value;
-            if (value)
-                newContactSelected();
-            else
-                noContactSelected();
-        }
-    }
-
-    property Vector<Contact^>^ contactsList
-    {
-        Vector<Contact^>^ get()
-        {
-            return contactsList_;
-        }
-    }
-
-    /* events */
-    event NewContactSelected^ newContactSelected;
-    event NoContactSelected^ noContactSelected;
-
-private:
-    ContactsViewModel(); // singleton
-    Vector<Contact^>^ contactsList_;
-    Contact^ currentItem_;
-    Contact^ oldItem_;
-
-};
-}
-}
+/***************************************************************************
+ * Copyright (C) 2016 by Savoir-faire Linux                                *
+ * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
+ * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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/>.   *
+ **************************************************************************/
+
+#pragma once
+
+using namespace Platform::Collections;
+using namespace Concurrency;
+
+namespace RingClientUWP
+{
+
+delegate void NewContactSelected();
+delegate void NoContactSelected();
+
+namespace ViewModel {
+public ref class ContactsViewModel sealed
+{
+internal:
+    /* singleton */
+    static property ContactsViewModel^ instance
+    {
+        ContactsViewModel^ get()
+        {
+            static ContactsViewModel^ instance_ = ref new ContactsViewModel();
+            return instance_;
+        }
+    }
+
+    /* functions */
+    Contact^    findContactByName(String^ name);
+    Contact^    addNewContact(String^ name, String^ ringId);
+    void        saveContactsToFile();
+    void        openContactsFromFile();
+    String^     Stringify();
+    void        Destringify(String^ data);
+
+    /* properties */
+    property Contact^ selectedContact
+    {
+        Contact^ get()
+        {
+            return currentItem_;
+        }
+        void set(Contact^ value)
+        {
+            oldItem_ = currentItem_;
+            currentItem_ = value;
+            if (value)
+                newContactSelected();
+            else
+                noContactSelected();
+        }
+    }
+
+    property Vector<Contact^>^ contactsList
+    {
+        Vector<Contact^>^ get()
+        {
+            return contactsList_;
+        }
+    }
+
+    /* events */
+    event NewContactSelected^ newContactSelected;
+    event NoContactSelected^ noContactSelected;
+
+private:
+    ContactsViewModel(); // singleton
+    Vector<Contact^>^ contactsList_;
+    Contact^ currentItem_;
+    Contact^ oldItem_;
+
+};
+}
+}
diff --git a/RingD.cpp b/RingD.cpp
index 385084a9d9d8a7c783539431f994ef993f617395..c2c051112b53cd23efe9852abc9e01982c09a897 100644
--- a/RingD.cpp
+++ b/RingD.cpp
@@ -1,196 +1,196 @@
-/***************************************************************************
-* Copyright (C) 2016 by Savoir-faire Linux                                *
-* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
-* Author: Traczyk Andreas <traczyk.andreas@savoirfairelinux.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 "pch.h"
-
-/* daemon */
-#include <dring.h>
-#include "callmanager_interface.h"
-#include "configurationmanager_interface.h"
-#include "presencemanager_interface.h"
-#include "fileutils.h"
-
-#include "account_schema.h"
-
-#include "SmartPanel.xaml.h"
-
-using namespace Windows::ApplicationModel::Core;
-using namespace Windows::Storage;
-using namespace Windows::UI::Core;
-
-using namespace RingClientUWP;
-using namespace RingClientUWP::Utils;
-
-void
-debugOutputWrapper(const std::string& str)
-{
-    MSG_(str);
-}
-
-void
-RingClientUWP::RingD::reloadAccountList()
-{
-    RingClientUWP::ViewModel::AccountsViewModel::instance->clearAccountList();
-    std::vector<std::string> accountList = DRing::getAccountList();
-    std::vector<std::string>::reverse_iterator rit = accountList.rbegin();
-    for (; rit != accountList.rend(); ++rit) {
-        std::map<std::string,std::string> accountDetails = DRing::getAccountDetails(*rit);
-        std::string ringID(accountDetails.find(ring::Conf::CONFIG_ACCOUNT_USERNAME)->second);
-        if(!ringID.empty())
-            ringID = ringID.substr(5);
-        RingClientUWP::ViewModel::AccountsViewModel::instance->add(
-            accountDetails.find(ring::Conf::CONFIG_ACCOUNT_ALIAS)->second,      //name
-            ringID,                                                             //ringid
-            accountDetails.find(ring::Conf::CONFIG_ACCOUNT_TYPE)->second);      //type
-    }
-    // load user preferences
-    Configuration::UserPreferences::instance->load();
-}
-
-void
-RingClientUWP::RingD::startDaemon()
-{
-    create_task([&]()
-    {
-        using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
-        using namespace std::placeholders;
-
-        std::map<std::string, SharedCallback> callHandlers = {
-            // use IncomingCall only to register the call client sided, use StateChange to determine the impact on the UI
-            DRing::exportable_callback<DRing::CallSignal::IncomingCall>([this](
-                const std::string& accountId,
-                const std::string& callId,
-                const std::string& from)
-            {
-                MSG_("<IncomingCall>");
-                MSG_("accountId = " + accountId);
-                MSG_("callId = " + callId);
-                MSG_("from = " + from);
-
-                auto accountId2 = toPlatformString(accountId);
-                auto callId2 = toPlatformString(callId);
-                auto from2 = toPlatformString(from);
-
-                incomingCall(accountId2, callId2, from2);
-
-            }),
-            DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
-                const std::string& callId,
-                const std::string& state,
-                int code)
-            {
-                MSG_("<StateChange>");
-                MSG_("callId = " + callId);
-                MSG_("state = " + state);
-                MSG_("code = " + std::to_string(code));
-
-                auto callId2 = toPlatformString(callId);
-                auto state2 = toPlatformString(state);
-
-                stateChange(callId2, state2, code);
-
-            }),
-            DRing::exportable_callback<DRing::ConfigurationSignal::IncomingAccountMessage>([this](
-                const std::string& accountId,
-                const std::string& from,
-                const std::map<std::string, std::string>& payloads)
-            {
-                MSG_("<IncomingAccountMessage>");
-                MSG_("accountId = " + accountId);
-                MSG_("from = " + from);
-
-                for (auto i : payloads) {
-                    MSG_("payload = " + i.second);
-                    auto payload = Utils::toPlatformString(i.second);
-                }
-            }),
-            DRing::exportable_callback<DRing::ConfigurationSignal::AccountsChanged>([this]()
-            {
-                CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
-                    ref new DispatchedHandler([=]() {
-                    reloadAccountList();
-                }));
-            })
-        };
-
-        registerCallHandlers(callHandlers);
-
-        std::map<std::string, SharedCallback> dringDebugOutHandler;
-        dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend>
-                                    (std::bind(&debugOutputWrapper, _1)));
-        registerCallHandlers(dringDebugOutHandler);
-
-        std::map<std::string, SharedCallback> getAppPathHandler =
-        {
-            DRing::exportable_callback<DRing::ConfigurationSignal::GetAppDataPath>
-            ([this](std::vector<std::string>* paths) {
-                paths->emplace_back(localFolder_);
-            })
-        };
-        registerCallHandlers(getAppPathHandler);
-
-        DRing::init(static_cast<DRing::InitFlag>(DRing::DRING_FLAG_CONSOLE_LOG |
-                    DRing::DRING_FLAG_DEBUG |
-                    DRing::DRING_FLAG_AUTOANSWER));
-
-        if (!DRing::start()) {
-            ERR_("\ndaemon didn't start.\n");
-            return;
-        }
-        else {
-            if (!hasConfig)
-            {
-                std::map<std::string, std::string> ringAccountDetails;
-                ringAccountDetails.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_ALIAS, accountName));
-                ringAccountDetails.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_TYPE,"RING"));
-                DRing::addAccount(ringAccountDetails);
-            }
-            else {
-                CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
-                    ref new DispatchedHandler([=]() {
-                    reloadAccountList();
-                }));
-            }
-            while (true) {
-                DRing::pollEvents();
-                Sleep(1000);
-                dequeueTasks();
-            }
-            DRing::fini();
-        }
-    });
-}
-
-RingD::RingD()
-{
-    localFolder_ = Utils::toString(ApplicationData::Current->LocalFolder->Path);
-}
-
-void
-RingD::dequeueTasks()
-{
-    for (int i = 0; i < tasksList_.size(); i++) {
-        auto task = tasksList_.front();
-        switch (task->request) {
-        case Request::None:
-        default:
-            break;
-        }
-        tasksList_.pop();
-    }
-}
+/***************************************************************************
+* Copyright (C) 2016 by Savoir-faire Linux                                *
+* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
+* Author: Traczyk Andreas <traczyk.andreas@savoirfairelinux.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 "pch.h"
+
+/* daemon */
+#include <dring.h>
+#include "callmanager_interface.h"
+#include "configurationmanager_interface.h"
+#include "presencemanager_interface.h"
+#include "fileutils.h"
+
+#include "account_schema.h"
+
+#include "SmartPanel.xaml.h"
+
+using namespace Windows::ApplicationModel::Core;
+using namespace Windows::Storage;
+using namespace Windows::UI::Core;
+
+using namespace RingClientUWP;
+using namespace RingClientUWP::Utils;
+
+void
+debugOutputWrapper(const std::string& str)
+{
+    MSG_(str);
+}
+
+void
+RingClientUWP::RingD::reloadAccountList()
+{
+    RingClientUWP::ViewModel::AccountsViewModel::instance->clearAccountList();
+    std::vector<std::string> accountList = DRing::getAccountList();
+    std::vector<std::string>::reverse_iterator rit = accountList.rbegin();
+    for (; rit != accountList.rend(); ++rit) {
+        std::map<std::string,std::string> accountDetails = DRing::getAccountDetails(*rit);
+        std::string ringID(accountDetails.find(ring::Conf::CONFIG_ACCOUNT_USERNAME)->second);
+        if(!ringID.empty())
+            ringID = ringID.substr(5);
+        RingClientUWP::ViewModel::AccountsViewModel::instance->add(
+            accountDetails.find(ring::Conf::CONFIG_ACCOUNT_ALIAS)->second,      //name
+            ringID,                                                             //ringid
+            accountDetails.find(ring::Conf::CONFIG_ACCOUNT_TYPE)->second);      //type
+    }
+    // load user preferences
+    Configuration::UserPreferences::instance->load();
+}
+
+void
+RingClientUWP::RingD::startDaemon()
+{
+    create_task([&]()
+    {
+        using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
+        using namespace std::placeholders;
+
+        std::map<std::string, SharedCallback> callHandlers = {
+            // use IncomingCall only to register the call client sided, use StateChange to determine the impact on the UI
+            DRing::exportable_callback<DRing::CallSignal::IncomingCall>([this](
+                const std::string& accountId,
+                const std::string& callId,
+                const std::string& from)
+            {
+                MSG_("<IncomingCall>");
+                MSG_("accountId = " + accountId);
+                MSG_("callId = " + callId);
+                MSG_("from = " + from);
+
+                auto accountId2 = toPlatformString(accountId);
+                auto callId2 = toPlatformString(callId);
+                auto from2 = toPlatformString(from);
+
+                incomingCall(accountId2, callId2, from2);
+
+            }),
+            DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
+                const std::string& callId,
+                const std::string& state,
+                int code)
+            {
+                MSG_("<StateChange>");
+                MSG_("callId = " + callId);
+                MSG_("state = " + state);
+                MSG_("code = " + std::to_string(code));
+
+                auto callId2 = toPlatformString(callId);
+                auto state2 = toPlatformString(state);
+
+                stateChange(callId2, state2, code);
+
+            }),
+            DRing::exportable_callback<DRing::ConfigurationSignal::IncomingAccountMessage>([this](
+                const std::string& accountId,
+                const std::string& from,
+                const std::map<std::string, std::string>& payloads)
+            {
+                MSG_("<IncomingAccountMessage>");
+                MSG_("accountId = " + accountId);
+                MSG_("from = " + from);
+
+                for (auto i : payloads) {
+                    MSG_("payload = " + i.second);
+                    auto payload = Utils::toPlatformString(i.second);
+                }
+            }),
+            DRing::exportable_callback<DRing::ConfigurationSignal::AccountsChanged>([this]()
+            {
+                CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
+                    ref new DispatchedHandler([=]() {
+                    reloadAccountList();
+                }));
+            })
+        };
+
+        registerCallHandlers(callHandlers);
+
+        std::map<std::string, SharedCallback> dringDebugOutHandler;
+        dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend>
+                                    (std::bind(&debugOutputWrapper, _1)));
+        registerCallHandlers(dringDebugOutHandler);
+
+        std::map<std::string, SharedCallback> getAppPathHandler =
+        {
+            DRing::exportable_callback<DRing::ConfigurationSignal::GetAppDataPath>
+            ([this](std::vector<std::string>* paths) {
+                paths->emplace_back(localFolder_);
+            })
+        };
+        registerCallHandlers(getAppPathHandler);
+
+        DRing::init(static_cast<DRing::InitFlag>(DRing::DRING_FLAG_CONSOLE_LOG |
+                    DRing::DRING_FLAG_DEBUG |
+                    DRing::DRING_FLAG_AUTOANSWER));
+
+        if (!DRing::start()) {
+            ERR_("\ndaemon didn't start.\n");
+            return;
+        }
+        else {
+            if (!hasConfig)
+            {
+                std::map<std::string, std::string> ringAccountDetails;
+                ringAccountDetails.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_ALIAS, accountName));
+                ringAccountDetails.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_TYPE,"RING"));
+                DRing::addAccount(ringAccountDetails);
+            }
+            else {
+                CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
+                    ref new DispatchedHandler([=]() {
+                    reloadAccountList();
+                }));
+            }
+            while (true) {
+                DRing::pollEvents();
+                Sleep(1000);
+                dequeueTasks();
+            }
+            DRing::fini();
+        }
+    });
+}
+
+RingD::RingD()
+{
+    localFolder_ = Utils::toString(ApplicationData::Current->LocalFolder->Path);
+}
+
+void
+RingD::dequeueTasks()
+{
+    for (int i = 0; i < tasksList_.size(); i++) {
+        auto task = tasksList_.front();
+        switch (task->request) {
+        case Request::None:
+        default:
+            break;
+        }
+        tasksList_.pop();
+    }
+}
diff --git a/RingD.h b/RingD.h
index 9758fbdfc83fcfa6f4445d52e07080864b062735..b610fc53ac4051d6a75e6bed9cc3517cdfcc61d6 100644
--- a/RingD.h
+++ b/RingD.h
@@ -1,83 +1,83 @@
-/***************************************************************************
-* Copyright (C) 2016 by Savoir-faire Linux                                *
-* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.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/>.   *
-**************************************************************************/
-#pragma once
-
-using namespace concurrency;
-
-namespace RingClientUWP
-{
-
-/* delegate */
-delegate void IncomingCall(String^ accountId, String^ callId, String^ from);
-delegate void StateChange(String^ callId, String^ state, int code);
-
-public ref class RingD sealed
-{
-public:
-    /* functions */
-
-    /* properties */
-    static property RingD^ instance
-    {
-        RingD^ get()
-        {
-            static RingD^ instance_ = ref new RingD();
-            return instance_;
-        }
-    }
-
-    property bool daemonRunning
-    {
-        bool get()
-        {
-            return daemonRunning_;
-        }
-    }
-
-internal:
-    /* functions */
-    void startDaemon();
-    void reloadAccountList();
-
-    /* TODO : move members */
-    bool hasConfig;
-    std::string accountName;
-
-    /* events */
-    event IncomingCall^ incomingCall;
-    event StateChange^ stateChange;
-
-private:
-    /* sub classes */
-    enum class Request { None };
-    ref class Task
-    {
-    public:
-        property Request request;
-    };
-
-    /* functions */
-    RingD(); // singleton
-    void dequeueTasks();
-
-    /* members */
-    std::string localFolder_;
-    bool daemonRunning_ = false;
-    std::queue<Task^> tasksList_;
-};
+/***************************************************************************
+* Copyright (C) 2016 by Savoir-faire Linux                                *
+* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.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/>.   *
+**************************************************************************/
+#pragma once
+
+using namespace concurrency;
+
+namespace RingClientUWP
+{
+
+/* delegate */
+delegate void IncomingCall(String^ accountId, String^ callId, String^ from);
+delegate void StateChange(String^ callId, String^ state, int code);
+
+public ref class RingD sealed
+{
+public:
+    /* functions */
+
+    /* properties */
+    static property RingD^ instance
+    {
+        RingD^ get()
+        {
+            static RingD^ instance_ = ref new RingD();
+            return instance_;
+        }
+    }
+
+    property bool daemonRunning
+    {
+        bool get()
+        {
+            return daemonRunning_;
+        }
+    }
+
+internal:
+    /* functions */
+    void startDaemon();
+    void reloadAccountList();
+
+    /* TODO : move members */
+    bool hasConfig;
+    std::string accountName;
+
+    /* events */
+    event IncomingCall^ incomingCall;
+    event StateChange^ stateChange;
+
+private:
+    /* sub classes */
+    enum class Request { None };
+    ref class Task
+    {
+    public:
+        property Request request;
+    };
+
+    /* functions */
+    RingD(); // singleton
+    void dequeueTasks();
+
+    /* members */
+    std::string localFolder_;
+    bool daemonRunning_ = false;
+    std::queue<Task^> tasksList_;
+};
 }
\ No newline at end of file
diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp
index 690183d10720e0ada9c74597d3c59701ade160ed..d9e0dd541f4e4f3e51468330ffe36346139cdfe0 100644
--- a/SmartPanel.xaml.cpp
+++ b/SmartPanel.xaml.cpp
@@ -1,192 +1,192 @@
-/***************************************************************************
- * Copyright (C) 2016 by Savoir-faire Linux                                *
- * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
- * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
-
-#include "SmartPanel.xaml.h"
-
-using namespace Platform;
-
-using namespace RingClientUWP;
-using namespace RingClientUWP::Views;
-using namespace RingClientUWP::ViewModel;
-using namespace Windows::Media::Capture;
-using namespace Windows::UI::Xaml;
-using namespace Windows::Storage;
-using namespace Windows::UI::Xaml::Media::Imaging;
-using namespace Windows::UI::Xaml::Shapes;
-using namespace Windows::UI::Xaml::Media;
-using namespace Concurrency;
-using namespace Windows::Foundation;
-
-SmartPanel::SmartPanel()
-{
-    InitializeComponent();
-
-    Configuration::UserPreferences::instance->selectIndex += ref new SelectIndex([this](int index) {
-        _accountsList_->SelectedIndex = index;
-    });
-
-    _accountsList_->ItemsSource = AccountsViewModel::instance->accountsList;
-    _smartList_->ItemsSource = ContactsViewModel::instance->contactsList;
-}
-
-void
-RingClientUWP::Views::SmartPanel::updatePageContent()
-{
-    auto account = AccountsViewModel::instance->selectedAccount;
-    if (!account)
-        return;
-
-    Configuration::UserPreferences::instance->PREF_ACCOUNT_INDEX = _accountsList_->SelectedIndex;
-    Configuration::UserPreferences::instance->save();
-    _selectedAccountName_->Text = account->name_;
-}
-
-void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Checked(Object^ sender, RoutedEventArgs^ e)
-{
-    _shareMenuButton_->IsChecked = false;
-    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-}
-
-void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ sender, RoutedEventArgs^ e)
-{
-    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-}
-
-void RingClientUWP::Views::SmartPanel::_settings__Checked(Object^ sender, RoutedEventArgs^ e)
-{
-    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _settings_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-}
-
-void RingClientUWP::Views::SmartPanel::_settings__Unchecked(Object^ sender, RoutedEventArgs^ e)
-{
-    _settings_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-}
-
-void RingClientUWP::Views::SmartPanel::setMode(RingClientUWP::Views::SmartPanel::Mode mode)
-{
-    if (mode == RingClientUWP::Views::SmartPanel::Mode::Normal) {
-        _rowRingTxtBx_->Height = 40;
-        _selectedAccountAvatar_->Height = 80;
-        _selectedAccountAvatarColumn_->Width = 90;
-        _selectedAccountRow_->Height = 90;
-    }
-    else {
-        _rowRingTxtBx_->Height = 0;
-        _selectedAccountAvatar_->Height = 50;
-        _selectedAccountAvatarColumn_->Width = 60;
-        _selectedAccountRow_->Height = 60;
-    }
-
-    _selectedAccountAvatar_->Width = _selectedAccountAvatar_->Height;
-    _settingsTBtn_->IsChecked = false;
-    _accountsMenuButton_->IsChecked = false;
-    _shareMenuButton_->IsChecked = false;
-}
-
-void RingClientUWP::Views::SmartPanel::_shareMenuButton__Checked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-    _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _accountsMenuButton_->IsChecked = false;
-}
-
-void RingClientUWP::Views::SmartPanel::_shareMenuButton__Unchecked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-    _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-}
-
-
-void RingClientUWP::Views::SmartPanel::_addAccountBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-}
-
-
-void RingClientUWP::Views::SmartPanel::_createAccountYes__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-
-}
-
-
-void RingClientUWP::Views::SmartPanel::_createAccountNo__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-
-}
-
-
-void RingClientUWP::Views::SmartPanel::_avatarWebcamCaptureBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
-{
-    CameraCaptureUI^ cameraCaptureUI = ref new CameraCaptureUI();
-    cameraCaptureUI->PhotoSettings->Format = CameraCaptureUIPhotoFormat::Png;
-    cameraCaptureUI->PhotoSettings->CroppedSizeInPixels = Size(100, 100);
-
-
-    create_task(cameraCaptureUI->CaptureFileAsync(CameraCaptureUIMode::Photo)).then([this](StorageFile^ photo)
-    {
-        if (photo != nullptr) {
-            // maybe it would be possible to move some logics to the style sheet
-            auto brush = ref new ImageBrush();
-
-            auto circle = ref new Ellipse();
-            circle->Height = 80; // TODO : use some global constant when ready
-            circle->Width = 80;
-            auto path = photo->Path;
-            auto uri = ref new Windows::Foundation::Uri(path);
-            auto bitmapImage = ref new Windows::UI::Xaml::Media::Imaging::BitmapImage();
-            bitmapImage->UriSource = uri;
-
-            brush->ImageSource = bitmapImage;
-            circle->Fill = brush;
-            _avatarWebcamCaptureBtn_->Content = circle;
-        }
-    });
-
-}
-
-
-void
-SmartPanel::_smartList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
-{
-    auto listbox = safe_cast<ListBox^>(sender);
-    auto contact = safe_cast<Contact^>(listbox->SelectedItem);
-    ContactsViewModel::instance->selectedContact = contact;
-}
-
-void
-SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
-{
-    auto listbox = safe_cast<ListBox^>(sender);
-    auto account = safe_cast<Account^>(listbox->SelectedItem);
-    AccountsViewModel::instance->selectedAccount = account;
-    updatePageContent();
-}
-
-void RingClientUWP::Views::SmartPanel::_ringTxtBx__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
-{
-    /* add contact, test purpose but will be reused later in some way */
-    if (e->Key == Windows::System::VirtualKey::Enter && _ringTxtBx_->Text != "") {
-        ContactsViewModel::instance->addNewContact(_ringTxtBx_->Text, _ringTxtBx_->Text);
-        _ringTxtBx_->Text = "";
-    }
-}
+/***************************************************************************
+ * Copyright (C) 2016 by Savoir-faire Linux                                *
+ * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
+ * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
+
+#include "SmartPanel.xaml.h"
+
+using namespace Platform;
+
+using namespace RingClientUWP;
+using namespace RingClientUWP::Views;
+using namespace RingClientUWP::ViewModel;
+using namespace Windows::Media::Capture;
+using namespace Windows::UI::Xaml;
+using namespace Windows::Storage;
+using namespace Windows::UI::Xaml::Media::Imaging;
+using namespace Windows::UI::Xaml::Shapes;
+using namespace Windows::UI::Xaml::Media;
+using namespace Concurrency;
+using namespace Windows::Foundation;
+
+SmartPanel::SmartPanel()
+{
+    InitializeComponent();
+
+    Configuration::UserPreferences::instance->selectIndex += ref new SelectIndex([this](int index) {
+        _accountsList_->SelectedIndex = index;
+    });
+
+    _accountsList_->ItemsSource = AccountsViewModel::instance->accountsList;
+    _smartList_->ItemsSource = ContactsViewModel::instance->contactsList;
+}
+
+void
+RingClientUWP::Views::SmartPanel::updatePageContent()
+{
+    auto account = AccountsViewModel::instance->selectedAccount;
+    if (!account)
+        return;
+
+    Configuration::UserPreferences::instance->PREF_ACCOUNT_INDEX = _accountsList_->SelectedIndex;
+    Configuration::UserPreferences::instance->save();
+    _selectedAccountName_->Text = account->name_;
+}
+
+void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Checked(Object^ sender, RoutedEventArgs^ e)
+{
+    _shareMenuButton_->IsChecked = false;
+    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+}
+
+void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ sender, RoutedEventArgs^ e)
+{
+    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+}
+
+void RingClientUWP::Views::SmartPanel::_settings__Checked(Object^ sender, RoutedEventArgs^ e)
+{
+    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _settings_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+}
+
+void RingClientUWP::Views::SmartPanel::_settings__Unchecked(Object^ sender, RoutedEventArgs^ e)
+{
+    _settings_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _smartGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+}
+
+void RingClientUWP::Views::SmartPanel::setMode(RingClientUWP::Views::SmartPanel::Mode mode)
+{
+    if (mode == RingClientUWP::Views::SmartPanel::Mode::Normal) {
+        _rowRingTxtBx_->Height = 40;
+        _selectedAccountAvatar_->Height = 80;
+        _selectedAccountAvatarColumn_->Width = 90;
+        _selectedAccountRow_->Height = 90;
+    }
+    else {
+        _rowRingTxtBx_->Height = 0;
+        _selectedAccountAvatar_->Height = 50;
+        _selectedAccountAvatarColumn_->Width = 60;
+        _selectedAccountRow_->Height = 60;
+    }
+
+    _selectedAccountAvatar_->Width = _selectedAccountAvatar_->Height;
+    _settingsTBtn_->IsChecked = false;
+    _accountsMenuButton_->IsChecked = false;
+    _shareMenuButton_->IsChecked = false;
+}
+
+void RingClientUWP::Views::SmartPanel::_shareMenuButton__Checked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+    _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _accountsMenuButton_->IsChecked = false;
+}
+
+void RingClientUWP::Views::SmartPanel::_shareMenuButton__Unchecked(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+    _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+}
+
+
+void RingClientUWP::Views::SmartPanel::_addAccountBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+    _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+}
+
+
+void RingClientUWP::Views::SmartPanel::_createAccountYes__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+
+}
+
+
+void RingClientUWP::Views::SmartPanel::_createAccountNo__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+
+}
+
+
+void RingClientUWP::Views::SmartPanel::_avatarWebcamCaptureBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
+{
+    CameraCaptureUI^ cameraCaptureUI = ref new CameraCaptureUI();
+    cameraCaptureUI->PhotoSettings->Format = CameraCaptureUIPhotoFormat::Png;
+    cameraCaptureUI->PhotoSettings->CroppedSizeInPixels = Size(100, 100);
+
+
+    create_task(cameraCaptureUI->CaptureFileAsync(CameraCaptureUIMode::Photo)).then([this](StorageFile^ photo)
+    {
+        if (photo != nullptr) {
+            // maybe it would be possible to move some logics to the style sheet
+            auto brush = ref new ImageBrush();
+
+            auto circle = ref new Ellipse();
+            circle->Height = 80; // TODO : use some global constant when ready
+            circle->Width = 80;
+            auto path = photo->Path;
+            auto uri = ref new Windows::Foundation::Uri(path);
+            auto bitmapImage = ref new Windows::UI::Xaml::Media::Imaging::BitmapImage();
+            bitmapImage->UriSource = uri;
+
+            brush->ImageSource = bitmapImage;
+            circle->Fill = brush;
+            _avatarWebcamCaptureBtn_->Content = circle;
+        }
+    });
+
+}
+
+
+void
+SmartPanel::_smartList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
+{
+    auto listbox = safe_cast<ListBox^>(sender);
+    auto contact = safe_cast<Contact^>(listbox->SelectedItem);
+    ContactsViewModel::instance->selectedContact = contact;
+}
+
+void
+SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e)
+{
+    auto listbox = safe_cast<ListBox^>(sender);
+    auto account = safe_cast<Account^>(listbox->SelectedItem);
+    AccountsViewModel::instance->selectedAccount = account;
+    updatePageContent();
+}
+
+void RingClientUWP::Views::SmartPanel::_ringTxtBx__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
+{
+    /* add contact, test purpose but will be reused later in some way */
+    if (e->Key == Windows::System::VirtualKey::Enter && _ringTxtBx_->Text != "") {
+        ContactsViewModel::instance->addNewContact(_ringTxtBx_->Text, _ringTxtBx_->Text);
+        _ringTxtBx_->Text = "";
+    }
+}
diff --git a/UserPreferences.cpp b/UserPreferences.cpp
index f0b080de602bb1bcdf1760c4ab04adebbc2ba7ab..b6cd775ed3eee5048d5b5e317a7cbcf47c4de939 100644
--- a/UserPreferences.cpp
+++ b/UserPreferences.cpp
@@ -1,102 +1,102 @@
-/***************************************************************************
- * Copyright (C) 2016 by Savoir-faire Linux                                *
- * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
- * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
-
-using namespace Windows::Data::Json;
-using namespace Windows::Storage;
-
-using namespace RingClientUWP;
-using namespace Platform;
-using namespace Configuration;
-
-void
-UserPreferences::save()
-{
-    StorageFolder^ localfolder = ApplicationData::Current->LocalFolder;
-    String^ preferencesFile = "preferences.json";
-
-    try {
-        create_task(localfolder->CreateFileAsync(preferencesFile
-            ,Windows::Storage::CreationCollisionOption::ReplaceExisting))
-            .then([&](StorageFile^ newFile){
-            try {
-                FileIO::WriteTextAsync(newFile,Stringify());
-            }
-            catch (Exception^ e) {
-                RingDebug::instance->print("Exception while writing to preferences file");
-            }
-        });
-    }
-    catch (Exception^ e) {
-        RingDebug::instance->print("Exception while opening preferences file");
-    }
-}
-
-void
-UserPreferences::load()
-{
-    String^ preferencesFile = "preferences.json";
-
-    Utils::fileExists(ApplicationData::Current->LocalFolder,
-        preferencesFile)
-        .then([this,preferencesFile](bool contacts_file_exists)
-    {
-        if (contacts_file_exists) {
-            RingDebug::instance->print("opened preferences file");
-            try {
-                create_task(ApplicationData::Current->LocalFolder->GetFileAsync(preferencesFile))
-                    .then([this](StorageFile^ file)
-                {
-                    create_task(FileIO::ReadTextAsync(file))
-                        .then([this](String^ fileContents){
-                        RingDebug::instance->print("reading preferences file");
-                        if (fileContents != nullptr) {
-                            Destringify(fileContents);
-                            // select account index after loading preferences
-                            selectIndex(PREF_ACCOUNT_INDEX);
-                        }
-                    });
-                });
-            }
-            catch (Exception^ e) {
-                RingDebug::instance->print("Exception while opening preferences file");
-            }
-        }
-        else {
-            selectIndex(0);
-        }
-    });
-}
-
-String^
-UserPreferences::Stringify()
-{
-    JsonObject^ preferencesObject = ref new JsonObject();
-    preferencesObject->SetNamedValue("PREF_ACCOUNT_INDEX", JsonValue::CreateNumberValue(PREF_ACCOUNT_INDEX));
-    return preferencesObject->Stringify();
-}
-
-void
-UserPreferences::Destringify(String^ data)
-{
-    JsonObject^ jsonObject = JsonObject::Parse(data);
-    PREF_ACCOUNT_INDEX = static_cast<int>(jsonObject->GetNamedNumber("PREF_ACCOUNT_INDEX"));
-    JsonArray^ preferencesList = jsonObject->GetNamedArray("Account.index", ref new JsonArray());
+/***************************************************************************
+ * Copyright (C) 2016 by Savoir-faire Linux                                *
+ * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com>              *
+ * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.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 "pch.h"
+
+using namespace Windows::Data::Json;
+using namespace Windows::Storage;
+
+using namespace RingClientUWP;
+using namespace Platform;
+using namespace Configuration;
+
+void
+UserPreferences::save()
+{
+    StorageFolder^ localfolder = ApplicationData::Current->LocalFolder;
+    String^ preferencesFile = "preferences.json";
+
+    try {
+        create_task(localfolder->CreateFileAsync(preferencesFile
+            ,Windows::Storage::CreationCollisionOption::ReplaceExisting))
+            .then([&](StorageFile^ newFile){
+            try {
+                FileIO::WriteTextAsync(newFile,Stringify());
+            }
+            catch (Exception^ e) {
+                RingDebug::instance->print("Exception while writing to preferences file");
+            }
+        });
+    }
+    catch (Exception^ e) {
+        RingDebug::instance->print("Exception while opening preferences file");
+    }
+}
+
+void
+UserPreferences::load()
+{
+    String^ preferencesFile = "preferences.json";
+
+    Utils::fileExists(ApplicationData::Current->LocalFolder,
+        preferencesFile)
+        .then([this,preferencesFile](bool contacts_file_exists)
+    {
+        if (contacts_file_exists) {
+            RingDebug::instance->print("opened preferences file");
+            try {
+                create_task(ApplicationData::Current->LocalFolder->GetFileAsync(preferencesFile))
+                    .then([this](StorageFile^ file)
+                {
+                    create_task(FileIO::ReadTextAsync(file))
+                        .then([this](String^ fileContents){
+                        RingDebug::instance->print("reading preferences file");
+                        if (fileContents != nullptr) {
+                            Destringify(fileContents);
+                            // select account index after loading preferences
+                            selectIndex(PREF_ACCOUNT_INDEX);
+                        }
+                    });
+                });
+            }
+            catch (Exception^ e) {
+                RingDebug::instance->print("Exception while opening preferences file");
+            }
+        }
+        else {
+            selectIndex(0);
+        }
+    });
+}
+
+String^
+UserPreferences::Stringify()
+{
+    JsonObject^ preferencesObject = ref new JsonObject();
+    preferencesObject->SetNamedValue("PREF_ACCOUNT_INDEX", JsonValue::CreateNumberValue(PREF_ACCOUNT_INDEX));
+    return preferencesObject->Stringify();
+}
+
+void
+UserPreferences::Destringify(String^ data)
+{
+    JsonObject^ jsonObject = JsonObject::Parse(data);
+    PREF_ACCOUNT_INDEX = static_cast<int>(jsonObject->GetNamedNumber("PREF_ACCOUNT_INDEX"));
+    JsonArray^ preferencesList = jsonObject->GetNamedArray("Account.index", ref new JsonArray());
 }
\ No newline at end of file
diff --git a/Wizard.xaml.cpp b/Wizard.xaml.cpp
index ec0f977c57159f11e910b17950170dd112a98b33..f38587541b1b23f10eb4186c2b027933a76d9c52 100644
--- a/Wizard.xaml.cpp
+++ b/Wizard.xaml.cpp
@@ -1,65 +1,65 @@
-#include "pch.h"
-
-#include "Wizard.xaml.h"
-
-#include "MainPage.xaml.h"
-
-using namespace RingClientUWP::Views;
-
-using namespace Concurrency;
-using namespace Platform;
-using namespace Windows::Devices::Enumeration;
-using namespace Windows::Foundation;
-using namespace Windows::Foundation::Collections;
-using namespace Windows::UI::Xaml;
-using namespace Windows::UI::Xaml::Controls;
-using namespace Windows::UI::Xaml::Controls::Primitives;
-using namespace Windows::UI::Xaml::Data;
-using namespace Windows::UI::Xaml::Input;
-using namespace Windows::UI::Xaml::Media;
-using namespace Windows::UI::Xaml::Navigation;
-using namespace Windows::Media::Capture;
-
-Wizard::Wizard()
-{
-    InitializeComponent();
-}
-
-void
-Wizard::_createAccountYes__Click(Object^ sender, RoutedEventArgs^ e)
-{
-    auto alias = _aliasTextBox_->Text;
-    if (alias->IsEmpty())
-        alias = "windows user";
-    std::wstring wstr(alias->Begin());
-    std::string str(wstr.begin(), wstr.end());
+#include "pch.h"
+
+#include "Wizard.xaml.h"
+
+#include "MainPage.xaml.h"
+
+using namespace RingClientUWP::Views;
+
+using namespace Concurrency;
+using namespace Platform;
+using namespace Windows::Devices::Enumeration;
+using namespace Windows::Foundation;
+using namespace Windows::Foundation::Collections;
+using namespace Windows::UI::Xaml;
+using namespace Windows::UI::Xaml::Controls;
+using namespace Windows::UI::Xaml::Controls::Primitives;
+using namespace Windows::UI::Xaml::Data;
+using namespace Windows::UI::Xaml::Input;
+using namespace Windows::UI::Xaml::Media;
+using namespace Windows::UI::Xaml::Navigation;
+using namespace Windows::Media::Capture;
+
+Wizard::Wizard()
+{
+    InitializeComponent();
+}
+
+void
+Wizard::_createAccountYes__Click(Object^ sender, RoutedEventArgs^ e)
+{
+    auto alias = _aliasTextBox_->Text;
+    if (alias->IsEmpty())
+        alias = "windows user";
+    std::wstring wstr(alias->Begin());
+    std::string str(wstr.begin(), wstr.end());
     RingD::instance->hasConfig = false;
     RingD::instance->accountName = std::string(wstr.begin(), wstr.end());
     this->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this] () {
         this->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(RingClientUWP::MainPage::typeid));
-    }));
-}
-
-void
-Wizard::_showCreateAccountMenuBtn__Click(Object^ sender, RoutedEventArgs^ e)
-{
-    _accountAddMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _showAddAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _showAddAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-
-    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _showCreateAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _showCreateAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-}
-
-void
-Wizard::_showAddAccountMenuBtn__Click(Object^ sender, RoutedEventArgs^ e)
-{
-    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _showCreateAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
-    _showCreateAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-
-    _accountAddMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _showAddAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Visible;
-    _showAddAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    }));
+}
+
+void
+Wizard::_showCreateAccountMenuBtn__Click(Object^ sender, RoutedEventArgs^ e)
+{
+    _accountAddMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _showAddAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _showAddAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+
+    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _showCreateAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _showCreateAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+}
+
+void
+Wizard::_showAddAccountMenuBtn__Click(Object^ sender, RoutedEventArgs^ e)
+{
+    _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _showCreateAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
+    _showCreateAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+
+    _accountAddMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _showAddAccountMenuTitle_->Visibility = Windows::UI::Xaml::Visibility::Visible;
+    _showAddAccountMenuBtn_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
 }
\ No newline at end of file