diff --git a/src/abstractitembackendmodelextension.cpp b/src/abstractitembackendmodelextension.cpp
index 8e8f5aad4d09399d40fa7b8a3f3f01f2c726e69d..b9dd74efeee1c99a61b4c84ea6b5c21210d54095 100644
--- a/src/abstractitembackendmodelextension.cpp
+++ b/src/abstractitembackendmodelextension.cpp
@@ -21,4 +21,4 @@
 AbstractItemBackendModelExtension::AbstractItemBackendModelExtension(QObject* parent) : QObject(parent)
 {
    
-}
\ No newline at end of file
+}
diff --git a/src/abstractitembackendmodelextension.h b/src/abstractitembackendmodelextension.h
index 547a5c50fef4c7bd2b56ea7c10e35384d9b37019..4fb81c2e9fdb1026fcca07c7aef52e84f422a353 100644
--- a/src/abstractitembackendmodelextension.h
+++ b/src/abstractitembackendmodelextension.h
@@ -30,7 +30,7 @@ class LIB_EXPORT AbstractItemBackendModelExtension : public QObject
    Q_OBJECT
 
 public:
-   AbstractItemBackendModelExtension(QObject* parent);
+   explicit AbstractItemBackendModelExtension(QObject* parent);
 
    virtual QVariant      data    (AbstractContactBackend* backend, const QModelIndex& index, int role = Qt::DisplayRole      ) const = 0;
    virtual Qt::ItemFlags flags   (AbstractContactBackend* backend, const QModelIndex& index                                  ) const = 0;
@@ -41,4 +41,4 @@ Q_SIGNALS:
    void dataChanged(const QModelIndex& idx);
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/accountmodel.h b/src/accountmodel.h
index 513b33fa465b61e92bca39f68a1cf486140a7570..851fdb8fd0894977f17661481379f158453bd635 100644
--- a/src/accountmodel.h
+++ b/src/accountmodel.h
@@ -16,9 +16,8 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-
-#ifndef ACCOUNT_LIST_H
-#define ACCOUNT_LIST_H
+#ifndef ACCOUNTMODEL_H
+#define ACCOUNTMODEL_H
 
 
 #include <QtCore/QVector>
diff --git a/src/audio/alsapluginmodel.h b/src/audio/alsapluginmodel.h
index 5920fb34654fcb1b1a24db96dfad643bcef286a6..fde12a405e0645cf220bb1b53b980075df644397 100644
--- a/src/audio/alsapluginmodel.h
+++ b/src/audio/alsapluginmodel.h
@@ -59,4 +59,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/inputdevicemodel.h b/src/audio/inputdevicemodel.h
index 560058525899c952a4111d1eec655be0aab5d36a..01c3ca3eb5ed178d4cdd3145ade0728ebac73840 100644
--- a/src/audio/inputdevicemodel.h
+++ b/src/audio/inputdevicemodel.h
@@ -59,4 +59,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/managermodel.h b/src/audio/managermodel.h
index 1e46caf0785bf0e1c66955ce0ad5bf8d5bc9b78f..6b5a2f9e0bed67ad3d3bf70a8c41520760ee4102 100644
--- a/src/audio/managermodel.h
+++ b/src/audio/managermodel.h
@@ -70,4 +70,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/outputdevicemodel.h b/src/audio/outputdevicemodel.h
index f55ba9d831ce2b44ae2b8207292d4bc16bac2530..ac6572ae9685500d5226d508fa7346ec5bf0d9c9 100644
--- a/src/audio/outputdevicemodel.h
+++ b/src/audio/outputdevicemodel.h
@@ -59,4 +59,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/ringtonedevicemodel.h b/src/audio/ringtonedevicemodel.h
index 646e21aa3f39cfb1cf3c60820e040590d150354f..2250e96ff2cb24794029827074f57498d7fdf7cf 100644
--- a/src/audio/ringtonedevicemodel.h
+++ b/src/audio/ringtonedevicemodel.h
@@ -59,4 +59,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/settings.h b/src/audio/settings.h
index 88ee2bc73f26864518de0ba9262cc14809649651..db915732cf1bf9a0e796988f9d171de3df1b7f9d 100644
--- a/src/audio/settings.h
+++ b/src/audio/settings.h
@@ -115,4 +115,4 @@ private:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/contact.h b/src/contact.h
index 1f654f4b8b40ec87a95b13b27ad1a9a561aaa9b8..b6fee3e8abef8aaee89db187b184c368b15149b1 100644
--- a/src/contact.h
+++ b/src/contact.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- *   Copyright (C) 2009-2015 by Savoir-Faire Linux                          *
+ *   Copyright (C) 2009-2014 by Savoir-Faire Linux                          *
  *   Author : Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>          *
  *            Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
  *                                                                          *
@@ -154,7 +154,7 @@ protected:
 class LIB_EXPORT ContactPlaceHolder : public Contact {
    Q_OBJECT
 public:
-   ContactPlaceHolder(const QByteArray& uid);
+   explicit ContactPlaceHolder(const QByteArray& uid);
    bool merge(Contact* contact);
 };
 
diff --git a/src/extensions/presenceitembackendmodelextension.h b/src/extensions/presenceitembackendmodelextension.h
index 57104e79baa519ed709e208c4d82e6505489a39a..9c92ecd7a73930a0dafcb8b51195eb4eeb10bf46 100644
--- a/src/extensions/presenceitembackendmodelextension.h
+++ b/src/extensions/presenceitembackendmodelextension.h
@@ -32,7 +32,7 @@ class LIB_EXPORT PresenceItemBackendModelExtension : public AbstractItemBackendM
    Q_OBJECT
 
 public:
-   PresenceItemBackendModelExtension(QObject* parent);
+   explicit PresenceItemBackendModelExtension(QObject* parent);
 
    virtual QVariant      data    (AbstractContactBackend* backend, const QModelIndex& index, int role = Qt::DisplayRole      ) const override;
    virtual Qt::ItemFlags flags   (AbstractContactBackend* backend, const QModelIndex& index                                  ) const override;
@@ -40,4 +40,4 @@ public:
    virtual QString       headerName() const override;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/hookmanager.h b/src/hookmanager.h
index 2b24705299fc34f6fd15800d01ed33f6cb5f288d..8754d33363286c5c1137bc09db893b085f1aad9a 100644
--- a/src/hookmanager.h
+++ b/src/hookmanager.h
@@ -64,4 +64,4 @@ private:
    static HookManager* m_spInstance;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/imconversationmanager.cpp b/src/imconversationmanager.cpp
index 71e85c41a8339114e2babfa3af68a5e0a7ccae10..91d1ad1bf8c69a6d5c301c69c45afd3f0b2529bc 100644
--- a/src/imconversationmanager.cpp
+++ b/src/imconversationmanager.cpp
@@ -58,14 +58,14 @@ IMConversationManager* IMConversationManager::instance()
 
 IMConversationManager::~IMConversationManager()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 ///Constructor
 IMConversationManager::IMConversationManager() : QObject(nullptr), d_ptr(new IMConversationManagerPrivate(this))
 {
    CallManagerInterface& callManager = DBus::CallManager::instance();
-   connect(&callManager, SIGNAL(incomingMessage(QString,QString,QString)), d_ptr, SLOT(newMessage(QString,QString,QString)));
+   connect(&callManager, SIGNAL(incomingMessage(QString,QString,QString)), d_ptr.data(), SLOT(newMessage(QString,QString,QString)));
 }
 
 ///Called when a new message is incoming
diff --git a/src/imconversationmanager.h b/src/imconversationmanager.h
index ab9cfef5e685afe41d05efce1f9cdfde7f36177d..8a9caeee8fa1897c7df6bb840034d29cbb001a47 100644
--- a/src/imconversationmanager.h
+++ b/src/imconversationmanager.h
@@ -45,7 +45,7 @@ private:
    explicit IMConversationManager();
    virtual ~IMConversationManager();
 
-   IMConversationManagerPrivate* d_ptr;
+   const QScopedPointer<IMConversationManagerPrivate> d_ptr;
    Q_DECLARE_PRIVATE(IMConversationManager)
 
    //Static attributes
@@ -57,4 +57,4 @@ Q_SIGNALS:
    void newMessagingModel(Call*,InstantMessagingModel*);
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/instantmessagingmodel.cpp b/src/instantmessagingmodel.cpp
index cced584602f4ca22bd20cb86ecf9016808eece2b..9d747a1aeb13d02dd9314735f5eb55ec44bf52f5 100644
--- a/src/instantmessagingmodel.cpp
+++ b/src/instantmessagingmodel.cpp
@@ -45,7 +45,7 @@ InstantMessagingModel::InstantMessagingModel(Call* call, QObject* par) : QAbstra
 
 InstantMessagingModel::~InstantMessagingModel()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 ///Get data from the model
diff --git a/src/instantmessagingmodel.h b/src/instantmessagingmodel.h
index 1ecd86f70c60a3177c00ceb5490dd1cf3a2dfbbd..38e744498cdf5dd7014a3c0e91a210abd885df16 100644
--- a/src/instantmessagingmodel.h
+++ b/src/instantmessagingmodel.h
@@ -66,7 +66,7 @@ public:
    virtual bool  setData  ( const QModelIndex& index, const QVariant &value, int role)       override;
 
 private:
-   InstantMessagingModelPrivate* d_ptr;
+   const QScopedPointer<InstantMessagingModelPrivate> d_ptr;
    Q_DECLARE_PRIVATE(InstantMessagingModel)
 };
 #endif
diff --git a/src/keyexchangemodel.cpp b/src/keyexchangemodel.cpp
index 3a5982006c2bbce463a11beee16a28b4c017104b..1db20559afefcc351a7a8a88a1a67b1ede80944b 100644
--- a/src/keyexchangemodel.cpp
+++ b/src/keyexchangemodel.cpp
@@ -50,7 +50,7 @@ KeyExchangeModel::KeyExchangeModel(Account* account) : QAbstractListModel(accoun
 
 KeyExchangeModel::~KeyExchangeModel()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 //Model functions
diff --git a/src/keyexchangemodel.h b/src/keyexchangemodel.h
index 361a96cc5fff37f07a9079a10ad20d20ad6773aa..c24c73c599a3480d6eeb26d7699d984a530ee864 100644
--- a/src/keyexchangemodel.h
+++ b/src/keyexchangemodel.h
@@ -89,7 +89,7 @@ public:
 
 
 private:
-   KeyExchangeModelPrivate* d_ptr;
+   QScopedPointer<KeyExchangeModelPrivate> d_ptr;
 
 public Q_SLOTS:
    void enableSRTP(bool enable);
diff --git a/src/lastusednumbermodel.cpp b/src/lastusednumbermodel.cpp
index a79728f0a08313445822468aa97ca4eb3312636d..1d688acf56446eeae57e316b64ed5b3c079773a3 100644
--- a/src/lastusednumbermodel.cpp
+++ b/src/lastusednumbermodel.cpp
@@ -56,7 +56,7 @@ LastUsedNumberModel::LastUsedNumberModel() : QAbstractListModel(),d_ptr(new Last
 
 LastUsedNumberModel::~LastUsedNumberModel()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 LastUsedNumberModel* LastUsedNumberModel::instance()
diff --git a/src/lastusednumbermodel.h b/src/lastusednumbermodel.h
index 52bf2cedaf0a8e73605c2d66ba0de580c3a9ce0e..0909cdfe25630b74e320640cddc1061346ae4d9d 100644
--- a/src/lastusednumbermodel.h
+++ b/src/lastusednumbermodel.h
@@ -49,7 +49,7 @@ private:
    explicit LastUsedNumberModel();
    virtual ~LastUsedNumberModel();
 
-   LastUsedNumberModelPrivate* d_ptr;
+   QScopedPointer<LastUsedNumberModelPrivate> d_ptr;
    Q_DECLARE_PRIVATE(LastUsedNumberModel)
 
    //Static attributes
diff --git a/src/numbercategorymodel.cpp b/src/numbercategorymodel.cpp
index 42c9f85bfb57f190979d884e20f483c705342f3b..d2565023d35d85860cfe98d0b07bbbe1cb512c2a 100644
--- a/src/numbercategorymodel.cpp
+++ b/src/numbercategorymodel.cpp
@@ -45,7 +45,7 @@ NumberCategoryModel::NumberCategoryModel(QObject* parent) : QAbstractListModel(p
 
 NumberCategoryModel::~NumberCategoryModel()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 //Abstract model member
diff --git a/src/numbercategorymodel.h b/src/numbercategorymodel.h
index 92e037865b72a5fda3f7504cfa8ed2475f362d65..8f836c34b3082f1b52ddaf1bf87ad996c19a5478 100644
--- a/src/numbercategorymodel.h
+++ b/src/numbercategorymodel.h
@@ -64,7 +64,7 @@ private:
    explicit NumberCategoryModel(QObject* parent = nullptr);
    ~NumberCategoryModel();
 
-   NumberCategoryModelPrivate* d_ptr;
+   QScopedPointer<NumberCategoryModelPrivate> d_ptr;
 
    //Singleton
    static NumberCategoryModel* m_spInstance;
diff --git a/src/numbercompletionmodel.cpp b/src/numbercompletionmodel.cpp
index 0a198e5e4401726cc7bdb8135f2dcd387aaa8b9e..3ff0527631bd1acb77e4fc236e871cda80e8e916 100644
--- a/src/numbercompletionmodel.cpp
+++ b/src/numbercompletionmodel.cpp
@@ -342,4 +342,3 @@ bool NumberCompletionModel::isUsingUnregisteredAccounts()
 }
 
 #include <numbercompletionmodel.moc>
-
diff --git a/src/private/call_p.h b/src/private/call_p.h
index ac4590ebb50ee05b41a42132273233580826024f..e6f339804cc4d90974ec832750253cb70a546af9 100644
--- a/src/private/call_p.h
+++ b/src/private/call_p.h
@@ -96,7 +96,7 @@ public:
       constexpr static const char* OUTGOING = "1";
    };
 
-   CallPrivate(Call* parent);
+   explicit CallPrivate(Call* parent);
 
    //Attributes
    Account*                 m_Account         ;
@@ -223,4 +223,4 @@ private Q_SLOTS:
    void updated();
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/private/instantmessagingmodel_p.h b/src/private/instantmessagingmodel_p.h
index 794d7639382906f0b16aef5fc742e76f3207103c..dace08f016010200c225cb731bb5d83855b39d79 100644
--- a/src/private/instantmessagingmodel_p.h
+++ b/src/private/instantmessagingmodel_p.h
@@ -27,7 +27,7 @@ class InstantMessagingModelPrivate : public QObject
 {
    Q_OBJECT
 public:
-   InstantMessagingModelPrivate(InstantMessagingModel* parent);
+   explicit InstantMessagingModelPrivate(InstantMessagingModel* parent);
 
    //Private members
    void addIncommingMessage(const QString& from, const QString& message);
@@ -47,4 +47,4 @@ private:
    InstantMessagingModel* q_ptr;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/private/phonedirectorymodel_p.h b/src/private/phonedirectorymodel_p.h
index 634d63c866cffb42988b8bd1fd54b728369809da..9c1fe9a04efc43f4385add86ec73b188b577c527 100644
--- a/src/private/phonedirectorymodel_p.h
+++ b/src/private/phonedirectorymodel_p.h
@@ -33,7 +33,7 @@ class PhoneDirectoryModelPrivate : public QObject
 {
    Q_OBJECT
 public:
-   PhoneDirectoryModelPrivate(PhoneDirectoryModel* parent);
+   explicit PhoneDirectoryModelPrivate(PhoneDirectoryModel* parent);
 
 
    //Model columns
@@ -84,4 +84,4 @@ private Q_SLOTS:
    void slotNewBuddySubscription(const QString& uri, const QString& accountId, bool status, const QString& message);
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/private/videochannel_p.h b/src/private/videochannel_p.h
index 3659b797734c6cbbcfa97c841029fcc2ccc1fccc..e2d5e679153da187ff665c3e7737353f61d569b8 100644
--- a/src/private/videochannel_p.h
+++ b/src/private/videochannel_p.h
@@ -28,4 +28,4 @@ public:
    Video::Device*              m_pDevice;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/private/videocodec_p.h b/src/private/videocodec_p.h
index ea7bafa027d383b7129511eca91fb22d0b97fd21..0316dc4755117fc5e197f939fdd9fcda8c93acac 100644
--- a/src/private/videocodec_p.h
+++ b/src/private/videocodec_p.h
@@ -43,4 +43,4 @@ public:
    QString          m_Parameters;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/private/videodevice_p.h b/src/private/videodevice_p.h
index 716d6a0cb6302e6094ebd9a35a62410f976d6c7c..8f8f4019a6687747e203af51d2a5f72ddea0bd59 100644
--- a/src/private/videodevice_p.h
+++ b/src/private/videodevice_p.h
@@ -37,4 +37,4 @@ public:
    QList<Video::Channel*> m_lChannels      ;
 };
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/securityvalidationmodel.h b/src/securityvalidationmodel.h
index d0b472701cee0c5b3aa5fe114e2792489bc6feb5..101c5dad7bf6e1311a46468e38e11eacdc18c7ed 100644
--- a/src/securityvalidationmodel.h
+++ b/src/securityvalidationmodel.h
@@ -156,7 +156,7 @@ public:
    SecurityValidationModel::Severity severity() const;
 private:
    //Constructor
-   Flaw(SecurityValidationModel::SecurityFlaw f,Certificate::Type type = Certificate::Type::NONE)
+   explicit Flaw(SecurityValidationModel::SecurityFlaw f,Certificate::Type type = Certificate::Type::NONE)
    : m_flaw(f),m_certType(type),m_Row(-1)
    {
       m_severity = SecurityValidationModel::flawSeverity[f];
diff --git a/src/uri.cpp b/src/uri.cpp
index 8d38657cee8d7bc55e989497ec276d50b577bff9..a1338fd208b0981baeeafecb97adbb76505b8bb4 100644
--- a/src/uri.cpp
+++ b/src/uri.cpp
@@ -33,7 +33,7 @@ public:
    bool             m_Parsed      ;
 
    //Helper
-   static QString strip(const QString& uri, URI::SchemeType& sheme);
+   static QString strip(const QString& uri, URI::SchemeType& scheme);
    void parse();
 private:
    QString* q_ptr;
@@ -64,7 +64,7 @@ URI::~URI()
 {
    (*static_cast<QString*>(this)) = QString();
    d_ptr->m_Stripped = QString();
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 URI& URI::operator=(const URI& o)
@@ -80,18 +80,18 @@ URI& URI::operator=(const URI& o)
 }
 
 ///Strip out <sip:****> from the URI
-QString URIPrivate::strip(const QString& uri, URI::SchemeType& sheme)
+QString URIPrivate::strip(const QString& uri, URI::SchemeType& scheme)
 {
    if (uri.isEmpty())
       return QString();
    int start(0),end(uri.size()-1); //Other type of comparisons were too slow
    if (end > 5 && uri[0] == '<' ) {
       if (uri[4] == ':') {
-         sheme = uri[1] == 's'?URI::SchemeType::SIP : URI::SchemeType::IAX;
+         scheme = uri[1] == 's'?URI::SchemeType::SIP : URI::SchemeType::IAX;
          start = 5;
       }
       else if (uri[5] == ':') {
-         sheme = URI::SchemeType::SIPS;
+         scheme = URI::SchemeType::SIPS;
          start = 6;
       }
    }
@@ -122,9 +122,9 @@ bool URI::hasHostname() const
 void URIPrivate::parse()
 {
    if (q_ptr->indexOf('@') != -1) {
-      const QStringList splitted = q_ptr->split('@');
-      m_Hostname = splitted[1];//splitted[1].left(splitted[1].size())
-      m_Userinfo = splitted[0];
+      const QStringList split = q_ptr->split('@');
+      m_Hostname = split[1];//split[1].left(split[1].size())
+      m_Userinfo = split[0];
       m_Parsed = true;
    }
 }
@@ -144,4 +144,4 @@ QString URI::fullUri() const
    return QString("<%1%2>")
       .arg(schemeNames[static_cast<int>(d_ptr->m_HeaderType == SchemeType::NONE?SchemeType::SIP:d_ptr->m_HeaderType)])
       .arg(*this);
-}
\ No newline at end of file
+}
diff --git a/src/uri.h b/src/uri.h
index 6732b568d813d30129fe886bcdaa90fde69623b9..8322b3aaedf4d922b3a93d8a369fe71c42ae8e59 100644
--- a/src/uri.h
+++ b/src/uri.h
@@ -25,7 +25,7 @@
 class URIPrivate;
 
 /**
-    * @class URI A specialised string with multiple attributes
+    * @class URI A specialized string with multiple attributes
     * 
     * Most of SFLPhone-KDE handle uri as strings, but more
     * advanced algorithms need to access the various sections.
@@ -117,9 +117,10 @@ public:
    bool    hasHostname() const;
 
    URI& operator=(const URI&);
+
 private:
-   URIPrivate* d_ptr;
+   const QScopedPointer<URIPrivate> d_ptr;
 };
 // Q_DECLARE_METATYPE(URI*)
 
-#endif //URI_H
\ No newline at end of file
+#endif //URI_H
diff --git a/src/useractionmodel.h b/src/useractionmodel.h
index 97e4cca8bdee06167e3fb77f8ad5b9f2326a903f..7ba939476b9d9d996fe7dcedc011b0571307ce7a 100644
--- a/src/useractionmodel.h
+++ b/src/useractionmodel.h
@@ -97,7 +97,7 @@ public:
    bool isAcceptEnabled  () const;
 
 private:
-   UserActionModelPrivate* d_ptr;
+   const QScopedPointer<UserActionModelPrivate> d_ptr;
    Q_DECLARE_PRIVATE(UserActionModel)
 
 Q_SIGNALS:
diff --git a/src/video/channel.cpp b/src/video/channel.cpp
index d22ffa23aac6da8fbba99e8fc52106fcbc800bf4..59de066ee300e80fbe2491f624448ea861b31ff8 100644
--- a/src/video/channel.cpp
+++ b/src/video/channel.cpp
@@ -37,7 +37,7 @@ d_ptr(new VideoChannelPrivate())
 
 Video::Channel::~Channel()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 QVariant Video::Channel::data( const QModelIndex& index, int role) const
@@ -122,4 +122,3 @@ Video::Device* Video::Channel::device() const
 {
    return d_ptr->m_pDevice;
 }
-
diff --git a/src/video/channel.h b/src/video/channel.h
index 67fb0ef7d4b2a84f7a023581c6b7a0eab6ac1c69..162747edaf2ebf6dc7480ba4a05c39226e376fea 100644
--- a/src/video/channel.h
+++ b/src/video/channel.h
@@ -55,7 +55,7 @@ private:
    Channel(Video::Device* dev,const QString& name);
    virtual ~Channel();
 
-   VideoChannelPrivate* d_ptr;
+   QScopedPointer<VideoChannelPrivate> d_ptr;
 };
 
 }
diff --git a/src/video/codecmodel2.cpp b/src/video/codecmodel2.cpp
index 715c7b1c567ffdd7fdfcc44e724d39779c234d6b..1f3b942cac9699711b41ac538b4097487aec2da7 100644
--- a/src/video/codecmodel2.cpp
+++ b/src/video/codecmodel2.cpp
@@ -54,7 +54,7 @@ Video::CodecModel2::~CodecModel2()
       d_ptr->m_lCodecs.removeAt(0);
       delete c;
    }
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 ///Get data from the model
diff --git a/src/video/codecmodel2.h b/src/video/codecmodel2.h
index 14a730a7932c2bc43e9223c4fc217936fef37af2..75ee96303ba686468cd766d17137087eeebebea4 100644
--- a/src/video/codecmodel2.h
+++ b/src/video/codecmodel2.h
@@ -15,8 +15,8 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-#ifndef VIDEOCODECMODEL_H
-#define VIDEOCODECMODEL_H
+#ifndef CODECMODEL2_H
+#define CODECMODEL2_H
 
 #include "../typedefs.h"
 #include <QtCore/QAbstractListModel>
@@ -65,7 +65,7 @@ public:
    bool moveDown(const QModelIndex& idx);
 
 private:
-   CodecModelPrivate* d_ptr;
+   QScopedPointer<CodecModelPrivate> d_ptr;
 
 };
 
diff --git a/src/video/device.cpp b/src/video/device.cpp
index d08a026ed13f1edfbffb375e44ce1552246f82b4..b22a0d0d140059e95dc7893f567426099a4c154d 100644
--- a/src/video/device.cpp
+++ b/src/video/device.cpp
@@ -63,7 +63,7 @@ d_ptr(new VideoDevicePrivate())
 ///Destructor
 Video::Device::~Device()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 QVariant Video::Device::data( const QModelIndex& index, int role) const
diff --git a/src/video/device.h b/src/video/device.h
index 9d75e1d570df5f85488d0c24048141ed7fbc9681..2f1cf6d102c2cb59a217ad5a61ab1eef3b349653 100644
--- a/src/video/device.h
+++ b/src/video/device.h
@@ -86,7 +86,7 @@ class LIB_EXPORT Device : public QAbstractListModel {
       explicit Device(const QString& id);
       virtual ~Device();
 
-      VideoDevicePrivate* d_ptr;
+      QScopedPointer<VideoDevicePrivate> d_ptr;
 
 
    Q_SIGNALS:
diff --git a/src/video/devicemodel.cpp b/src/video/devicemodel.cpp
index b422c716db04d540d03c380747d96a239176304e..8f4f0a16aa71b11005fd4804b24c17c07034a6c2 100644
--- a/src/video/devicemodel.cpp
+++ b/src/video/devicemodel.cpp
@@ -100,7 +100,7 @@ Video::DeviceModel::~DeviceModel()
       d_ptr->m_lDevices.removeAt(0);
       delete c;
    }
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 ///Save the current model over dbus
diff --git a/src/video/devicemodel.h b/src/video/devicemodel.h
index a550dbabcc0fc5fc2749472a3be328cf0912c8b2..314d1ebc0ffb33eb0ca6e1c6f1aa07ee0bd0452c 100644
--- a/src/video/devicemodel.h
+++ b/src/video/devicemodel.h
@@ -59,7 +59,7 @@ public:
    QList<Video::Device*> devices() const;
 
 private:
-   DeviceModelPrivate* d_ptr;
+   const QScopedPointer<DeviceModelPrivate> d_ptr;
    static DeviceModel* m_spInstance;
 
 public Q_SLOTS:
diff --git a/src/video/manager.cpp b/src/video/manager.cpp
index 663eeb907adabe66f0f2702e244b4b431248477b..01ef8008ab31787a92a73faf5832b2cd33f5fad1 100644
--- a/src/video/manager.cpp
+++ b/src/video/manager.cpp
@@ -71,15 +71,15 @@ m_BufferSize(0),m_ShmKey(0),m_SemKey(0),m_PreviewState(false),m_SSMutex(new QMut
 Video::Manager::Manager():QThread(), d_ptr(new Video::ManagerPrivate(this))
 {
    VideoManagerInterface& interface = DBus::VideoManager::instance();
-   connect( &interface , SIGNAL(deviceEvent())                           , d_ptr, SLOT(deviceEvent())                           );
-   connect( &interface , SIGNAL(startedDecoding(QString,QString,int,int,bool)), d_ptr, SLOT(startedDecoding(QString,QString,int,int)));
-   connect( &interface , SIGNAL(stoppedDecoding(QString,QString,bool))        , d_ptr, SLOT(stoppedDecoding(QString,QString))        );
+   connect( &interface , SIGNAL(deviceEvent())                           , d_ptr.data(), SLOT(deviceEvent())                           );
+   connect( &interface , SIGNAL(startedDecoding(QString,QString,int,int,bool)), d_ptr.data(), SLOT(startedDecoding(QString,QString,int,int)));
+   connect( &interface , SIGNAL(stoppedDecoding(QString,QString,bool))        , d_ptr.data(), SLOT(stoppedDecoding(QString,QString))        );
 }
 
 
 Video::Manager::~Manager()
 {
-   delete d_ptr;
+//    delete d_ptr;
 }
 
 ///Singleton
diff --git a/src/video/manager.h b/src/video/manager.h
index 1d84cb64109bad17e095bb7f3cc81e6a67762c1b..818afd253d7182ae06ce972219189e382b4992e1 100644
--- a/src/video/manager.h
+++ b/src/video/manager.h
@@ -15,8 +15,8 @@
  *   You should have received a copy of the Lesser GNU General Public License *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
  *****************************************************************************/
-#ifndef VIDEO_MODEL_H
-#define VIDEO_MODEL_H
+#ifndef MANAGER_H
+#define MANAGER_H
 //Base
 #include "../typedefs.h"
 #include <QtCore/QThread>
@@ -65,7 +65,7 @@ private:
    explicit Manager();
    virtual ~Manager();
 
-   ManagerPrivate* d_ptr;
+   QScopedPointer<ManagerPrivate> d_ptr;
    Q_DECLARE_PRIVATE(Manager)
 
    //Static attributes
diff --git a/src/video/sourcesmodel.h b/src/video/sourcesmodel.h
index fd8d4f7883a7aa8c502f5542abee9c1d0e2bffe2..afe1e80b408442e284bb5d029135ae4e3f997e61 100644
--- a/src/video/sourcesmodel.h
+++ b/src/video/sourcesmodel.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- *   Copyright (C) 2014-2015 by Savoir-Faire Linux                          *
+ *   Copyright (C) 2014 by Savoir-Faire Linux                               *
  *   Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
  *                                                                          *
  *   This library is free software; you can redistribute it and/or          *
@@ -65,4 +65,4 @@ public Q_SLOTS:
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/visitors/numbercategoryvisitor.cpp b/src/visitors/numbercategoryvisitor.cpp
index 4be8eddca5f08abb9876d70b9e6ecce4201df7cc..7d8b4c5508951a1df5c4153b4f947c0376879743 100644
--- a/src/visitors/numbercategoryvisitor.cpp
+++ b/src/visitors/numbercategoryvisitor.cpp
@@ -50,4 +50,4 @@ void NumberCategoryVisitor::setInstance(NumberCategoryVisitor* ins)
 {
    m_spInstance = ins;
    ins->load(NumberCategoryModel::instance());
-}
\ No newline at end of file
+}
diff --git a/src/visitors/presenceserializationvisitor.cpp b/src/visitors/presenceserializationvisitor.cpp
index 8889ae6be3ffc8eb54aee0c708ba87309b2c6ac8..26ea038ad724dfb62c4dea07badf3f48b92d7025 100644
--- a/src/visitors/presenceserializationvisitor.cpp
+++ b/src/visitors/presenceserializationvisitor.cpp
@@ -62,4 +62,4 @@ void PresenceSerializationVisitor::setInstance(PresenceSerializationVisitor* ins
 {
    m_spInstance = ins;
    ins->load();
-}
\ No newline at end of file
+}