Index: src/plugin/ATL_Deprecate.cpp
===================================================================
--- a/src/plugin/ATL_Deprecate.cpp
+++ b/src/plugin/ATL_Deprecate.cpp
@@ -6,21 +6,11 @@
 
 std::wstring ToWstring(const ATL::CString& s)
 {
-  std::wstring result(static_cast<const wchar_t *>(s));
+  std::wstring result(static_cast<const wchar_t*>(s));
   return result;
 }
 
-std::wstring to_wstring(const ATL::CString& s)
-{
-  return ToWstring(s);
-}
-
 ATL::CString ToCString(const std::wstring& s)
 {
   return ATL::CString(s.c_str());
 }
-
-ATL::CString to_CString(const std::wstring& s)
-{
-  return ToCString(s);
-}
Index: src/plugin/AdblockPlusClient.cpp
===================================================================
--- a/src/plugin/AdblockPlusClient.cpp
+++ b/src/plugin/AdblockPlusClient.cpp
@@ -15,7 +15,7 @@
   void SpawnAdblockPlusEngine()
   {
     std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe";
-    CString params = to_CString(L"AdblockPlusEngine.exe " + GetBrowserLanguage());
+    CString params = ToCString(L"AdblockPlusEngine.exe " + GetBrowserLanguage());
 
     STARTUPINFO startupInfo = {};
     PROCESS_INFORMATION processInformation = {};
Index: src/plugin/AdblockPlusDomTraverser.cpp
===================================================================
--- a/src/plugin/AdblockPlusDomTraverser.cpp
+++ b/src/plugin/AdblockPlusDomTraverser.cpp
@@ -37,7 +37,7 @@
   // Check if element is hidden
   CPluginClient* client = CPluginClient::GetInstance();
 
-  cache->m_isHidden = client->IsElementHidden(to_wstring(tag), pEl, m_domain, to_wstring(indent), m_tab->m_filter.get());
+  cache->m_isHidden = client->IsElementHidden(ToWstring(tag), pEl, m_domain, ToWstring(indent), m_tab->m_filter.get());
   if (cache->m_isHidden)
   {
     HideElement(pEl, tag, L"", false, indent);
Index: src/plugin/PluginClass.cpp
===================================================================
--- a/src/plugin/PluginClass.cpp
+++ b/src/plugin/PluginClass.cpp
@@ -1248,11 +1248,11 @@
       std::wstring urlString = GetTab()->GetDocumentUrl();
       if (client->IsWhitelistedUrl(urlString))
       {
-        settings->RemoveWhiteListedDomain(to_CString(client->GetHostFromUrl(urlString)));
+        settings->RemoveWhiteListedDomain(ToCString(client->GetHostFromUrl(urlString)));
       }
       else
       {
-        settings->AddWhiteListedDomain(to_CString(client->GetHostFromUrl(urlString)));
+        settings->AddWhiteListedDomain(ToCString(client->GetHostFromUrl(urlString)));
       }
       GetBrowser()->Refresh();
     }
Index: src/plugin/PluginDebug.cpp
===================================================================
--- a/src/plugin/PluginDebug.cpp
+++ b/src/plugin/PluginDebug.cpp
@@ -192,7 +192,7 @@
   }
 
   CString blocking;
-  blocking.Format(L"Blocked  %-12s  %-20s  %s", type, domain.empty()? L"-" : to_CString(domain), srcTrunc);
+  blocking.Format(L"Blocked  %-12s  %-20s  %s", type, domain.empty()? L"-" : ToCString(domain), srcTrunc);
 
   DebugResult(blocking);
 }
@@ -236,7 +236,7 @@
   }
 
   CString blocking;
-  blocking.Format(L"Ignored  %-12s  %s  %s", type, domain.empty()? L"-" : to_CString(domain), srcTrunc);
+  blocking.Format(L"Ignored  %-12s  %s  %s", type, domain.empty()? L"-" : ToCString(domain), srcTrunc);
 
   DebugResult(blocking);
 }
Index: src/plugin/PluginDomTraverserBase.h
===================================================================
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -274,7 +274,7 @@
             // eg. http://w3schools.com/html/html_examples.asp
             else if (srcLegacy.Left(4) != L"http" && srcLegacy.Left(6) != L"res://")
             {
-              srcLegacy = L"http://" + to_CString(m_domain) + srcLegacy;
+              srcLegacy = L"http://" + ToCString(m_domain) + srcLegacy;
             }
             std::wstring src(ToWstring(srcLegacy));
             UnescapeUrl(src);
Index: src/plugin/PluginFilter.cpp
===================================================================
--- a/src/plugin/PluginFilter.cpp
+++ b/src/plugin/PluginFilter.cpp
@@ -536,7 +536,7 @@
 
 bool CPluginFilter::IsElementHidden(const std::wstring& tag, IHTMLElement* pEl, const std::wstring& domain, const std::wstring& indent) const
 {
-  CString tagCString = to_CString(tag);
+  CString tagCString = ToCString(tag);
 
   CString id;
   CComBSTR bstrId;
@@ -728,7 +728,7 @@
   }
 
   CPluginClient* client = CPluginClient::GetInstance();
-  if (client->Matches(srcTrimmed, to_wstring(type), domain))
+  if (client->Matches(srcTrimmed, ToWstring(type), domain))
   {
     if (addDebug)
     {
Index: src/plugin/PluginSettings.cpp
===================================================================
--- a/src/plugin/PluginSettings.cpp
+++ b/src/plugin/PluginSettings.cpp
@@ -20,7 +20,7 @@
 {
   std::wstring CreateDomainWhitelistingFilter(const CString& domain)
   {
-    return L"@@||" + to_wstring(domain) + L"^$document";
+    return L"@@||" + ToWstring(domain) + L"^$document";
   }
 }
 
@@ -265,7 +265,7 @@
 
 CString CPluginSettings::GetAppLocale()
 {
-  return to_CString(GetBrowserLanguage());
+  return ToCString(GetBrowserLanguage());
 }
 
 CString CPluginSettings::GetDocumentationLink()
Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -301,7 +301,7 @@
     m_boundDomain = ExtractHttpHeader<std::wstring>(*pszAdditionalHeaders, L"Referer:", L"\n");
   }
   m_boundDomain = TrimString(m_boundDomain);
-  m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDomain, ToCString(src));
+  m_contentType = GetContentType(ATL::CString(acceptHeader.c_str()), m_boundDomain, src);
   CPluginTab* tab = CPluginClass::GetTab(::GetCurrentThreadId());
   CPluginClient* client = CPluginClient::GetInstance();
 
