diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b6d89bc91a66db08fe58bad978a80358ff387c9..43ce104a534376d1e029310bcc7384a57e75fd31 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,7 @@ ADD_DEFINITIONS(
    -Wall
    -Wextra
    -Wno-cpp
-   #-Wmissing-declarations
+   -Wmissing-declarations
    -Wmissing-noreturn
    -Wpointer-arith
    -Wcast-align
@@ -60,15 +60,15 @@ ADD_DEFINITIONS(
    -Woverloaded-virtual
    -Wsuggest-attribute=const
    -Wunused-value
-#    -pedantic
+   -pedantic
    -Wdouble-promotion
    -Wnonnull
    -Wsequence-point
    -Wunused-but-set-parameter
-   #-Wsuggest-attribute=const
+   -Wsuggest-attribute=const
    #-Wsystem-headers
    -Wsizeof-pointer-memaccess
-#    -Wuseless-cast
+   #-Wuseless-cast
    -Wvarargs
 )
 
diff --git a/src/accountmodel.cpp b/src/accountmodel.cpp
index e4306e095c1d293cf473837a00dec734c0e58706..863121f40225a2364f8191b86f6ae5e315274ba6 100644
--- a/src/accountmodel.cpp
+++ b/src/accountmodel.cpp
@@ -294,7 +294,7 @@ void AccountModelPrivate::slotAccountPresenceEnabledChanged(bool state)
    emit q_ptr->presenceEnabledChanged(q_ptr->isPresenceEnabled());
 }
 
-///Emited when some runtime details changes
+///Emitted when some runtime details changes
 void AccountModelPrivate::slotVolatileAccountDetailsChange(const QString& accountId, const MapStringString& details)
 {
    Account* a = q_ptr->getById(accountId.toLatin1());
diff --git a/src/accountstatusmodel.h b/src/accountstatusmodel.h
index f753545f4d6486207bec3dca0893f596079a2a8c..8f68e51f3767922fe4447d765b48ef64fa4f5a17 100644
--- a/src/accountstatusmodel.h
+++ b/src/accountstatusmodel.h
@@ -72,7 +72,7 @@ private:
    virtual ~AccountStatusModel();
 
    AccountStatusModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(AccountStatusModel);
+   Q_DECLARE_PRIVATE(AccountStatusModel)
 
 };
 Q_DECLARE_METATYPE(AccountStatusModel*)
diff --git a/src/bookmarkmodel.cpp b/src/bookmarkmodel.cpp
index c841a9259f37a937bdf8f10e774d998ec478a7f4..4c63b0a153bc69b3c15fc7df56d1b25c3018bd29 100644
--- a/src/bookmarkmodel.cpp
+++ b/src/bookmarkmodel.cpp
@@ -410,7 +410,7 @@ QVariant BookmarkModelPrivate::commonCallInfo(NumberTreeBackend* number, int rol
          cat = "N/A";//timeToHistoryCategory(QDateTime::fromTime_t(call->getStartTimeStamp().toUInt()).date());
          break;
       case Call::Role::PhoneNu:
-         return QVariant::fromValue(const_cast<ContactMethod*>(number->m_pNumber));
+         return QVariant::fromValue(number->m_pNumber);
       case Call::Role::IsBookmark:
          return true;
       case Call::Role::Filter:
@@ -617,4 +617,4 @@ void BookmarkModel::backendAddedCallback(CollectionInterface* backend)
 //    return tr("Bookmarks");
 // }
 
-#include <bookmarkmodel.moc>
\ No newline at end of file
+#include <bookmarkmodel.moc>
diff --git a/src/bookmarkmodel.h b/src/bookmarkmodel.h
index d7b08d17e0623c3a62efcb694c74d2d770ef71b9..be9165c3b6172ed2568cbc694d55c4b5011e621c 100644
--- a/src/bookmarkmodel.h
+++ b/src/bookmarkmodel.h
@@ -85,7 +85,7 @@ private:
    static BookmarkModel* m_spInstance;
 
    BookmarkModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(BookmarkModel);
+   Q_DECLARE_PRIVATE(BookmarkModel)
 
    //Backend interface
    virtual void backendAddedCallback(CollectionInterface* backend) override;
diff --git a/src/call.cpp b/src/call.cpp
index 97c19a48750e74afa60b9a4f22357bca57e84ace..4117f6b6ba8c97e6c280570192bae07a4d2f869e 100644
--- a/src/call.cpp
+++ b/src/call.cpp
@@ -185,7 +185,7 @@ const TypedStateMachine< TypedStateMachine< bool , Call::LifeCycleState > , Call
 
 QDebug LIB_EXPORT operator<<(QDebug dbg, const Call::State& c)
 {
-   dbg.nospace() << QString(Call::toHumanStateName(c));
+   dbg.nospace() << Call::toHumanStateName(c);
    return dbg.space();
 }
 
@@ -200,16 +200,22 @@ QDebug LIB_EXPORT operator<<(QDebug dbg, const Call::Action& c)
    switch (c) {
       case Call::Action::ACCEPT:
          dbg.nospace() << "ACCEPT";
+         break;
       case Call::Action::REFUSE:
          dbg.nospace() << "REFUSE";
+         break;
       case Call::Action::TRANSFER:
          dbg.nospace() << "TRANSFER";
+         break;
       case Call::Action::HOLD:
          dbg.nospace() << "HOLD";
+         break;
       case Call::Action::RECORD:
          dbg.nospace() << "RECORD";
+         break;
       case Call::Action::COUNT__:
          dbg.nospace() << "COUNT";
+         break;
    };
    dbg.space();
    dbg.nospace() << '(' << static_cast<int>(c) << ')';
@@ -222,7 +228,7 @@ m_pImModel(nullptr),m_pTimer(nullptr),m_Recording(false),m_Account(nullptr),
 m_PeerName(),m_pPeerContactMethod(nullptr),m_HistoryConst(HistoryTimeCategoryModel::HistoryConst::Never),
 m_CallId(),m_pStartTimeStamp(0),m_pDialNumber(nullptr),m_pTransferNumber(nullptr),
 m_History(false),m_Missed(false),m_Direction(Call::Direction::OUTGOING),m_Type(Call::Type::CALL),
-m_pUserActionModel(nullptr)
+m_pUserActionModel(nullptr),m_HistoryState(Call::LegacyHistoryState::NONE), m_CurrentState(Call::State::ERROR)
 {
 }
 
@@ -1648,7 +1654,7 @@ QVariant Call::roleData(int role) const
          break;
       case Call::Role::Filter: {
          QString normStripppedC;
-         foreach(QChar char2,QString(static_cast<int>(historyState())+'\n'+roleData(Call::Role::Name).toString()+'\n'+
+         foreach(QChar char2,(static_cast<int>(historyState())+'\n'+roleData(Call::Role::Name).toString()+'\n'+
             roleData(Call::Role::Number).toString()).toLower().normalized(QString::NormalizationForm_KD) ) {
             if (!char2.combiningClass())
                normStripppedC += char2;
diff --git a/src/callmodel.cpp b/src/callmodel.cpp
index 3acae76a4e0fa885e6d079d5a193f7c8237ace39..dfea2898c9ff59a3a0688de0d32f31f967b5fbf2 100644
--- a/src/callmodel.cpp
+++ b/src/callmodel.cpp
@@ -433,7 +433,7 @@ Call* CallModelPrivate::addIncomingCall(const QString& callId)
 {
    Call* call = addCall(CallPrivate::buildIncomingCall(callId));
    //Call without account is not possible
-   if (dynamic_cast<Account*>(call->account())) {
+   if (call->account()) {
       if (call->account()->isAutoAnswer()) {
          call->performAction(Call::Action::ACCEPT);
       }
@@ -476,7 +476,7 @@ void CallModelPrivate::removeCall(Call* call, bool noEmit)
    InternalStruct* internal = m_sPrivateCallList_call[call];
 
    if (!internal || !call) {
-      qDebug() << "Cannot remove " << internal->call_real << ": call not found";
+      qDebug() << "Cannot remove " << (internal?internal->call_real->id():"nullptr") << ": call not found";
       return;
    }
 
@@ -1050,7 +1050,7 @@ void CallModelPrivate::slotChangingConference(const QString &confID, const QStri
    }
    Call* conf = confInt->call_real;
    qDebug() << "Changing conference state" << conf << confID;
-   if (conf && dynamic_cast<Call*>(conf)) { //Prevent a race condition between call and conference
+   if (conf && conf) { //Prevent a race condition between call and conference
       if (!q_ptr->getIndex(conf).isValid()) {
          qWarning() << "The conference item does not exist";
          return;
diff --git a/src/categorizedcompositenode.cpp b/src/categorizedcompositenode.cpp
index 081bed5b694222720ca219012a614da3a98891d0..6fae53de16e23bb49cb09de6e62320569f807c2f 100644
--- a/src/categorizedcompositenode.cpp
+++ b/src/categorizedcompositenode.cpp
@@ -28,7 +28,7 @@ public:
 };
 
 CategorizedCompositeNodePrivate::CategorizedCompositeNodePrivate():
-m_DropState(0),m_pParent(nullptr),m_HoverState(0)
+m_DropState(0),m_pParent(nullptr),m_HoverState(0),m_type(CategorizedCompositeNode::Type::CALL)
 {
    
 }
diff --git a/src/certificatemodel.h b/src/certificatemodel.h
index f5107923070db3a3b6358a62efc8b2997249a8ff..216380aa3726d4ce7fbb519cc5cf59f5fcc6e875 100644
--- a/src/certificatemodel.h
+++ b/src/certificatemodel.h
@@ -35,7 +35,7 @@ public:
    };
 
    //Constructor
-   CertificateModel(QObject* parent = nullptr);
+   explicit CertificateModel(QObject* parent = nullptr);
    virtual ~CertificateModel();
 
    //Model implementation
@@ -57,7 +57,7 @@ public:
 
 private:
    CertificateModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(CertificateModel);
+   Q_DECLARE_PRIVATE(CertificateModel)
 };
 
 #endif
\ No newline at end of file
diff --git a/src/ciphermodel.h b/src/ciphermodel.h
index 0fa83d9da1c70bf82d75f4859bdb43c8548dcad4..1a44bc1a4f7856821bbf79b0b75cb76c9735de14 100644
--- a/src/ciphermodel.h
+++ b/src/ciphermodel.h
@@ -56,7 +56,7 @@ private:
    virtual ~CipherModel();
 
    CipherModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(CipherModel);
+   Q_DECLARE_PRIVATE(CipherModel)
 
 };
 Q_DECLARE_METATYPE(CipherModel*)
diff --git a/src/collectioneditor.cpp b/src/collectioneditor.cpp
index 4bad129962e43205f5aed37217cb2633bee45146..8aa3a560795c23001dabaf202d919bf3e93b0802 100644
--- a/src/collectioneditor.cpp
+++ b/src/collectioneditor.cpp
@@ -23,4 +23,4 @@ CollectionEditorBase::CollectionEditorBase(QAbstractItemModel* m) : m_pModel(m)
 QAbstractItemModel* CollectionEditorBase::model() const
 {
    return m_pModel;
-}
\ No newline at end of file
+}
diff --git a/src/collectioneditor.h b/src/collectioneditor.h
index 247bf38caa2598cfbfd1a43b0547d0b8911fa08c..65011fc335f003d00297c51626d6eb98e77c732d 100644
--- a/src/collectioneditor.h
+++ b/src/collectioneditor.h
@@ -38,10 +38,10 @@ template<typename T> class CollectionMediator;
 /**
  * This is the class that does the actual work. This class
  * represent a delegate of CollectionInterface. It is usually
- * recommanded to implement this as a private class in the .cpp
+ * recommended to implement this as a private class in the .cpp
  * that implement the CollectionInterface.
  *
- * The rational behind this inversion of responsability layer
+ * The rational behind this inversion of responsibility layer
  * is to avoid using a template class for CollectionInterface.
  * This would add obstable when implementing objects using it due
  * to C++11 lack of generic template polymorphism. A base class
@@ -51,7 +51,7 @@ template<typename T>
 class LIB_EXPORT CollectionEditor : public CollectionEditorBase {
    friend class CollectionInterface;
 public:
-   CollectionEditor(CollectionMediator<T>* m);
+   explicit CollectionEditor(CollectionMediator<T>* m);
    virtual ~CollectionEditor();
 
    CollectionMediator<T>* mediator() const;
@@ -87,4 +87,4 @@ private:
 
 #include "collectioneditor.hpp"
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/collectioneditor.hpp b/src/collectioneditor.hpp
index 2c6eb17e47e12bb3bfd5ec80b8d61f348336b2c1..64907230169dd92cda412c7ce6ae25841447b24c 100644
--- a/src/collectioneditor.hpp
+++ b/src/collectioneditor.hpp
@@ -69,4 +69,4 @@ bool CollectionEditor<T>::remove(T* item)
 {
    Q_UNUSED(item)
    return false;
-}
\ No newline at end of file
+}
diff --git a/src/collectioninterface.h b/src/collectioninterface.h
index a04c95d5f5ea8f2d56404c5ca2e3051b1cd89995..849ce03195981e775d88b31632da1a3eb6991a28 100644
--- a/src/collectioninterface.h
+++ b/src/collectioninterface.h
@@ -34,7 +34,7 @@ template<typename T> class CollectionMediator;
 template<typename T> class ItemBase;
 
 /**
- * This is the iterface that must be implemented by each item backends to
+ * This is the interface that must be implemented by each item backends to
  * be used by a CollectionManager.
  *
  * The class need to be extended with a template constructor:
diff --git a/src/collectionmediator.h b/src/collectionmediator.h
index 694bd01f685175fd8743719e87d19dd0bb7d832e..bbb3cf7beb196f72eacbe661d62236d7aad70684 100644
--- a/src/collectionmediator.h
+++ b/src/collectionmediator.h
@@ -51,4 +51,4 @@ private:
 
 #include <collectionmediator.hpp>
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/collectionmediator.hpp b/src/collectionmediator.hpp
index a5e872daa38c421bfd4884ed03b2429496761ba0..3dc33b5e3e446c1bfe23b60b0b0b24b911f568c8 100644
--- a/src/collectionmediator.hpp
+++ b/src/collectionmediator.hpp
@@ -48,4 +48,4 @@ template<typename T>
 QAbstractItemModel* CollectionMediator<T>::model() const
 {
    return d_ptr->m_pModel;
-}
\ No newline at end of file
+}
diff --git a/src/collectionmodel.cpp b/src/collectionmodel.cpp
index 4ddc32675244adf3b6eeb7ad6ee29df9b3bb03ee..31da2772b6b8fe035b11c3825a50ad971ffc58ac 100644
--- a/src/collectionmodel.cpp
+++ b/src/collectionmodel.cpp
@@ -203,7 +203,7 @@ QModelIndex CollectionModel::index( int row, int column, const QModelIndex& pare
       else {
          item = new CollectionModelPrivate::ProxyItem();
          item->parent = parentItem;
-         item->backend = static_cast<CollectionInterface*>(parentItem->backend->children()[row]);
+         item->backend = parentItem->backend->children()[row];
          parentItem->m_Children << item;
       }
       item->row    = row;
diff --git a/src/contactmethod.cpp b/src/contactmethod.cpp
index 03912fc49ea335884e232ded052bc7d5b9d794f3..2741bc520dbc20db45bc14e9a6d0ed9710facb0d 100644
--- a/src/contactmethod.cpp
+++ b/src/contactmethod.cpp
@@ -127,7 +127,7 @@ ContactMethodPrivate::ContactMethodPrivate(const URI& uri, NumberCategory* cat,
    m_Uri(uri),m_pCategory(cat),m_Tracked(false),m_Present(false),m_LastUsed(0),
    m_Type(st),m_PopularityIndex(-1),m_pPerson(nullptr),m_pAccount(nullptr),
    m_LastWeekCount(0),m_LastTrimCount(0),m_HaveCalled(false),m_IsBookmark(false),m_TotalSeconds(0),
-   m_Index(-1)
+   m_Index(-1),m_hasType(false)
 {}
 
 ///Constructor
diff --git a/src/contactproxymodel.cpp b/src/contactproxymodel.cpp
index 430bac02d423b8095f48f6156691fc94f9a63d60..b617f2ad5a6854271df6c5833c4005c9c09f401d 100644
--- a/src/contactproxymodel.cpp
+++ b/src/contactproxymodel.cpp
@@ -92,7 +92,6 @@ public:
    QVector<ContactTopLevelItem*>       m_lCategoryCounter ;
    QHash<QString,ContactTopLevelItem*> m_hCategories      ;
    int                          m_Role             ;
-   bool                         m_ShowAll          ;
    QStringList                  m_lMimes           ;
 
    //Helper
@@ -162,7 +161,6 @@ void ContactTreeBinder::slotContactMethodCountChanged(int count, int oldCount)
 {
    const QModelIndex idx = m_pModel->index(m_pTreeNode->m_Index,0,m_pModel->index(m_pTreeNode->m_pParent3->m_Index,0));
    if (count > oldCount) {
-      const QModelIndex lastPhoneIdx = m_pModel->index(oldCount-1,0,idx);
       m_pModel->beginInsertRows(idx,oldCount,count-1);
       m_pModel->endInsertRows();
    }
@@ -180,17 +178,16 @@ void ContactTreeBinder::slotContactMethodCountAboutToChange(int count, int oldCo
 }
 
 ContactProxyModelPrivate::ContactProxyModelPrivate(ContactProxyModel* parent) : QObject(parent), q_ptr(parent),
-m_lCategoryCounter()
+m_lCategoryCounter(),m_Role(Qt::DisplayRole)
 {
    
 }
 
 //
-ContactProxyModel::ContactProxyModel(int role, bool showAll) : QAbstractItemModel(QCoreApplication::instance()),d_ptr(new ContactProxyModelPrivate(this))
+ContactProxyModel::ContactProxyModel(int role) : QAbstractItemModel(QCoreApplication::instance()),d_ptr(new ContactProxyModelPrivate(this))
 {
    setObjectName("ContactProxyModel");
    d_ptr->m_Role    = role;
-   d_ptr->m_ShowAll = showAll;
    d_ptr->m_lCategoryCounter.reserve(32);
    d_ptr->m_lMimes << RingMimes::PLAIN_TEXT << RingMimes::PHONENUMBER;
    connect(PersonModel::instance(),SIGNAL(reloaded()),d_ptr.data(),SLOT(reloadCategories()));
@@ -586,7 +583,7 @@ QString ContactProxyModelPrivate::category(const Person* ct) const {
       default:
          cat = ct->formattedName();
    }
-   if (cat.size() && !m_ShowAll)
+   if (cat.size())
       cat = cat[0].toUpper();
    return cat;
 }
@@ -599,12 +596,4 @@ void ContactProxyModel::setRole(int role)
    }
 }
 
-void ContactProxyModel::setShowAll(bool showAll)
-{
-   if (showAll != d_ptr->m_ShowAll) {
-      d_ptr->m_ShowAll = showAll;
-      d_ptr->reloadCategories();
-   }
-}
-
 #include <contactproxymodel.moc>
diff --git a/src/contactproxymodel.h b/src/contactproxymodel.h
index f6b39c0cfe24bea3fc79666424f4b45033d8be27..7926c40afb160210c5f7d2cbcc0bec3eea6542c0 100644
--- a/src/contactproxymodel.h
+++ b/src/contactproxymodel.h
@@ -41,12 +41,11 @@ public:
    friend class PersonModel;
    friend class ContactTreeNode;
    friend class ContactTreeBinder;
-   explicit ContactProxyModel(int role = Qt::DisplayRole, bool showAll = false);
+   explicit ContactProxyModel(int role = Qt::DisplayRole);
    virtual ~ContactProxyModel();
 
    //Setters
    void setRole(int role);
-   void setShowAll(bool showAll);
 
    //Model implementation
    virtual bool          setData     ( const QModelIndex& index, const QVariant &value, int role   ) override;
diff --git a/src/historytimecategorymodel.cpp b/src/historytimecategorymodel.cpp
index 169a6ed79e6f1d97619fdd36a6a8ad5b2af88bde..fbbe11e1b738cc4f84952623afbd063d6cbfcfcf 100644
--- a/src/historytimecategorymodel.cpp
+++ b/src/historytimecategorymodel.cpp
@@ -27,7 +27,8 @@ class HistoryTimeCategoryModelPrivate
 QVector<QString> HistoryTimeCategoryModel::m_lCategories;
 HistoryTimeCategoryModel* HistoryTimeCategoryModel::m_spInstance = new HistoryTimeCategoryModel();
 
-HistoryTimeCategoryModel::HistoryTimeCategoryModel(QObject* parent) : QAbstractListModel(parent)
+HistoryTimeCategoryModel::HistoryTimeCategoryModel(QObject* parent) : QAbstractListModel(parent),
+d_ptr(new HistoryTimeCategoryModelPrivate)
 {
    m_lCategories << tr("Today")                                 ;//0
    m_lCategories << tr("Yesterday")                             ;//1
@@ -56,6 +57,11 @@ HistoryTimeCategoryModel::HistoryTimeCategoryModel(QObject* parent) : QAbstractL
    m_lCategories << tr("Never")                                 ;//24
 }
 
+HistoryTimeCategoryModel::~HistoryTimeCategoryModel()
+{
+   delete d_ptr;
+}
+
 QHash<int,QByteArray> HistoryTimeCategoryModel::roleNames() const
 {
    static QHash<int, QByteArray> roles = QAbstractItemModel::roleNames();
diff --git a/src/historytimecategorymodel.h b/src/historytimecategorymodel.h
index 38c03b39eb446e90323285b8dfef4be5fa43653f..22d0ee9b60a1cc712c9c7d736bd6c37493868fc8 100644
--- a/src/historytimecategorymodel.h
+++ b/src/historytimecategorymodel.h
@@ -61,6 +61,7 @@ public:
 
    //Constructor
    explicit HistoryTimeCategoryModel(QObject* parent = nullptr);
+   virtual ~HistoryTimeCategoryModel();
 
    //Abstract model member
    virtual QVariant      data    (const QModelIndex& index, int role = Qt::DisplayRole     ) const override;
diff --git a/src/instantmessagingmodel.cpp b/src/instantmessagingmodel.cpp
index 5400c8a7435007ab6819af03095bf201659b41db..ab195a79969d8050b046f27312a0c58cf6b5e8b0 100644
--- a/src/instantmessagingmodel.cpp
+++ b/src/instantmessagingmodel.cpp
@@ -24,7 +24,8 @@
 #include "contactmethod.h"
 #include "private/instantmessagingmodel_p.h"
 
-InstantMessagingModelPrivate::InstantMessagingModelPrivate(InstantMessagingModel* parent) : QObject(parent), q_ptr(parent)
+InstantMessagingModelPrivate::InstantMessagingModelPrivate(InstantMessagingModel* parent) : QObject(parent), q_ptr(parent),
+m_pCall(nullptr)
 {
 
 }
diff --git a/src/itembase.h b/src/itembase.h
index 7226f4a4d0300c74f6fcbb2eff589924d25139c4..da876e060c0194c955f8019526648954bf2ded36 100644
--- a/src/itembase.h
+++ b/src/itembase.h
@@ -50,4 +50,4 @@ private:
 
 #include <itembase.hpp>
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/itembase.hpp b/src/itembase.hpp
index 6e605e9733b1321cd6045d33bdb545dcbc41345b..1db529ac517c7b562eeade88ff19a8e431529c35 100644
--- a/src/itembase.hpp
+++ b/src/itembase.hpp
@@ -75,4 +75,4 @@ bool ItemBase<Base>::remove()
 //    }
 //    else
 //       qDebug() << "Cannot save, invalid item type";
-}
\ No newline at end of file
+}
diff --git a/src/networkinterfacemodel.cpp b/src/networkinterfacemodel.cpp
index 2f28250fe0126e8b141ed6573b2f0d0209a80524..350db39ca42981a6f624b9b7f89b6d08fad8515e 100644
--- a/src/networkinterfacemodel.cpp
+++ b/src/networkinterfacemodel.cpp
@@ -90,4 +90,4 @@ NetworkInterfaceModel* NetworkInterfaceModel::instance()
 // }
 
 
-#include <networkinterfacemodel.moc>
\ No newline at end of file
+#include <networkinterfacemodel.moc>
diff --git a/src/networkinterfacemodel.h b/src/networkinterfacemodel.h
index 29e597352e0e68b2ce3d3d710b0dac64b58bc5a0..4249947226b5a1aedf115d84ca1e0608b1d7e5f7 100644
--- a/src/networkinterfacemodel.h
+++ b/src/networkinterfacemodel.h
@@ -49,7 +49,7 @@ private:
    static NetworkInterfaceModel* m_spInstance;
 
    NetworkInterfaceModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(NetworkInterfaceModel);
+   Q_DECLARE_PRIVATE(NetworkInterfaceModel)
 
 };
 Q_DECLARE_METATYPE(NetworkInterfaceModel*)
diff --git a/src/numbercompletionmodel.cpp b/src/numbercompletionmodel.cpp
index 826d3acfc60112ed76d608aa29fdad7594d96d7f..27c540d03d829f832927271d3798aa5180401dfc 100644
--- a/src/numbercompletionmodel.cpp
+++ b/src/numbercompletionmodel.cpp
@@ -132,7 +132,7 @@ QVariant NumberCompletionModel::data(const QModelIndex& index, int role ) const
                return needAcc;
             case NumberCompletionModel::Role::ACCOUNT:
                if (needAcc)
-                  return QVariant::fromValue(const_cast<Account*>(n->account()));
+                  return QVariant::fromValue(n->account());
                break;
          };
          break;
diff --git a/src/person.cpp b/src/person.cpp
index 5b68cd67b30d945df29b4816013cc2befd22af53..5bb4d83d501a6495251e9e96157e9ec3d8bb5709 100644
--- a/src/person.cpp
+++ b/src/person.cpp
@@ -156,7 +156,7 @@ QString PersonPrivate::filterString()
    }
 
    //Strip non essential characters like accents from the filter string
-   foreach(const QChar& char2,QString(m_FormattedName+'\n'+m_Organization+'\n'+m_Group+'\n'+
+   foreach(const QChar& char2,(m_FormattedName+'\n'+m_Organization+'\n'+m_Group+'\n'+
       m_Department+'\n'+m_PreferredEmail).toLower().normalized(QString::NormalizationForm_KD) ) {
       if (!char2.combiningClass())
          m_CachedFilterString += char2;
@@ -202,7 +202,7 @@ void PersonPrivate::phoneNumberCountAboutToChange(int n,int o)
 }
 
 PersonPrivate::PersonPrivate(Person* contact) :
-   m_Numbers(contact),m_DisplayPhoto(false),m_Active(true)
+   m_Numbers(contact),m_DisplayPhoto(false),m_Active(true),m_isPlaceHolder(false)
 {
 }
 
@@ -530,7 +530,7 @@ const QByteArray Person::toVCard(QList<Account*> accounts) const
    VCardUtils* maker = new VCardUtils();
    maker->startVCard("2.1");
    maker->addProperty(VCardUtils::Property::UID, uid());
-   maker->addProperty(VCardUtils::Property::NAME, QString(secondName()
+   maker->addProperty(VCardUtils::Property::NAME, (secondName()
                                                    + VCardUtils::Delimiter::SEPARATOR_TOKEN
                                                    + firstName()));
    maker->addProperty(VCardUtils::Property::FORMATTED_NAME, formattedName());
diff --git a/src/phonedirectorymodel.cpp b/src/phonedirectorymodel.cpp
index 2fa54407e19d873967ff4b650405fc12a772232c..8830de8849a14e8dda004b3f307f260750cdce62 100644
--- a/src/phonedirectorymodel.cpp
+++ b/src/phonedirectorymodel.cpp
@@ -201,14 +201,14 @@ QVariant PhoneDirectoryModel::data(const QModelIndex& index, int role ) const
       case PhoneDirectoryModelPrivate::Columns::POPULARITY_INDEX:
          switch (role) {
             case Qt::DisplayRole:
-               return (int)number->popularityIndex();
+               return number->popularityIndex();
                break;
          }
          break;
       case PhoneDirectoryModelPrivate::Columns::BOOKMARED:
          switch (role) {
             case Qt::CheckStateRole:
-               return (bool)number->isBookmarked()?Qt::Checked:Qt::Unchecked;
+               return number->isBookmarked()?Qt::Checked:Qt::Unchecked;
                break;
          }
          break;
diff --git a/src/private/account_p.h b/src/private/account_p.h
index a20bc1bad25eff825380acd6a49d04bb1f6d76b2..60f6c1630826d8f537244dc46a1f593d03d26f38 100644
--- a/src/private/account_p.h
+++ b/src/private/account_p.h
@@ -53,7 +53,7 @@ public:
    friend class TlsMethodModel;
 
    //Constructor
-   AccountPrivate(Account* acc);
+   explicit AccountPrivate(Account* acc);
 
    //Attributes
    QByteArray                 m_AccountId                ;
diff --git a/src/private/accountmodel_p.h b/src/private/accountmodel_p.h
index 8d156803d7de75b7c0881517d51244728462bdbb..a3049dd7edf23ac2e19674e481af86d57524eadf 100644
--- a/src/private/accountmodel_p.h
+++ b/src/private/accountmodel_p.h
@@ -33,7 +33,7 @@ class AccountModelPrivate : public QObject
    friend class AvailableAccountModel;
 public:
    //Constructor
-   AccountModelPrivate(AccountModel* parent);
+   explicit AccountModelPrivate(AccountModel* parent);
    void init();
 
    //Helpers
diff --git a/src/private/useractions.h b/src/private/useractions.h
index c6f7cf4585f8cfc76962b5d8e4d196eb5ca3180b..fe9a0b89f049b56722cb715d196ca34088a94886 100644
--- a/src/private/useractions.h
+++ b/src/private/useractions.h
@@ -26,6 +26,14 @@
  */
 namespace UserActions {
 
+bool accept(const QList<Call*> calls);
+bool hangup(const QList<Call*> calls);
+bool refuse(const QList<Call*> calls);
+bool hold(const QList<Call*> calls);
+bool unhold(const QList<Call*> calls);
+bool transfer(const QList<Call*> calls);
+bool record(const QList<Call*> calls);
+
 bool accept(const QList<Call*> calls)
 {
    bool ret = true;
@@ -175,6 +183,6 @@ bool record(const QList<Call*> calls)
    return ret;
 }
 
-}; //namespace UserActions
+} //namespace UserActions
 
 #endif
\ No newline at end of file
diff --git a/src/private/videoresolution_p.h b/src/private/videoresolution_p.h
index 769fb4ec64f94f4505ca7bdae6aa84efcca62f50..a954a42f54ea7803e98618a83126cca19d184a28 100644
--- a/src/private/videoresolution_p.h
+++ b/src/private/videoresolution_p.h
@@ -21,7 +21,7 @@
 namespace Video {
    class Rate;
    class Channel;
-};
+}
 
 class VideoResolutionPrivate
 {
diff --git a/src/profilemodel.cpp b/src/profilemodel.cpp
index 05ee6b2be60be5b256387c16fc61df8060131f53..6f39ea56a5a5e84077c0d3eef5222034e6449095 100644
--- a/src/profilemodel.cpp
+++ b/src/profilemodel.cpp
@@ -270,7 +270,8 @@ ProfileModel* ProfileModel::m_spInstance = nullptr;
 
 template<typename T>
 ProfileContentBackend::ProfileContentBackend(CollectionMediator<T>* mediator) :
-  CollectionInterface(new ProfileEditor(mediator),nullptr), m_pDefault(nullptr)
+  CollectionInterface(new ProfileEditor(mediator),nullptr), m_pDefault(nullptr),
+  m_needSaving(false)
 {
    m_pEditor = static_cast<ProfileEditor*>(editor<Person>());
 }
@@ -616,7 +617,7 @@ private:
    ProfileModel* q_ptr;
 };
 
-ProfileModelPrivate::ProfileModelPrivate(ProfileModel* parent) : QObject(parent), q_ptr(parent)
+ProfileModelPrivate::ProfileModelPrivate(ProfileModel* parent) : QObject(parent), q_ptr(parent),m_pProfileBackend(nullptr)
 {
 
 }
@@ -634,7 +635,7 @@ ProfileModel::ProfileModel(QObject* parent) : QAbstractItemModel(parent), d_ptr(
    d_ptr->m_lMimes << RingMimes::PLAIN_TEXT << RingMimes::HTML_TEXT << RingMimes::ACCOUNT << RingMimes::PROFILE;
 
    //Creating the profile contact backend
-   d_ptr->m_pProfileBackend = static_cast<ProfileContentBackend*>(PersonModel::instance()->addBackend<ProfileContentBackend>(LoadOptions::FORCE_ENABLED));
+   d_ptr->m_pProfileBackend = PersonModel::instance()->addBackend<ProfileContentBackend>(LoadOptions::FORCE_ENABLED);
 
    //Once LibRingClient is ready, start listening
    QTimer::singleShot(0,d_ptr,SLOT(slotDelayedInit()));
@@ -781,7 +782,7 @@ QMimeData* ProfileModel::mimeData(const QModelIndexList &indexes) const
    for (const QModelIndex &index : indexes) {
       Node* current = static_cast<Node*>(index.internalPointer());
 
-      if (index.isValid() && current->parent && current) {
+      if (current && index.isValid() && current->parent) {
          mMimeData->setData(RingMimes::ACCOUNT , current->account->id());
       }
       else if (index.isValid() && current) {
@@ -822,7 +823,7 @@ bool ProfileModel::dropMimeData(const QMimeData *data, Qt::DropAction action, in
 
       const QByteArray accountId = data->data(RingMimes::ACCOUNT);
       Node* newProfile = nullptr;
-      int destIdx, indexOfAccountToMove = -1; // Where to insert in account list of profile
+      int destIdx = 0, indexOfAccountToMove = -1; // Where to insert in account list of profile
 
       if(!parent.isValid() && row < d_ptr->m_pProfileBackend->m_pEditor->m_lProfiles.size()) {
          qDebug() << "Dropping on profile title";
diff --git a/src/profilemodel.h b/src/profilemodel.h
index 28cde02a739b904b08c18eb7d7fddd316960b137..217e5d200f5fb6516dbcd5c278ca8e122abe4b6f 100644
--- a/src/profilemodel.h
+++ b/src/profilemodel.h
@@ -61,7 +61,7 @@ public:
 
 private:
    ProfileModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(ProfileModel);
+   Q_DECLARE_PRIVATE(ProfileModel)
 
    //Singleton
    static ProfileModel* m_spInstance;
diff --git a/src/tlsmethodmodel.cpp b/src/tlsmethodmodel.cpp
index 55dfb4f0c28b027122db873b85b4a4350cf205a6..0d14981619806a7b140c99de77e68f5ea87ab94d 100644
--- a/src/tlsmethodmodel.cpp
+++ b/src/tlsmethodmodel.cpp
@@ -183,4 +183,4 @@ TlsMethodModel::Type TlsMethodModelPrivate::fromDaemonName(const QString& name)
    return TlsMethodModel::Type::DEFAULT;
 }
 
-#include <tlsmethodmodel.moc>
\ No newline at end of file
+#include <tlsmethodmodel.moc>
diff --git a/src/tlsmethodmodel.h b/src/tlsmethodmodel.h
index 11a91213c16d5494f5c78217333752d7a713ab4b..e1afec2bb6bcac836f0d82a1d846b2c9ed4cda2c 100644
--- a/src/tlsmethodmodel.h
+++ b/src/tlsmethodmodel.h
@@ -65,7 +65,7 @@ public:
 
 private:
    TlsMethodModelPrivate* d_ptr;
-   Q_DECLARE_PRIVATE(TlsMethodModel);
+   Q_DECLARE_PRIVATE(TlsMethodModel)
 
 };
 Q_DECLARE_METATYPE(TlsMethodModel*)
diff --git a/src/uri.cpp b/src/uri.cpp
index e5956d0c865eca76466a8d9308b9faba26e40355..943129e5158c2de11affc44d914a15d4da131f51 100644
--- a/src/uri.cpp
+++ b/src/uri.cpp
@@ -39,7 +39,8 @@ private:
    QString* q_ptr;
 };
 
-URIPrivate::URIPrivate(QString* uri) : m_Parsed(false),m_HeaderType(URI::SchemeType::NONE),q_ptr(uri)
+URIPrivate::URIPrivate(QString* uri) : m_Parsed(false),m_HeaderType(URI::SchemeType::NONE),q_ptr(uri),
+m_hasChevrons(false)
 {
 }
 
diff --git a/src/useractionmodel.h b/src/useractionmodel.h
index 8323b2b1140035a40f65ed1f0a3afa95c7f7e1d3..d3be3cb1fdb5b4e255934248f2ab22363f3e9afb 100644
--- a/src/useractionmodel.h
+++ b/src/useractionmodel.h
@@ -73,7 +73,7 @@ public:
    };
    Q_ENUMS(Action)
 
-   Q_PROPERTY(QSortFilterProxyModel* activeActionModel READ activeActionModel);
+   Q_PROPERTY(QSortFilterProxyModel* activeActionModel READ activeActionModel)
 
    //Constructor
    explicit UserActionModel(Call* parent);
diff --git a/src/vcardutils.cpp b/src/vcardutils.cpp
index 72a20024bfa0ccc4328a633fa3ccafff4b791f19..520d66a43d20a4379253da56ae91250ab9eec100 100644
--- a/src/vcardutils.cpp
+++ b/src/vcardutils.cpp
@@ -49,16 +49,16 @@ void VCardUtils::startVCard(const QString& version)
 
 void VCardUtils::addProperty(const char* prop, const QString& value)
 {
-   if(value.isEmpty() || value == ";")
+   if (value.isEmpty() || value == QString(';'))
       return;
-   m_vCard << QString(QString::fromUtf8(prop) + ":" + value);
+   m_vCard << (QString::fromUtf8(prop) + ':' + value);
 }
 
 void VCardUtils::addProperty(const QString& prop, const QString& value)
 {
-   if(value.isEmpty() || value == ";")
+   if (value.isEmpty() || value == QString(';'))
       return;
-   m_vCard << QString(prop + ":" + value);
+   m_vCard << (prop + ':' + value);
 }
 
 void VCardUtils::addEmail(const QString& type, const QString& email)
@@ -101,12 +101,12 @@ void VCardUtils::addContactMethod(const QString& type, const QString& num)
 
 void VCardUtils::addPhoto(const QByteArray img)
 {
-   m_vCard << QString(QString::fromUtf8(Property::PHOTO) +
-                      QString::fromUtf8(Delimiter::SEPARATOR_TOKEN) +
-                      "ENCODING=BASE64" +
-                      QString::fromUtf8(Delimiter::SEPARATOR_TOKEN) +
-                      "TYPE=PNG:" +
-                      img.toBase64());
+   m_vCard << (QString::fromUtf8(Property::PHOTO) +
+               QString::fromUtf8(Delimiter::SEPARATOR_TOKEN) +
+               "ENCODING=BASE64" +
+               QString::fromUtf8(Delimiter::SEPARATOR_TOKEN) +
+               "TYPE=PNG:" +
+               img.toBase64());
 }
 
 const QByteArray VCardUtils::endVCard()
diff --git a/src/video/channel.cpp b/src/video/channel.cpp
index cb33572777a9ab488f5fe696d1ecda933e538595..beb9b3b062586beb66a7e8001fd40acbdfa8d876 100644
--- a/src/video/channel.cpp
+++ b/src/video/channel.cpp
@@ -24,7 +24,8 @@
 #include "../private/videochannel_p.h"
 #include "../private/videodevice_p.h"
 
-VideoChannelPrivate::VideoChannelPrivate() : m_pCurrentResolution(nullptr)
+VideoChannelPrivate::VideoChannelPrivate() : m_pCurrentResolution(nullptr),
+m_pDevice(nullptr)
 {
 }
 
diff --git a/src/video/sourcesmodel.cpp b/src/video/sourcesmodel.cpp
index ad7356d9ae3a8f311b8b77331789824678073334..950462e27612642f12338e8e361b452b86ccc3c1 100644
--- a/src/video/sourcesmodel.cpp
+++ b/src/video/sourcesmodel.cpp
@@ -61,6 +61,11 @@ d_ptr(new Video::SourcesModelPrivate())
    d_ptr->m_Display.rect = QRect(0,0,0,0);
 }
 
+Video::SourcesModel::~SourcesModel()
+{
+   delete d_ptr;
+}
+
 Video::SourcesModel* Video::SourcesModel::instance()
 {
    if (!m_spInstance)
diff --git a/src/video/sourcesmodel.h b/src/video/sourcesmodel.h
index 1e0cfcb4b60c2aac3ab1bdd74c1486c24cb1779f..782185c4fbd8505012d414735d145400f9889324 100644
--- a/src/video/sourcesmodel.h
+++ b/src/video/sourcesmodel.h
@@ -52,6 +52,7 @@ public:
    static Video::SourcesModel* instance();
 private:
    explicit SourcesModel();
+   virtual ~SourcesModel();
 
    Video::SourcesModelPrivate* d_ptr;
    static Video::SourcesModel* m_spInstance;