diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt
index 1ae0f4554..e9f388f12 100644
--- a/lib/base/CMakeLists.txt
+++ b/lib/base/CMakeLists.txt
@@ -25,7 +25,7 @@ mkclass_target(sysloglogger.ti sysloglogger.thpp)
 set(base_SOURCES
   application.cpp application.thpp array.cpp configerror.cpp console.cpp context.cpp
   convert.cpp debuginfo.cpp dictionary.cpp dynamicobject.cpp dynamicobject.thpp dynamictype.cpp
-  exception.cpp fifo.cpp filelogger.cpp filelogger.thpp json.cpp logger.cpp logger.thpp
+  exception.cpp fifo.cpp filelogger.cpp filelogger.thpp initialize.cpp json.cpp logger.cpp logger.thpp
   netstring.cpp networkstream.cpp object.cpp objectlock.cpp primitivetype.cpp process.cpp
   ringbuffer.cpp scriptfunction.cpp scriptfunctionwrapper.cpp
   scriptutils.cpp scriptvariable.cpp serializer.cpp socket.cpp stacktrace.cpp
diff --git a/lib/base/application.cpp b/lib/base/application.cpp
index 32b3c0162..27be62791 100644
--- a/lib/base/application.cpp
+++ b/lib/base/application.cpp
@@ -44,7 +44,7 @@ using namespace icinga;
 REGISTER_TYPE(Application);
 
 boost::signals2::signal<void (void)> Application::OnReopenLogs;
-Application *Application::m_Instance = NULL;
+Application::Ptr Application::m_Instance = NULL;
 bool Application::m_ShuttingDown = false;
 bool Application::m_RequestRestart = false;
 bool Application::m_RequestReopenLogs = false;
@@ -153,10 +153,7 @@ void Application::InitializeBase(void)
  */
 Application::Ptr Application::GetInstance(void)
 {
-	if (!m_Instance)
-		return Application::Ptr();
-
-	return m_Instance->GetSelf();
+	return m_Instance;
 }
 
 void Application::SetResourceLimits(void)
@@ -341,7 +338,7 @@ pid_t Application::StartReloadProcess(void)
 	Log(LogInformation, "Application", "Got reload command: Starting new instance.");
 
 	// prepare arguments
-	Array::Ptr args = make_shared<Array>();
+	Array::Ptr args = new Array();
 	args->Add(GetExePath(m_ArgV[0]));
 
 	for (int i=1; i < Application::GetArgC(); i++) {
@@ -353,7 +350,7 @@ pid_t Application::StartReloadProcess(void)
 	args->Add("--reload-internal");
 	args->Add(Convert::ToString(Utility::GetPid()));
 
-	Process::Ptr process = make_shared<Process>(Process::PrepareCommand(args));
+	Process::Ptr process = new Process(Process::PrepareCommand(args));
 	process->SetTimeout(300);
 	process->Run(&ReloadProcessCallback);
 
diff --git a/lib/base/application.hpp b/lib/base/application.hpp
index c346183cf..42db85696 100644
--- a/lib/base/application.hpp
+++ b/lib/base/application.hpp
@@ -144,7 +144,7 @@ protected:
 	virtual void OnShutdown(void);
 
 private:
-	static Application *m_Instance; /**< The application instance. */
+	static Application::Ptr m_Instance; /**< The application instance. */
 
 	static bool m_ShuttingDown; /**< Whether the application is in the process of
 				  shutting down. */
diff --git a/lib/base/array.cpp b/lib/base/array.cpp
index 04760fa6b..c6a79bf4a 100644
--- a/lib/base/array.cpp
+++ b/lib/base/array.cpp
@@ -196,21 +196,21 @@ void Array::CopyTo(const Array::Ptr& dest) const
  */
 Array::Ptr Array::ShallowClone(void) const
 {
-	Array::Ptr clone = make_shared<Array>();
+	Array::Ptr clone = new Array();
 	CopyTo(clone);
 	return clone;
 }
 
 Array::Ptr icinga::MakeArray(const Value& val1)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 	result->Add(val1);
 	return result;
 }
 
 Array::Ptr icinga::MakeArray(const Value& val1, const Value& val2)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 	result->Add(val1);
 	result->Add(val2);
 	return result;
@@ -218,7 +218,7 @@ Array::Ptr icinga::MakeArray(const Value& val1, const Value& val2)
 
 Array::Ptr icinga::MakeArray(const Value& val1, const Value& val2, const Value& val3)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 	result->Add(val1);
 	result->Add(val2);
 	result->Add(val3);
@@ -227,7 +227,7 @@ Array::Ptr icinga::MakeArray(const Value& val1, const Value& val2, const Value&
 
 Array::Ptr icinga::MakeArray(const Value& val1, const Value& val2, const Value& val3, const Value& val4)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 	result->Add(val1);
 	result->Add(val2);
 	result->Add(val3);
diff --git a/lib/base/console.hpp b/lib/base/console.hpp
index cf9d7fd0a..3cf9a802a 100644
--- a/lib/base/console.hpp
+++ b/lib/base/console.hpp
@@ -75,6 +75,8 @@ private:
 	int m_Color;
 };
 
+I2_BASE_API std::ostream& operator<<(std::ostream& fp, const ConsoleColorTag& cct);
+
 /**
  * Console utilities.
  *
diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp
index b87f1e64f..bf03c782c 100644
--- a/lib/base/dictionary.cpp
+++ b/lib/base/dictionary.cpp
@@ -211,7 +211,7 @@ void Dictionary::CopyTo(const Dictionary::Ptr& dest) const
  */
 Dictionary::Ptr Dictionary::ShallowClone(void) const
 {
-	Dictionary::Ptr clone = make_shared<Dictionary>();
+	Dictionary::Ptr clone = new Dictionary();
 	CopyTo(clone);
 	return clone;
 }
diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp
index 76e397dbc..77c4495c7 100644
--- a/lib/base/dynamicobject.cpp
+++ b/lib/base/dynamicobject.cpp
@@ -81,7 +81,7 @@ void DynamicObject::SetExtension(const String& key, const Object::Ptr& object)
 	Dictionary::Ptr extensions = GetExtensions();
 
 	if (!extensions) {
-		extensions = make_shared<Dictionary>();
+		extensions = new Dictionary();
 		SetExtensions(extensions);
 	}
 
@@ -113,7 +113,7 @@ void DynamicObject::Register(void)
 	ASSERT(!OwnsLock());
 
 	DynamicType::Ptr dtype = GetType();
-	dtype->RegisterObject(GetSelf());
+	dtype->RegisterObject(this);
 }
 
 void DynamicObject::Start(void)
@@ -140,7 +140,7 @@ void DynamicObject::Activate(void)
 		SetActive(true);
 	}
 
-	OnStarted(GetSelf());
+	OnStarted(this);
 
 	SetAuthority(true);
 }
@@ -174,7 +174,7 @@ void DynamicObject::Deactivate(void)
 
 	ASSERT(GetStopCalled());
 
-	OnStopped(GetSelf());
+	OnStopped(this);
 }
 
 void DynamicObject::OnConfigLoaded(void)
@@ -204,13 +204,13 @@ void DynamicObject::SetAuthority(bool authority)
 		Resume();
 		ASSERT(GetResumeCalled());
 		SetPaused(false);
-		OnResumed(GetSelf());
+		OnResumed(this);
 	} else if (!authority && !GetPaused()) {
 		SetPauseCalled(false);
 		Pause();
 		ASSERT(GetPauseCalled());
 		SetPaused(true);
-		OnPaused(GetSelf());
+		OnPaused(this);
 	}
 }
 
@@ -256,11 +256,11 @@ void DynamicObject::DumpObjects(const String& filename, int attributeTypes)
 	if (!fp)
 		BOOST_THROW_EXCEPTION(std::runtime_error("Could not open '" + tempFilename + "' file"));
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream(&fp, false);
 
 	BOOST_FOREACH(const DynamicType::Ptr& type, DynamicType::GetTypes()) {
 		BOOST_FOREACH(const DynamicObject::Ptr& object, type->GetObjects()) {
-			Dictionary::Ptr persistentObject = make_shared<Dictionary>();
+			Dictionary::Ptr persistentObject = new Dictionary();
 
 			persistentObject->Set("type", type->GetName());
 			persistentObject->Set("name", object->GetName());
@@ -331,7 +331,7 @@ void DynamicObject::RestoreObjects(const String& filename, int attributeTypes)
 	std::fstream fp;
 	fp.open(filename.CStr(), std::ios_base::in);
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream (&fp, false);
 
 	unsigned long restored = 0;
 
diff --git a/lib/base/dynamicobject.hpp b/lib/base/dynamicobject.hpp
index 9b355bf4c..46e3a24d6 100644
--- a/lib/base/dynamicobject.hpp
+++ b/lib/base/dynamicobject.hpp
@@ -52,7 +52,7 @@ public:
 
 	Value InvokeMethod(const String& method, const std::vector<Value>& arguments);
 
-	shared_ptr<DynamicType> GetType(void) const;
+	intrusive_ptr<DynamicType> GetType(void) const;
 
 	DebugInfo GetDebugInfo(void) const;
 	void SetDebugInfo(const DebugInfo& di);
@@ -80,7 +80,7 @@ public:
 	virtual void OnStateLoaded(void);
 
 	template<typename T>
-	static shared_ptr<T> GetObject(const String& name)
+	static intrusive_ptr<T> GetObject(const String& name)
 	{
 		DynamicObject::Ptr object = GetObject(T::GetTypeName(), name);
 
@@ -101,15 +101,15 @@ private:
 	DebugInfo m_DebugInfo;
 };
 
-#define DECLARE_OBJECTNAME(klass)					\
-	inline static String GetTypeName(void)				\
-	{								\
-		return #klass;						\
-	}								\
-									\
-	inline static shared_ptr<klass> GetByName(const String& name)	\
-	{								\
-		return DynamicObject::GetObject<klass>(name);		\
+#define DECLARE_OBJECTNAME(klass)						\
+	inline static String GetTypeName(void)					\
+	{									\
+		return #klass;							\
+	}									\
+										\
+	inline static intrusive_ptr<klass> GetByName(const String& name)	\
+	{									\
+		return DynamicObject::GetObject<klass>(name);			\
 	}
 
 }
diff --git a/lib/base/dynamictype.cpp b/lib/base/dynamictype.cpp
index a3449ce4f..d20d83de6 100644
--- a/lib/base/dynamictype.cpp
+++ b/lib/base/dynamictype.cpp
@@ -43,7 +43,7 @@ DynamicType::Ptr DynamicType::GetByName(const String& name)
 		    || type->IsAbstract())
 			return DynamicType::Ptr();
 
-		DynamicType::Ptr dtype = make_shared<DynamicType>(name);
+		DynamicType::Ptr dtype = new DynamicType(name);
 
 		InternalGetTypeMap()[type->GetName()] = dtype;
 		InternalGetTypeVector().push_back(dtype);
@@ -78,8 +78,8 @@ DynamicType::TypeVector DynamicType::GetTypes(void)
 std::pair<DynamicTypeIterator<DynamicObject>, DynamicTypeIterator<DynamicObject> > DynamicType::GetObjects(void)
 {
 	return std::make_pair(
-	    DynamicTypeIterator<DynamicObject>(GetSelf(), 0),
-	    DynamicTypeIterator<DynamicObject>(GetSelf(), -1)
+	    DynamicTypeIterator<DynamicObject>(this, 0),
+	    DynamicTypeIterator<DynamicObject>(this, -1)
 	);
 }
 
diff --git a/lib/base/dynamictype.hpp b/lib/base/dynamictype.hpp
index 6bac3d059..1896f6c92 100644
--- a/lib/base/dynamictype.hpp
+++ b/lib/base/dynamictype.hpp
@@ -81,7 +81,7 @@ private:
 };
 
 template<typename T>
-class DynamicTypeIterator : public boost::iterator_facade<DynamicTypeIterator<T>, const shared_ptr<T>, boost::forward_traversal_tag>
+class DynamicTypeIterator : public boost::iterator_facade<DynamicTypeIterator<T>, const intrusive_ptr<T>, boost::forward_traversal_tag>
 {
 public:
 	DynamicTypeIterator(const DynamicType::Ptr& type, int index)
@@ -93,7 +93,7 @@ private:
 
 	DynamicType::Ptr m_Type;
 	DynamicType::ObjectVector::size_type m_Index;
-	mutable shared_ptr<T> m_Current;
+	mutable intrusive_ptr<T> m_Current;
 
 	void increment(void)
 	{
@@ -125,7 +125,7 @@ private:
 		return (other.m_Index == m_Index);
 	}
 
-	const shared_ptr<T>& dereference(void) const
+	const intrusive_ptr<T>& dereference(void) const
 	{
 		ObjectLock olock(m_Type);
 		m_Current = static_pointer_cast<T>(*(m_Type->m_ObjectVector.begin() + m_Index));
diff --git a/lib/base/filelogger.cpp b/lib/base/filelogger.cpp
index f92ced198..1b6b50a5a 100644
--- a/lib/base/filelogger.cpp
+++ b/lib/base/filelogger.cpp
@@ -31,7 +31,7 @@ REGISTER_STATSFUNCTION(FileLoggerStats, &FileLogger::StatsFunc);
 
 Value FileLogger::StatsFunc(Dictionary::Ptr& status, Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const FileLogger::Ptr& filelogger, DynamicType::GetObjectsByType<FileLogger>()) {
 		nodes->Set(filelogger->GetName(), 1); //add more stats
diff --git a/lib/base/initialize.cpp b/lib/base/initialize.cpp
new file mode 100644
index 000000000..2de968a68
--- /dev/null
+++ b/lib/base/initialize.cpp
@@ -0,0 +1,30 @@
+/******************************************************************************
+ * Icinga 2                                                                   *
+ * Copyright (C) 2012-2014 Icinga Development Team (http://www.icinga.org)    *
+ *                                                                            *
+ * 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 2             *
+ * 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, write to the Free Software Foundation     *
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
+ ******************************************************************************/
+
+#include "base/initialize.hpp"
+#include "base/utility.hpp"
+
+using namespace icinga;
+
+bool icinga::InitializeOnceHelper(void (*func)(void))
+{
+	Utility::AddDeferredInitializer(func);
+	return true;
+}
+
diff --git a/lib/base/initialize.hpp b/lib/base/initialize.hpp
index 4e7319fdb..27a71bd8f 100644
--- a/lib/base/initialize.hpp
+++ b/lib/base/initialize.hpp
@@ -21,22 +21,15 @@
 #define INITIALIZE_H
 
 #include "base/i2-base.hpp"
-#include "base/utility.hpp"
 
 namespace icinga
 {
 
-typedef void (*InitializeFunc)(void);
+I2_BASE_API bool InitializeOnceHelper(void (*func)(void));
 
-inline bool InitializeOnceHelper(InitializeFunc func)
-{
-	Utility::AddDeferredInitializer(func);
-	return true;
-}
-
-#define INITIALIZE_ONCE(func) \
-	namespace { namespace UNIQUE_NAME(io) { \
-		I2_EXPORT bool l_InitializeOnce(icinga::InitializeOnceHelper(func)); \
+#define INITIALIZE_ONCE(func)								\
+	namespace { namespace UNIQUE_NAME(io) {						\
+		I2_EXPORT bool l_InitializeOnce(icinga::InitializeOnceHelper(func));	\
 	} }
 
 }
diff --git a/lib/base/json.cpp b/lib/base/json.cpp
index a98949e82..fb72a57e7 100644
--- a/lib/base/json.cpp
+++ b/lib/base/json.cpp
@@ -263,7 +263,7 @@ static int DecodeStartMap(void *ctx)
 	JsonContext *context = static_cast<JsonContext *>(ctx);
 
 	try {
-		context->Push(make_shared<Dictionary>());
+		context->Push(new Dictionary());
 	} catch (...) {
 		context->SaveException();
 		return 0;
@@ -291,7 +291,7 @@ static int DecodeStartArray(void *ctx)
 	JsonContext *context = static_cast<JsonContext *>(ctx);
 	
 	try {
-		context->Push(make_shared<Array>());
+		context->Push(new Array());
 	} catch (...) {
 		context->SaveException();
 		return 0;
diff --git a/lib/base/logger.cpp b/lib/base/logger.cpp
index c3ffb5ab6..de0e35133 100644
--- a/lib/base/logger.cpp
+++ b/lib/base/logger.cpp
@@ -56,13 +56,13 @@ void Logger::Start(void)
 	DynamicObject::Start();
 
 	boost::mutex::scoped_lock lock(m_Mutex);
-	m_Loggers.insert(GetSelf());
+	m_Loggers.insert(this);
 }
 
 void Logger::Stop(void)
 {
 	boost::mutex::scoped_lock lock(m_Mutex);
-	m_Loggers.erase(GetSelf());
+	m_Loggers.erase(this);
 }
 
 std::set<Logger::Ptr> Logger::GetLoggers(void)
diff --git a/lib/base/object.cpp b/lib/base/object.cpp
index ad8ffa0f9..eba735b37 100644
--- a/lib/base/object.cpp
+++ b/lib/base/object.cpp
@@ -33,8 +33,9 @@ boost::mutex Object::m_DebugMutex;
  * Default constructor for the Object class.
  */
 Object::Object(void)
+	: m_References(0)
 #ifdef _DEBUG
-	: m_Locked(false)
+	, m_Locked(false)
 #endif /* _DEBUG */
 { }
 
@@ -44,16 +45,6 @@ Object::Object(void)
 Object::~Object(void)
 { }
 
-/**
- * Returns a reference-counted pointer to this object.
- *
- * @returns A shared_ptr object that points to this object
- */
-Object::SharedPtrHolder Object::GetSelf(void)
-{
-	return Object::SharedPtrHolder(shared_from_this());
-}
-
 #ifdef _DEBUG
 /**
  * Checks if the calling thread owns the lock on this object.
@@ -68,11 +59,6 @@ bool Object::OwnsLock(void) const
 }
 #endif /* _DEBUG */
 
-Object::SharedPtrHolder::operator Value(void) const
-{
-	return m_Object;
-}
-
 void Object::SetField(int, const Value&)
 {
 	BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
diff --git a/lib/base/object.hpp b/lib/base/object.hpp
index 6ce60fd5f..bfb8fe5c4 100644
--- a/lib/base/object.hpp
+++ b/lib/base/object.hpp
@@ -31,28 +31,11 @@
 #include <boost/thread/recursive_mutex.hpp>
 #endif /* _DEBUG */
 
-#ifndef _MSC_VER
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/smart_ptr/weak_ptr.hpp>
-#include <boost/smart_ptr/enable_shared_from_this.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
+#include <boost/smart_ptr/intrusive_ptr.hpp>
 
-using boost::shared_ptr;
-using boost::weak_ptr;
-using boost::enable_shared_from_this;
+using boost::intrusive_ptr;
 using boost::dynamic_pointer_cast;
 using boost::static_pointer_cast;
-using boost::make_shared;
-#else /* _MSC_VER */
-#include <memory>
-
-using std::shared_ptr;
-using std::weak_ptr;
-using std::enable_shared_from_this;
-using std::dynamic_pointer_cast;
-using std::static_pointer_cast;
-using std::make_shared;
-#endif /* _MSC_VER */
 
 #include <boost/tuple/tuple.hpp>
 using boost::tie;
@@ -65,14 +48,13 @@ class Object;
 class Type;
 
 #define DECLARE_PTR_TYPEDEFS(klass) \
-	typedef shared_ptr<klass> Ptr; \
-	typedef weak_ptr<klass> WeakPtr
+	typedef intrusive_ptr<klass> Ptr
 
-#define IMPL_TYPE_LOOKUP(klass) \
-	static shared_ptr<Type> TypeInstance; \
-	inline virtual shared_ptr<Type> GetReflectionType(void) const \
-	{ \
-		return TypeInstance; \
+#define IMPL_TYPE_LOOKUP(klass) 					\
+	static intrusive_ptr<Type> TypeInstance;			\
+	virtual intrusive_ptr<Type> GetReflectionType(void) const	\
+	{								\
+		return TypeInstance;					\
 	}
 
 #define DECLARE_OBJECT(klass) \
@@ -80,12 +62,12 @@ class Type;
 	IMPL_TYPE_LOOKUP(klass);
 
 template<typename T>
-shared_ptr<Object> DefaultObjectFactory(void)
+intrusive_ptr<Object> DefaultObjectFactory(void)
 {
-	return make_shared<T>();
+	return new T();
 }
 
-typedef shared_ptr<Object> (*ObjectFactory)(void);
+typedef intrusive_ptr<Object> (*ObjectFactory)(void);
 
 template<typename T>
 struct TypeHelper
@@ -102,7 +84,7 @@ struct TypeHelper
  *
  * @ingroup base
  */
-class I2_BASE_API Object : public enable_shared_from_this<Object>
+class I2_BASE_API Object
 {
 public:
 	DECLARE_OBJECT(Object);
@@ -113,73 +95,15 @@ public:
 	virtual void SetField(int id, const Value& value);
 	virtual Value GetField(int id) const;
 
-	/**
-	 * Holds a shared pointer and provides support for implicit upcasts.
-	 *
-	 * @ingroup base
-	 */
-	class SharedPtrHolder
-	{
-	public:
-		/**
-		 * Constructor for the SharedPtrHolder class.
-		 *
-		 * @param object The shared pointer that should be used to
-		 *		 construct this shared pointer holder.
-		 */
-		explicit SharedPtrHolder(const Object::Ptr& object)
-			: m_Object(object)
-		{ }
-
-		/**
-		 * Retrieves a shared pointer for the object that is associated
-		 * this holder instance.
-		 *
-		 * @returns A shared pointer.
-		 */
-		template<typename T>
-		operator shared_ptr<T>(void) const
-		{
-#ifdef _DEBUG
-			shared_ptr<T> other = dynamic_pointer_cast<T>(m_Object);
-			ASSERT(other);
-#else /* _DEBUG */
-			shared_ptr<T> other = static_pointer_cast<T>(m_Object);
-#endif /* _DEBUG */
-
-			return other;
-		}
-
-		/**
-		 * Retrieves a weak pointer for the object that is associated
-		 * with this holder instance.
-		 *
-		 * @returns A weak pointer.
-		 */
-		template<typename T>
-		operator weak_ptr<T>(void) const
-		{
-			return static_cast<shared_ptr<T> >(*this);
-		}
-
-		operator Value(void) const;
-
-	private:
-		Object::Ptr m_Object; /**< The object that belongs to this
-					   holder instance */
-	};
-
 #ifdef _DEBUG
 	bool OwnsLock(void) const;
 #endif /* _DEBUG */
 
-protected:
-	SharedPtrHolder GetSelf(void);
-
 private:
 	Object(const Object& other);
 	Object& operator=(const Object& rhs);
 
+	uintptr_t m_References;
 	mutable ThinMutex m_Mutex;
 
 #ifdef _DEBUG
@@ -189,38 +113,32 @@ private:
 #endif /* _DEBUG */
 
 	friend struct ObjectLock;
+
+	friend void intrusive_ptr_add_ref(Object *object);
+	friend void intrusive_ptr_release(Object *object);
 };
 
-/**
- * Compares a weak pointer with a raw pointer.
- *
- * @ingroup base
- */
-template<class T>
-struct WeakPtrEqual
+inline void intrusive_ptr_add_ref(Object *object)
 {
-private:
-	const void *m_Ref; /**< The object. */
+#ifdef _WIN32
+	InterlockedIncrement(&object->m_References);
+#else /* _WIN32 */
+	__sync_add_and_fetch(&object->m_References, 1);
+#endif /* _WIN32 */
+}
 
-public:
-	/**
-	 * Constructor for the WeakPtrEqual class.
-	 *
-	 * @param ref The object that should be compared with the weak pointer.
-	 */
-	WeakPtrEqual(const void *ref) : m_Ref(ref) { }
+inline void intrusive_ptr_release(Object *object)
+{
+	uintptr_t refs;
+#ifdef _WIN32
+	refs = InterlockedDecrement(&object->m_References);
+#else /* _WIN32 */
+	refs = __sync_sub_and_fetch(&object->m_References, 1);
+#endif /* _WIN32 */
 
-	/**
-	 * Compares the two pointers.
-	 *
-	 * @param wref The weak pointer.
-	 * @returns true if the pointers point to the same object, false otherwise.
-	 */
-	bool operator()(const weak_ptr<T>& wref) const
-	{
-		return (wref.lock().get() == static_cast<const T *>(m_Ref));
-	}
-};
+	if (refs == 0)
+		delete object;
+}
 
 template<typename T>
 class ObjectImpl
@@ -230,3 +148,5 @@ class ObjectImpl
 }
 
 #endif /* OBJECT_H */
+
+#include "base/type.hpp"
diff --git a/lib/base/primitivetype.hpp b/lib/base/primitivetype.hpp
index 0420331fc..02e52ecbe 100644
--- a/lib/base/primitivetype.hpp
+++ b/lib/base/primitivetype.hpp
@@ -46,15 +46,14 @@ private:
 	String m_Name;
 };
 
-#define REGISTER_BUILTIN_TYPE(type) \
-	namespace { namespace UNIQUE_NAME(prt) { namespace prt ## type { \
-		void RegisterPrimitiveType(void) \
-		{ \
-			icinga::Type::Ptr t = make_shared<PrimitiveType>(#type); \
-			icinga::Type::Register(t); \
-		} \
-		\
-		INITIALIZE_ONCE(RegisterPrimitiveType); \
+#define REGISTER_BUILTIN_TYPE(type)						\
+	namespace { namespace UNIQUE_NAME(prt) { namespace prt ## type {	\
+		void RegisterPrimitiveType(void)				\
+		{								\
+			icinga::Type::Ptr t = new PrimitiveType(#type);		\
+			icinga::Type::Register(t);				\
+		}								\
+		INITIALIZE_ONCE(RegisterPrimitiveType);				\
 	} } }
 
 #define REGISTER_PRIMITIVE_TYPE(type) \
diff --git a/lib/base/process.cpp b/lib/base/process.cpp
index 68fdfa468..065d40e2b 100644
--- a/lib/base/process.cpp
+++ b/lib/base/process.cpp
@@ -586,7 +586,7 @@ void Process::Run(const boost::function<void(const ProcessResult&)>& callback)
 
 	{
 		boost::mutex::scoped_lock lock(l_ProcessMutex[tid]);
-		l_Processes[tid][m_Process] = GetSelf();
+		l_Processes[tid][m_Process] = this;
 #ifndef _WIN32
 		l_FDs[tid][m_FD] = m_Process;
 #endif /* _WIN32 */
diff --git a/lib/base/scriptfunction.cpp b/lib/base/scriptfunction.cpp
index 2852db422..584e49919 100644
--- a/lib/base/scriptfunction.cpp
+++ b/lib/base/scriptfunction.cpp
@@ -54,6 +54,6 @@ void ScriptFunction::Unregister(const String& name)
 
 RegisterFunctionHelper::RegisterFunctionHelper(const String& name, const ScriptFunction::Callback& function)
 {
-	ScriptFunction::Register(name, make_shared<ScriptFunction>(function));
+	ScriptFunction::Register(name, new ScriptFunction(function));
 }
 
diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp
index 8f8823d0b..9ad8200ef 100644
--- a/lib/base/scriptutils.cpp
+++ b/lib/base/scriptutils.cpp
@@ -82,7 +82,7 @@ Array::Ptr ScriptUtils::Union(const std::vector<Value>& arguments)
 		}
 	}
 
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 	BOOST_FOREACH(const Value& value, values) {
 		result->Add(value);
 	}
@@ -93,9 +93,9 @@ Array::Ptr ScriptUtils::Union(const std::vector<Value>& arguments)
 Array::Ptr ScriptUtils::Intersection(const std::vector<Value>& arguments)
 {
 	if (arguments.size() == 0)
-		return make_shared<Array>();
+		return new Array();
 
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	Array::Ptr arr1 = static_cast<Array::Ptr>(arguments[0])->ShallowClone();
 
@@ -164,7 +164,7 @@ Array::Ptr ScriptUtils::Range(const std::vector<Value>& arguments)
 			BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid number of arguments for range()"));
 	}
 
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	if ((start < end && increment <= 0) ||
 	    (start > end && increment >= 0))
@@ -200,7 +200,7 @@ Type::Ptr ScriptUtils::TypeOf(const Value& value)
 
 Array::Ptr ScriptUtils::Keys(const Dictionary::Ptr& dict)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	ObjectLock olock(dict);
 	BOOST_FOREACH(const Dictionary::Pair& kv, dict) {
diff --git a/lib/base/scriptvariable.cpp b/lib/base/scriptvariable.cpp
index f730c1f93..3fe1bfc59 100644
--- a/lib/base/scriptvariable.cpp
+++ b/lib/base/scriptvariable.cpp
@@ -77,7 +77,7 @@ ScriptVariable::Ptr ScriptVariable::Set(const String& name, const Value& value,
 	ScriptVariable::Ptr sv = GetByName(name);
 
 	if (!sv) {
-		sv = make_shared<ScriptVariable>(value);
+		sv = new ScriptVariable(value);
 		ScriptVariableRegistry::GetInstance()->Register(name, sv);
 	} else if (overwrite) {
 		if (sv->IsConstant())
@@ -110,10 +110,10 @@ void ScriptVariable::WriteVariablesFile(const String& filename)
 	if (!fp)
 		BOOST_THROW_EXCEPTION(std::runtime_error("Could not open '" + tempFilename + "' file"));
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream(&fp, false);
 
 	BOOST_FOREACH(const ScriptVariableRegistry::ItemMap::value_type& kv, ScriptVariableRegistry::GetInstance()->GetItems()) {
-		Dictionary::Ptr persistentVariable = make_shared<Dictionary>();
+		Dictionary::Ptr persistentVariable = new Dictionary();
 
 		persistentVariable->Set("name", kv.first);
 
diff --git a/lib/base/scriptvariable.hpp b/lib/base/scriptvariable.hpp
index 602c524c0..6fc8f1f4e 100644
--- a/lib/base/scriptvariable.hpp
+++ b/lib/base/scriptvariable.hpp
@@ -29,7 +29,7 @@ namespace icinga
 
 class ScriptVariable;
 
-class I2_BASE_API ScriptVariableRegistry : public Registry<ScriptVariableRegistry, shared_ptr<ScriptVariable> >
+class I2_BASE_API ScriptVariableRegistry : public Registry<ScriptVariableRegistry, intrusive_ptr<ScriptVariable> >
 {
 public:
 	static ScriptVariableRegistry *GetInstance(void);
diff --git a/lib/base/serializer.cpp b/lib/base/serializer.cpp
index 2b3478fa5..4d714be5e 100644
--- a/lib/base/serializer.cpp
+++ b/lib/base/serializer.cpp
@@ -27,7 +27,7 @@ using namespace icinga;
 
 static Array::Ptr SerializeArray(const Array::Ptr& input, int attributeTypes)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	ObjectLock olock(input);
 
@@ -40,7 +40,7 @@ static Array::Ptr SerializeArray(const Array::Ptr& input, int attributeTypes)
 
 static Dictionary::Ptr SerializeDictionary(const Dictionary::Ptr& input, int attributeTypes)
 {
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
 	ObjectLock olock(input);
 
@@ -57,7 +57,7 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes)
 
 	VERIFY(type);
 
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 
 	for (int i = 0; i < type->GetFieldCount(); i++) {
 		Field field = type->GetFieldInfo(i);
@@ -75,7 +75,7 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes)
 
 static Array::Ptr DeserializeArray(const Array::Ptr& input, bool safe_mode, int attributeTypes)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	ObjectLock olock(input);
 
@@ -88,7 +88,7 @@ static Array::Ptr DeserializeArray(const Array::Ptr& input, bool safe_mode, int
 
 static Dictionary::Ptr DeserializeDictionary(const Dictionary::Ptr& input, bool safe_mode, int attributeTypes)
 {
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
 	ObjectLock olock(input);
 
diff --git a/lib/base/socket.cpp b/lib/base/socket.cpp
index a82a028bb..044437b15 100644
--- a/lib/base/socket.cpp
+++ b/lib/base/socket.cpp
@@ -341,7 +341,7 @@ Socket::Ptr Socket::Accept(void)
 #endif /* _WIN32 */
 	}
 
-	return make_shared<Socket>(fd);
+	return new Socket(fd);
 }
 
 bool Socket::Poll(bool read, bool write)
diff --git a/lib/base/statsfunction.cpp b/lib/base/statsfunction.cpp
index 42d12b9c4..e36c6f700 100644
--- a/lib/base/statsfunction.cpp
+++ b/lib/base/statsfunction.cpp
@@ -34,7 +34,7 @@ Value StatsFunction::Invoke(Dictionary::Ptr& status, Array::Ptr& perfdata)
 
 RegisterStatsFunctionHelper::RegisterStatsFunctionHelper(const String& name, const StatsFunction::Callback& function)
 {
-	StatsFunction::Ptr func = make_shared<StatsFunction>(function);
+	StatsFunction::Ptr func = new StatsFunction(function);
 	StatsFunctionRegistry::GetInstance()->Register(name, func);
 }
 
diff --git a/lib/base/streamlogger.cpp b/lib/base/streamlogger.cpp
index fbfb6c617..e5ec78641 100644
--- a/lib/base/streamlogger.cpp
+++ b/lib/base/streamlogger.cpp
@@ -80,7 +80,7 @@ void StreamLogger::BindStream(std::ostream *stream, bool ownsStream)
 	m_Stream = stream;
 	m_OwnsStream = ownsStream;
 
-	m_FlushLogTimer = make_shared<Timer>();
+	m_FlushLogTimer = new Timer();
 	m_FlushLogTimer->SetInterval(1);
 	m_FlushLogTimer->OnTimerExpired.connect(boost::bind(&StreamLogger::FlushLogTimerHandler, this));
 	m_FlushLogTimer->Start();
diff --git a/lib/base/sysloglogger.cpp b/lib/base/sysloglogger.cpp
index d0f26dddc..2790fe090 100644
--- a/lib/base/sysloglogger.cpp
+++ b/lib/base/sysloglogger.cpp
@@ -30,7 +30,7 @@ REGISTER_STATSFUNCTION(SyslogLoggerStats, &SyslogLogger::StatsFunc);
 
 Value SyslogLogger::StatsFunc(Dictionary::Ptr& status, Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const SyslogLogger::Ptr& sysloglogger, DynamicType::GetObjectsByType<SyslogLogger>()) {
 		nodes->Set(sysloglogger->GetName(), 1); //add more stats
diff --git a/lib/base/thinmutex.cpp b/lib/base/thinmutex.cpp
index e5307b75c..b2eedd430 100644
--- a/lib/base/thinmutex.cpp
+++ b/lib/base/thinmutex.cpp
@@ -43,7 +43,7 @@ void ThinMutex::DebugTimerHandler(void)
 
 static void InitThinMutex(void)
 {
-	l_Timer = make_shared<Timer>();
+	l_Timer = new Timer();
 	l_Timer->SetInterval(10);
 	l_Timer->OnTimerExpired.connect(boost::bind(&ThinMutex::DebugTimerHandler));
 	l_Timer->Start();
diff --git a/lib/base/timer.cpp b/lib/base/timer.cpp
index 203882775..7538a16b3 100644
--- a/lib/base/timer.cpp
+++ b/lib/base/timer.cpp
@@ -91,10 +91,8 @@ void Timer::Call(void)
 {
 	ASSERT(!OwnsLock());
 
-	Timer::Ptr self = GetSelf();
-
 	try {
-		OnTimerExpired(self);
+		OnTimerExpired(Timer::Ptr(this));
 	} catch (...) {
 		Reschedule();
 
@@ -272,12 +270,12 @@ void Timer::TimerThreadProc(void)
 			continue;
 		}
 
+		Timer::Ptr ptimer = timer;
+
 		/* Remove the timer from the list so it doesn't get called again
 		 * until the current call is completed. */
 		l_Timers.erase(timer);
 
-		Timer::Ptr ptimer = timer->GetSelf();
-
 		lock.unlock();
 
 		/* Asynchronously call the timer. */
diff --git a/lib/base/tlsstream.cpp b/lib/base/tlsstream.cpp
index 7d96fba8f..32f9324cf 100644
--- a/lib/base/tlsstream.cpp
+++ b/lib/base/tlsstream.cpp
@@ -35,13 +35,13 @@ bool I2_EXPORT TlsStream::m_SSLIndexInitialized = false;
  * @param role The role of the client.
  * @param sslContext The SSL context for the client.
  */
-TlsStream::TlsStream(const Socket::Ptr& socket, ConnectionRole role, const shared_ptr<SSL_CTX>& sslContext)
+TlsStream::TlsStream(const Socket::Ptr& socket, ConnectionRole role, const boost::shared_ptr<SSL_CTX>& sslContext)
 	: m_Eof(false), m_VerifyOK(true), m_Socket(socket), m_Role(role)
 {
 	std::ostringstream msgbuf;
 	char errbuf[120];
 
-	m_SSL = shared_ptr<SSL>(SSL_new(sslContext.get()), SSL_free);
+	m_SSL = boost::shared_ptr<SSL>(SSL_new(sslContext.get()), SSL_free);
 
 	if (!m_SSL) {
 		msgbuf << "SSL_new() failed with code " << ERR_peek_error() << ", \"" << ERR_error_string(ERR_peek_error(), errbuf) << "\"";
@@ -90,10 +90,10 @@ bool TlsStream::IsVerifyOK(void) const
  *
  * @returns The X509 certificate.
  */
-shared_ptr<X509> TlsStream::GetClientCertificate(void) const
+boost::shared_ptr<X509> TlsStream::GetClientCertificate(void) const
 {
 	boost::mutex::scoped_lock lock(m_SSLLock);
-	return shared_ptr<X509>(SSL_get_certificate(m_SSL.get()), &Utility::NullDeleter);
+	return boost::shared_ptr<X509>(SSL_get_certificate(m_SSL.get()), &Utility::NullDeleter);
 }
 
 /**
@@ -101,10 +101,10 @@ shared_ptr<X509> TlsStream::GetClientCertificate(void) const
  *
  * @returns The X509 certificate.
  */
-shared_ptr<X509> TlsStream::GetPeerCertificate(void) const
+boost::shared_ptr<X509> TlsStream::GetPeerCertificate(void) const
 {
 	boost::mutex::scoped_lock lock(m_SSLLock);
-	return shared_ptr<X509>(SSL_get_peer_certificate(m_SSL.get()), X509_free);
+	return boost::shared_ptr<X509>(SSL_get_peer_certificate(m_SSL.get()), X509_free);
 }
 
 void TlsStream::Handshake(void)
diff --git a/lib/base/tlsstream.hpp b/lib/base/tlsstream.hpp
index 00b24ce3b..1014d8168 100644
--- a/lib/base/tlsstream.hpp
+++ b/lib/base/tlsstream.hpp
@@ -38,10 +38,10 @@ class I2_BASE_API TlsStream : public Stream
 public:
 	DECLARE_PTR_TYPEDEFS(TlsStream);
 
-	TlsStream(const Socket::Ptr& socket, ConnectionRole role, const shared_ptr<SSL_CTX>& sslContext);
+	TlsStream(const Socket::Ptr& socket, ConnectionRole role, const boost::shared_ptr<SSL_CTX>& sslContext);
 
-	shared_ptr<X509> GetClientCertificate(void) const;
-	shared_ptr<X509> GetPeerCertificate(void) const;
+	boost::shared_ptr<X509> GetClientCertificate(void) const;
+	boost::shared_ptr<X509> GetPeerCertificate(void) const;
 
 	void Handshake(void);
 
@@ -55,7 +55,7 @@ public:
 	bool IsVerifyOK(void) const;
 
 private:
-	shared_ptr<SSL> m_SSL;
+	boost::shared_ptr<SSL> m_SSL;
 	bool m_Eof;
 	mutable boost::mutex m_SSLLock;
 	mutable boost::mutex m_IOActionLock;
diff --git a/lib/base/tlsutility.cpp b/lib/base/tlsutility.cpp
index 1a902df82..e2978aa12 100644
--- a/lib/base/tlsutility.cpp
+++ b/lib/base/tlsutility.cpp
@@ -75,14 +75,14 @@ void InitializeOpenSSL(void)
  * @param cakey CA certificate chain file.
  * @returns An SSL context.
  */
-shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey)
+boost::shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey)
 {
 	std::ostringstream msgbuf;
 	char errbuf[120];
 
 	InitializeOpenSSL();
 
-	shared_ptr<SSL_CTX> sslContext = shared_ptr<SSL_CTX>(SSL_CTX_new(TLSv1_method()), SSL_CTX_free);
+	boost::shared_ptr<SSL_CTX> sslContext = boost::shared_ptr<SSL_CTX>(SSL_CTX_new(TLSv1_method()), SSL_CTX_free);
 
 	SSL_CTX_set_mode(sslContext.get(), SSL_MODE_ENABLE_PARTIAL_WRITE | SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
 
@@ -146,7 +146,7 @@ shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& privkey,
  * @param context The SSL context.
  * @param crlPath The path to the CRL file.
  */
-void AddCRLToSSLContext(const shared_ptr<SSL_CTX>& context, const String& crlPath)
+void AddCRLToSSLContext(const boost::shared_ptr<SSL_CTX>& context, const String& crlPath)
 {
 	char errbuf[120];
 	X509_STORE *x509_store = SSL_CTX_get_cert_store(context.get());
@@ -183,7 +183,7 @@ void AddCRLToSSLContext(const shared_ptr<SSL_CTX>& context, const String& crlPat
  * @param certificate The X509 certificate.
  * @returns The common name.
  */
-String GetCertificateCN(const shared_ptr<X509>& certificate)
+String GetCertificateCN(const boost::shared_ptr<X509>& certificate)
 {
 	char errbuf[120];
 	char buffer[256];
@@ -208,7 +208,7 @@ String GetCertificateCN(const shared_ptr<X509>& certificate)
  * @param pemfile The filename.
  * @returns An X509 certificate.
  */
-shared_ptr<X509> GetX509Certificate(const String& pemfile)
+boost::shared_ptr<X509> GetX509Certificate(const String& pemfile)
 {
 	char errbuf[120];
 	X509 *cert;
@@ -243,7 +243,7 @@ shared_ptr<X509> GetX509Certificate(const String& pemfile)
 
 	BIO_free(fpcert);
 
-	return shared_ptr<X509>(cert, X509_free);
+	return boost::shared_ptr<X509>(cert, X509_free);
 }
 
 int MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile, const String& certfile, bool ca)
@@ -290,7 +290,7 @@ int MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile,
 		X509_NAME *subject = X509_NAME_new();
 		X509_NAME_add_entry_by_txt(subject, "CN", MBSTRING_ASC, (unsigned char *)cn.CStr(), -1, -1, 0);
 
-		shared_ptr<X509> cert = CreateCert(key, subject, subject, key, ca);
+		boost::shared_ptr<X509> cert = CreateCert(key, subject, subject, key, ca);
 
 		X509_NAME_free(subject);
 
@@ -367,7 +367,7 @@ int MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile,
 	return 1;
 }
 
-shared_ptr<X509> CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME *issuer, EVP_PKEY *cakey, bool ca, const String& serialfile)
+boost::shared_ptr<X509> CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME *issuer, EVP_PKEY *cakey, bool ca, const String& serialfile)
 {
 	X509 *cert = X509_new();
 	X509_gmtime_adj(X509_get_notBefore(cert), 0);
@@ -414,7 +414,7 @@ shared_ptr<X509> CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME *iss
 
 	X509_sign(cert, cakey, NULL);
 
-	return shared_ptr<X509>(cert, X509_free);
+	return boost::shared_ptr<X509>(cert, X509_free);
 }
 
 String GetIcingaCADir(void)
@@ -422,7 +422,7 @@ String GetIcingaCADir(void)
 	return Application::GetLocalStateDir() + "/lib/icinga2/ca";
 }
 
-shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
+boost::shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
 {
 	char errbuf[120];
 
@@ -437,7 +437,7 @@ shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
 	if (!cakeybio) {
 		Log(LogCritical, "SSL")
 		    << "Could not open CA key file '" << cakeyfile << "': " << ERR_peek_error() << ", \"" << ERR_error_string(ERR_peek_error(), errbuf) << "\"";
-		return shared_ptr<X509>();
+		return boost::shared_ptr<X509>();
 	}
 
 	rsa = PEM_read_bio_RSAPrivateKey(cakeybio, NULL, NULL, NULL);
@@ -445,14 +445,14 @@ shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
 	if (!rsa) {
 		Log(LogCritical, "SSL")
 		    << "Could not read RSA key from CA key file '" << cakeyfile << "': " << ERR_peek_error() << ", \"" << ERR_error_string(ERR_peek_error(), errbuf) << "\"";
-		return shared_ptr<X509>();
+		return boost::shared_ptr<X509>();
 	}
 
 	BIO_free(cakeybio);
 
 	String cacertfile = cadir + "/ca.crt";
 
-	shared_ptr<X509> cacert = GetX509Certificate(cacertfile);
+	boost::shared_ptr<X509> cacert = GetX509Certificate(cacertfile);
 
 	EVP_PKEY *privkey = EVP_PKEY_new();
 	EVP_PKEY_assign_RSA(privkey, rsa);
@@ -460,7 +460,7 @@ shared_ptr<X509> CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject)
 	return CreateCert(pubkey, subject, X509_get_subject_name(cacert.get()), privkey, false, cadir + "/serial.txt");
 }
 
-String CertificateToString(const shared_ptr<X509>& cert)
+String CertificateToString(const boost::shared_ptr<X509>& cert)
 {
 	BIO *mem = BIO_new(BIO_s_mem());
 	PEM_write_bio_X509(mem, cert.get());
diff --git a/lib/base/tlsutility.hpp b/lib/base/tlsutility.hpp
index fcd6af422..a38bd3aa7 100644
--- a/lib/base/tlsutility.hpp
+++ b/lib/base/tlsutility.hpp
@@ -32,20 +32,21 @@
 #include <openssl/x509v3.h>
 #include <openssl/evp.h>
 #include <openssl/rand.h>
+#include <boost/smart_ptr/shared_ptr.hpp>
 
 namespace icinga
 {
 
 void I2_BASE_API InitializeOpenSSL(void);
-shared_ptr<SSL_CTX> I2_BASE_API MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey = String());
-void I2_BASE_API AddCRLToSSLContext(const shared_ptr<SSL_CTX>& context, const String& crlPath);
-String I2_BASE_API GetCertificateCN(const shared_ptr<X509>& certificate);
-shared_ptr<X509> I2_BASE_API GetX509Certificate(const String& pemfile);
+boost::shared_ptr<SSL_CTX> I2_BASE_API MakeSSLContext(const String& pubkey, const String& privkey, const String& cakey = String());
+void I2_BASE_API AddCRLToSSLContext(const boost::shared_ptr<SSL_CTX>& context, const String& crlPath);
+String I2_BASE_API GetCertificateCN(const boost::shared_ptr<X509>& certificate);
+boost::shared_ptr<X509> I2_BASE_API GetX509Certificate(const String& pemfile);
 int I2_BASE_API MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile = String(), const String& certfile = String(), bool ca = false);
-shared_ptr<X509> I2_BASE_API CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME *issuer, EVP_PKEY *cakey, bool ca, const String& serialfile = String());
+boost::shared_ptr<X509> I2_BASE_API CreateCert(EVP_PKEY *pubkey, X509_NAME *subject, X509_NAME *issuer, EVP_PKEY *cakey, bool ca, const String& serialfile = String());
 String I2_BASE_API GetIcingaCADir(void);
-String I2_BASE_API CertificateToString(const shared_ptr<X509>& cert);
-shared_ptr<X509> I2_BASE_API CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject);
+String I2_BASE_API CertificateToString(const boost::shared_ptr<X509>& cert);
+boost::shared_ptr<X509> I2_BASE_API CreateCertIcingaCA(EVP_PKEY *pubkey, X509_NAME *subject);
 String I2_BASE_API PBKDF2_SHA1(const String& password, const String& salt, int iterations);
 String I2_BASE_API SHA256(const String& s);
 String I2_BASE_API RandomString(int length);
diff --git a/lib/base/type.hpp b/lib/base/type.hpp
index 47c3899ff..610a4939f 100644
--- a/lib/base/type.hpp
+++ b/lib/base/type.hpp
@@ -24,7 +24,6 @@
 #include "base/string.hpp"
 #include "base/object.hpp"
 #include "base/initialize.hpp"
-#include "base/utility.hpp"
 #include <boost/function.hpp>
 
 namespace icinga
@@ -42,11 +41,11 @@ class Type;
 struct Field
 {
 	int ID;
-	shared_ptr<Type> FType;
+	intrusive_ptr<Type> FType;
 	const char *Name;
 	int Attributes;
 
-	Field(int id, const shared_ptr<Type>& type, const char *name, int attributes)
+	Field(int id, const intrusive_ptr<Type>& type, const char *name, int attributes)
 		: ID(id), FType(type), Name(name), Attributes(attributes)
 	{ }
 };
@@ -95,7 +94,7 @@ class TypeImpl
 	namespace { namespace UNIQUE_NAME(rt) { \
 		void RegisterType ## type(void) \
 		{ \
-			icinga::Type::Ptr t = make_shared<TypeImpl<type> >(); \
+			icinga::Type::Ptr t = new TypeImpl<type>(); \
 			type::TypeInstance = t; \
 			icinga::Type::Register(t); \
 		} \
@@ -105,7 +104,7 @@ class TypeImpl
 	DEFINE_TYPE_INSTANCE(type)
 
 #define DEFINE_TYPE_INSTANCE(type) \
-	Type::Ptr type::TypeInstance;
+	Type::Ptr type::TypeInstance
 
 }
 
diff --git a/lib/base/utility.hpp b/lib/base/utility.hpp
index ec435d7fc..a944c0498 100644
--- a/lib/base/utility.hpp
+++ b/lib/base/utility.hpp
@@ -32,15 +32,6 @@
 namespace icinga
 {
 
-#define TOKENPASTE(x, y) x ## y
-#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
-
-#ifdef HAVE_COUNTER_MACRO
-#	define UNIQUE_NAME(prefix) TOKENPASTE2(prefix, __COUNTER__)
-#else /* HAVE_COUNTER_MACRO */
-#	define UNIQUE_NAME(prefix) prefix
-#endif /* HAVE_COUNTER_MACRO */
-
 #ifdef _WIN32
 #define MS_VC_EXCEPTION 0x406D1388
 
diff --git a/lib/base/value-operators.cpp b/lib/base/value-operators.cpp
index 12e6f8f5c..eb43582f7 100644
--- a/lib/base/value-operators.cpp
+++ b/lib/base/value-operators.cpp
@@ -203,14 +203,14 @@ Value icinga::operator+(const Value& lhs, const Value& rhs)
 	else if ((lhs.IsNumber() || lhs.IsEmpty()) && (rhs.IsNumber() || rhs.IsEmpty()) && !(lhs.IsEmpty() && rhs.IsEmpty()))
 		return static_cast<double>(lhs) + static_cast<double>(rhs);
 	else if ((lhs.IsObjectType<Array>() || lhs.IsEmpty()) && (rhs.IsObjectType<Array>() || rhs.IsEmpty()) && !(lhs.IsEmpty() && rhs.IsEmpty())) {
-		Array::Ptr result = make_shared<Array>();
+		Array::Ptr result = new Array();
 		if (!lhs.IsEmpty())
 			static_cast<Array::Ptr>(lhs)->CopyTo(result);
 		if (!rhs.IsEmpty())
 			static_cast<Array::Ptr>(rhs)->CopyTo(result);
 		return result;
 	} else if ((lhs.IsObjectType<Dictionary>() || lhs.IsEmpty()) && (rhs.IsObjectType<Dictionary>() || rhs.IsEmpty()) && !(lhs.IsEmpty() && rhs.IsEmpty())) {
-		Dictionary::Ptr result = make_shared<Dictionary>();
+		Dictionary::Ptr result = new Dictionary();
 		if (!lhs.IsEmpty())
 			static_cast<Dictionary::Ptr>(lhs)->CopyTo(result);
 		if (!rhs.IsEmpty())
@@ -247,9 +247,9 @@ Value icinga::operator-(const Value& lhs, const Value& rhs)
 		return static_cast<double>(lhs) - static_cast<double>(rhs);
 	else if ((lhs.IsObjectType<Array>() || lhs.IsEmpty()) && (rhs.IsObjectType<Array>() || rhs.IsEmpty()) && !(lhs.IsEmpty() && rhs.IsEmpty())) {
 		if (lhs.IsEmpty())
-			return make_shared<Array>();
+			return new Array();
 
-		Array::Ptr result = make_shared<Array>();
+		Array::Ptr result = new Array();
 		Array::Ptr left = lhs;
 		Array::Ptr right = rhs;
 
diff --git a/lib/base/value.hpp b/lib/base/value.hpp
index 3326421dc..b890807ff 100644
--- a/lib/base/value.hpp
+++ b/lib/base/value.hpp
@@ -58,8 +58,17 @@ public:
 	Value(const String& value);
 	Value(const char *value);
 
+	inline Value(Object *value)
+		: m_Value()
+	{
+		if (!value)
+			return;
+
+		m_Value = Object::Ptr(value);
+	}
+
 	template<typename T>
-	inline Value(const shared_ptr<T>& value)
+	inline Value(const intrusive_ptr<T>& value)
 		: m_Value()
 	{
 		if (!value)
@@ -92,10 +101,10 @@ public:
 	bool operator!=(const Value& rhs) const;
 
 	template<typename T>
-	operator shared_ptr<T>(void) const
+	operator intrusive_ptr<T>(void) const
 	{
 		if (IsEmpty())
-			return shared_ptr<T>();
+			return intrusive_ptr<T>();
 
 		if (!IsObject())
 			BOOST_THROW_EXCEPTION(std::runtime_error("Cannot convert value to object."));
@@ -104,7 +113,7 @@ public:
 
 		ASSERT(object);
 
-		shared_ptr<T> tobject = dynamic_pointer_cast<T>(object);
+		intrusive_ptr<T> tobject = dynamic_pointer_cast<T>(object);
 
 		if (!tobject)
 			BOOST_THROW_EXCEPTION(std::bad_cast());
diff --git a/lib/base/visibility.hpp b/lib/base/visibility.hpp
index 9de87c160..c54a7e766 100644
--- a/lib/base/visibility.hpp
+++ b/lib/base/visibility.hpp
@@ -28,4 +28,13 @@
 #	define I2_IMPORT __declspec(dllimport)
 #endif /* _WIN32 */
 
+#define TOKENPASTE(x, y) x ## y
+#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
+
+#ifdef HAVE_COUNTER_MACRO
+#	define UNIQUE_NAME(prefix) TOKENPASTE2(prefix, __COUNTER__)
+#else /* HAVE_COUNTER_MACRO */
+#	define UNIQUE_NAME(prefix) prefix
+#endif /* HAVE_COUNTER_MACRO */
+
 #endif /* VISIBILITY_H */
diff --git a/lib/base/workqueue.cpp b/lib/base/workqueue.cpp
index 39ca0cdbc..1d0256329 100644
--- a/lib/base/workqueue.cpp
+++ b/lib/base/workqueue.cpp
@@ -32,7 +32,7 @@ WorkQueue::WorkQueue(size_t maxItems)
 	: m_ID(m_NextID++), m_MaxItems(maxItems), m_Stopped(false),
 	  m_Processing(false), m_ExceptionCallback(WorkQueue::DefaultExceptionCallback)
 {
-	m_StatusTimer = make_shared<Timer>();
+	m_StatusTimer = new Timer();
 	m_StatusTimer->SetInterval(10);
 	m_StatusTimer->OnTimerExpired.connect(boost::bind(&WorkQueue::StatusTimerHandler, this));
 	m_StatusTimer->Start();
diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp
index 8b0eabae9..806a76687 100644
--- a/lib/checker/checkercomponent.cpp
+++ b/lib/checker/checkercomponent.cpp
@@ -39,21 +39,21 @@ REGISTER_STATSFUNCTION(CheckerComponentStats, &CheckerComponent::StatsFunc);
 
 Value CheckerComponent::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const CheckerComponent::Ptr& checker, DynamicType::GetObjectsByType<CheckerComponent>()) {
 		unsigned long idle = checker->GetIdleCheckables();
 		unsigned long pending = checker->GetPendingCheckables();
 
-		Dictionary::Ptr stats = make_shared<Dictionary>();
+		Dictionary::Ptr stats = new Dictionary();
 		stats->Set("idle", idle);
 		stats->Set("pending", pending);
 
 		nodes->Set(checker->GetName(), stats);
 
 		String perfdata_prefix = "checkercomponent_" + checker->GetName() + "_";
-		perfdata->Add(make_shared<PerfdataValue>(perfdata_prefix + "idle", Convert::ToDouble(idle)));
-		perfdata->Add(make_shared<PerfdataValue>(perfdata_prefix + "pending", Convert::ToDouble(pending)));
+		perfdata->Add(new PerfdataValue(perfdata_prefix + "idle", Convert::ToDouble(idle)));
+		perfdata->Add(new PerfdataValue(perfdata_prefix + "pending", Convert::ToDouble(pending)));
 	}
 
 	status->Set("checkercomponent", nodes);
@@ -79,7 +79,7 @@ void CheckerComponent::Start(void)
 
 	m_Thread = boost::thread(boost::bind(&CheckerComponent::CheckThreadProc, this));
 
-	m_ResultTimer = make_shared<Timer>();
+	m_ResultTimer = new Timer();
 	m_ResultTimer->SetInterval(5);
 	m_ResultTimer->OnTimerExpired.connect(boost::bind(&CheckerComponent::ResultTimerHandler, this));
 	m_ResultTimer->Start();
@@ -189,8 +189,7 @@ void CheckerComponent::CheckThreadProc(void)
 		Log(LogDebug, "CheckerComponent")
 		    << "Executing check for '" << checkable->GetName() << "'";
 
-		CheckerComponent::Ptr self = GetSelf();
-		Utility::QueueAsyncCallback(boost::bind(&CheckerComponent::ExecuteCheckHelper, self, checkable));
+		Utility::QueueAsyncCallback(boost::bind(&CheckerComponent::ExecuteCheckHelper, CheckerComponent::Ptr(this), checkable));
 
 		lock.lock();
 	}
@@ -201,7 +200,7 @@ void CheckerComponent::ExecuteCheckHelper(const Checkable::Ptr& checkable)
 	try {
 		checkable->ExecuteCheck();
 	} catch (const std::exception& ex) {
-		CheckResult::Ptr cr = make_shared<CheckResult>();
+		CheckResult::Ptr cr = new CheckResult();
 		cr->SetState(ServiceUnknown);
 
 		String output = "Exception occured while checking '" + checkable->GetName() + "': " + DiagnosticInformation(ex);
diff --git a/lib/cli/clicommand.hpp b/lib/cli/clicommand.hpp
index 985d5d4c9..6deb0495e 100644
--- a/lib/cli/clicommand.hpp
+++ b/lib/cli/clicommand.hpp
@@ -97,7 +97,7 @@ public:
 
 #define REGISTER_CLICOMMAND(name, klass) \
 	namespace { namespace UNIQUE_NAME(cli) { \
-		I2_EXPORT icinga::RegisterCLICommandHelper l_RegisterCLICommand(name, make_shared<klass>()); \
+		I2_EXPORT icinga::RegisterCLICommandHelper l_RegisterCLICommand(name, new klass()); \
 	} }
 
 }
diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp
index 4dd8c856a..77eb811aa 100644
--- a/lib/cli/daemoncommand.cpp
+++ b/lib/cli/daemoncommand.cpp
@@ -106,7 +106,7 @@ static bool LoadConfigFiles(const boost::program_options::variables_map& vm, con
 		ConfigCompiler::CompileText(name, fragment);
 	}
 
-	ConfigItemBuilder::Ptr builder = make_shared<ConfigItemBuilder>();
+	ConfigItemBuilder::Ptr builder = new ConfigItemBuilder();
 	builder->SetType(appType);
 	builder->SetName("application");
 	ConfigItem::Ptr item = builder->Compile();
diff --git a/lib/cli/nodeblackandwhitelistcommand.cpp b/lib/cli/nodeblackandwhitelistcommand.cpp
index 927f0ea58..f4954b67e 100644
--- a/lib/cli/nodeblackandwhitelistcommand.cpp
+++ b/lib/cli/nodeblackandwhitelistcommand.cpp
@@ -43,13 +43,13 @@ RegisterBlackAndWhitelistCLICommandHelper::RegisterBlackAndWhitelistCLICommandHe
 	name.push_back("node");
 	name.push_back(ltype);
 	name.push_back("add");
-	CLICommand::Register(name, make_shared<BlackAndWhitelistCommand>(type, BlackAndWhitelistCommandAdd));
+	CLICommand::Register(name, new BlackAndWhitelistCommand(type, BlackAndWhitelistCommandAdd));
 
 	name[2] = "remove";
-	CLICommand::Register(name, make_shared<BlackAndWhitelistCommand>(type, BlackAndWhitelistCommandRemove));
+	CLICommand::Register(name, new BlackAndWhitelistCommand(type, BlackAndWhitelistCommandRemove));
 
 	name[2] = "list";
-	CLICommand::Register(name, make_shared<BlackAndWhitelistCommand>(type, BlackAndWhitelistCommandList));
+	CLICommand::Register(name, new BlackAndWhitelistCommand(type, BlackAndWhitelistCommandList));
 }
 
 BlackAndWhitelistCommand::BlackAndWhitelistCommand(const String& type, BlackAndWhitelistCommandType command)
diff --git a/lib/cli/nodeupdateconfigcommand.cpp b/lib/cli/nodeupdateconfigcommand.cpp
index 1a0d62b7c..ed17c4d6f 100644
--- a/lib/cli/nodeupdateconfigcommand.cpp
+++ b/lib/cli/nodeupdateconfigcommand.cpp
@@ -69,12 +69,12 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 
 	String inventory_path = NodeUtility::GetRepositoryPath() + "/inventory.index";
 
-	Dictionary::Ptr old_inventory = make_shared<Dictionary>();
+	Dictionary::Ptr old_inventory = new Dictionary();
 	if (Utility::PathExists(inventory_path)) {
 		old_inventory = Utility::LoadJsonFile(inventory_path);
 	}
 
-	Dictionary::Ptr inventory = make_shared<Dictionary>();
+	Dictionary::Ptr inventory = new Dictionary();
 
 	Log(LogInformation, "cli")
 	    << "Updating node configuration for ";
@@ -94,16 +94,16 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 		/* store existing structure in index */
 		inventory->Set(endpoint, node);
 
-		Dictionary::Ptr host_services = make_shared<Dictionary>();
+		Dictionary::Ptr host_services = new Dictionary();
 
 		Log(LogInformation, "cli")
 		    << "Adding host '" << zone << "' to the repository.";
 
-		Dictionary::Ptr host_attrs = make_shared<Dictionary>();
+		Dictionary::Ptr host_attrs = new Dictionary();
 		host_attrs->Set("__name", zone);
 		host_attrs->Set("name", zone);
 		host_attrs->Set("check_command", "cluster-zone");
-		Array::Ptr host_imports = make_shared<Array>();
+		Array::Ptr host_imports = new Array();
 		host_imports->Add("satellite-host"); //default host node template
 		host_attrs->Set("import", host_imports);
 
@@ -148,7 +148,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 
 			if (!skip_host) {
 				/* add a new host to the config repository */
-				Dictionary::Ptr host_attrs = make_shared<Dictionary>();
+				Dictionary::Ptr host_attrs = new Dictionary();
 				host_attrs->Set("__name", host);
 				host_attrs->Set("name", host);
 
@@ -159,7 +159,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 					host_attrs->Set("zone", zone);
 				}
 
-				Array::Ptr host_imports = make_shared<Array>();
+				Array::Ptr host_imports = new Array();
 				host_imports->Add("satellite-host"); //default host node template
 				host_attrs->Set("import", host_imports);
 
@@ -209,7 +209,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 					continue;
 
 				/* add a new service for this host to the config repository */
-				Dictionary::Ptr service_attrs = make_shared<Dictionary>();
+				Dictionary::Ptr service_attrs = new Dictionary();
 				String long_name = host + "!" + service; //use NameComposer?
 				service_attrs->Set("__name", long_name);
 				service_attrs->Set("name", service);
@@ -217,7 +217,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 				service_attrs->Set("check_command", "dummy");
 				service_attrs->Set("zone", zone);
 
-				Array::Ptr service_imports = make_shared<Array>();
+				Array::Ptr service_imports = new Array();
 				service_imports->Add("satellite-service"); //default service node template
 				service_attrs->Set("import", service_imports);
 
@@ -227,7 +227,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 		}
 
 		/* write a new zone and endpoint for the node */
-		Dictionary::Ptr endpoint_attrs = make_shared<Dictionary>();
+		Dictionary::Ptr endpoint_attrs = new Dictionary();
 		endpoint_attrs->Set("__name", endpoint);
 		endpoint_attrs->Set("name", endpoint);
 
@@ -245,8 +245,8 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 			    << "Cannot add node endpoint '" << endpoint << "' to the config repository!\n";
 		}
 
-		Dictionary::Ptr zone_attrs = make_shared<Dictionary>();
-		Array::Ptr zone_members = make_shared<Array>();
+		Dictionary::Ptr zone_attrs = new Dictionary();
+		Array::Ptr zone_members = new Array();
 
 		zone_members->Add(endpoint);
 		zone_attrs->Set("__name", zone);
@@ -296,7 +296,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 			BOOST_FOREACH(const Dictionary::Pair& kv, old_node_repository) {
 				String host = kv.first;
 
-				Dictionary::Ptr host_attrs = make_shared<Dictionary>();
+				Dictionary::Ptr host_attrs = new Dictionary();
 				host_attrs->Set("name", host);
 				RepositoryUtility::RemoveObject(host, "Host", host_attrs); //this removes all services for this host as well
 			}
@@ -304,11 +304,11 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 			String zone = old_node->Get("zone");
 			String endpoint = old_node->Get("endpoint");
 
-			Dictionary::Ptr zone_attrs = make_shared<Dictionary>();
+			Dictionary::Ptr zone_attrs = new Dictionary();
 			zone_attrs->Set("name", zone);
 			RepositoryUtility::RemoveObject(zone, "Zone", zone_attrs);
 
-			Dictionary::Ptr endpoint_attrs = make_shared<Dictionary>();
+			Dictionary::Ptr endpoint_attrs = new Dictionary();
 			endpoint_attrs->Set("name", endpoint);
 			RepositoryUtility::RemoveObject(endpoint, "Endpoint", endpoint_attrs);
 		} else {
@@ -341,7 +341,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 					Log(LogInformation, "cli")
 					    << "Node update found old host '" << old_host << "' on node '" << old_node_name << "'. Removing it.";
 
-					Dictionary::Ptr host_attrs = make_shared<Dictionary>();
+					Dictionary::Ptr host_attrs = new Dictionary();
 					host_attrs->Set("name", old_host);
 					RepositoryUtility::RemoveObject(old_host, "Host", host_attrs); //this will remove all services for this host too
 				} else {
@@ -365,7 +365,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
 							    << "Node update found old service '" << old_service << "' on host '" << old_host
 							    << "' on node '" << old_node_name << "'. Removing it.";
 
-							Dictionary::Ptr service_attrs = make_shared<Dictionary>();
+							Dictionary::Ptr service_attrs = new Dictionary();
 							service_attrs->Set("name", old_service);
 							service_attrs->Set("host_name", old_host);
 							RepositoryUtility::RemoveObject(old_service, "Service", service_attrs);
diff --git a/lib/cli/nodeutility.cpp b/lib/cli/nodeutility.cpp
index f7cab6d40..c5291689e 100644
--- a/lib/cli/nodeutility.cpp
+++ b/lib/cli/nodeutility.cpp
@@ -122,7 +122,7 @@ void NodeUtility::PrintNodeRepository(std::ostream& fp, const Dictionary::Ptr& r
 
 void NodeUtility::PrintNodesJson(std::ostream& fp)
 {
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
 	BOOST_FOREACH(const Dictionary::Ptr& node, GetNodes()) {
 		result->Set(node->Get("endpoint"), node);
@@ -140,7 +140,7 @@ void NodeUtility::AddNode(const String& name)
 		    << "Node '" << name << "' exists already.";
 	}
 
-	Dictionary::Ptr node = make_shared<Dictionary>();
+	Dictionary::Ptr node = new Dictionary();
 
 	node->Set("seen", Utility::GetTime());
 	node->Set("endpoint", name);
@@ -153,7 +153,7 @@ void NodeUtility::AddNode(const String& name)
 void NodeUtility::AddNodeSettings(const String& name, const String& host,
     const String& port, double log_duration)
 {
-	Dictionary::Ptr settings = make_shared<Dictionary>();
+	Dictionary::Ptr settings = new Dictionary();
 
 	settings->Set("host", host);
 	settings->Set("port", port);
@@ -237,10 +237,10 @@ void NodeUtility::CollectNodes(const String& node_file, std::vector<Dictionary::
 
 int NodeUtility::GenerateNodeIcingaConfig(const std::vector<std::string>& endpoints, const String& nodename, const String& zonename)
 {
-	Array::Ptr my_config = make_shared<Array>();
+	Array::Ptr my_config = new Array();
 
-	Dictionary::Ptr my_master_zone = make_shared<Dictionary>();
-	Array::Ptr my_master_zone_members = make_shared<Array>();
+	Dictionary::Ptr my_master_zone = new Dictionary();
+	Array::Ptr my_master_zone_members = new Array();
 
 	String master_zone_name = "master"; //TODO: Find a better name.
 
@@ -250,7 +250,7 @@ int NodeUtility::GenerateNodeIcingaConfig(const std::vector<std::string>& endpoi
 		std::vector<String> tokens;
 		boost::algorithm::split(tokens, endpoint, boost::is_any_of(","));
 
-		Dictionary::Ptr my_master_endpoint = make_shared<Dictionary>();
+		Dictionary::Ptr my_master_endpoint = new Dictionary();
 
 		if (tokens.size() > 1) {
 			String host = tokens[1];
@@ -283,13 +283,13 @@ int NodeUtility::GenerateNodeIcingaConfig(const std::vector<std::string>& endpoi
 	my_config->Add(my_master_zone);
 
 	/* store the local generated node configuration */
-	Dictionary::Ptr my_endpoint = make_shared<Dictionary>();
-	Dictionary::Ptr my_zone = make_shared<Dictionary>();
+	Dictionary::Ptr my_endpoint = new Dictionary();
+	Dictionary::Ptr my_zone = new Dictionary();
 
 	my_endpoint->Set("__name", nodename);
 	my_endpoint->Set("__type", "Endpoint");
 
-	Array::Ptr my_zone_members = make_shared<Array>();
+	Array::Ptr my_zone_members = new Array();
 	my_zone_members->Add(nodename);
 
 	my_zone->Set("__name", nodename);
@@ -312,12 +312,12 @@ int NodeUtility::GenerateNodeIcingaConfig(const std::vector<std::string>& endpoi
 
 int NodeUtility::GenerateNodeMasterIcingaConfig(const String& nodename)
 {
-	Array::Ptr my_config = make_shared<Array>();
+	Array::Ptr my_config = new Array();
 
 	/* store the local generated node master configuration */
-	Dictionary::Ptr my_master_endpoint = make_shared<Dictionary>();
-	Dictionary::Ptr my_master_zone = make_shared<Dictionary>();
-	Array::Ptr my_master_zone_members = make_shared<Array>();
+	Dictionary::Ptr my_master_endpoint = new Dictionary();
+	Dictionary::Ptr my_master_zone = new Dictionary();
+	Array::Ptr my_master_zone_members = new Array();
 
 	my_master_endpoint->Set("__name", nodename);
 	my_master_endpoint->Set("__type", "Endpoint");
@@ -402,7 +402,7 @@ Array::Ptr NodeUtility::GetBlackAndWhiteList(const String& type)
 {
 	String list_path = GetBlackAndWhiteListPath(type);
 
-	Array::Ptr lists = make_shared<Array>();
+	Array::Ptr lists = new Array();
 
 	if (Utility::PathExists(list_path)) {
 		lists = Utility::LoadJsonFile(list_path);
@@ -435,7 +435,7 @@ int NodeUtility::UpdateBlackAndWhiteList(const String& type, const String& zone_
 		}
 	}
 
-	Dictionary::Ptr new_filter = make_shared<Dictionary>();
+	Dictionary::Ptr new_filter = new Dictionary();
 
 	new_filter->Set("zone", zone_filter);
 	new_filter->Set("host", host_filter);
diff --git a/lib/cli/objectlistcommand.cpp b/lib/cli/objectlistcommand.cpp
index 6c7c99b90..0e36ba9d1 100644
--- a/lib/cli/objectlistcommand.cpp
+++ b/lib/cli/objectlistcommand.cpp
@@ -78,7 +78,7 @@ int ObjectListCommand::Run(const boost::program_options::variables_map& vm, cons
 	std::fstream fp;
 	fp.open(objectfile.CStr(), std::ios_base::in);
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream(&fp, false);
 	unsigned long objects_count = 0;
 	std::map<String, int> type_count;
 
diff --git a/lib/cli/pkiutility.cpp b/lib/cli/pkiutility.cpp
index 842b55543..478fdd8c2 100644
--- a/lib/cli/pkiutility.cpp
+++ b/lib/cli/pkiutility.cpp
@@ -108,7 +108,7 @@ int PkiUtility::SignCsr(const String& csrfile, const String& certfile)
 
 	BIO_free(csrbio);
 
-	shared_ptr<X509> cert = CreateCertIcingaCA(X509_REQ_get_pubkey(req), X509_REQ_get_subject_name(req));
+	boost::shared_ptr<X509> cert = CreateCertIcingaCA(X509_REQ_get_pubkey(req), X509_REQ_get_subject_name(req));
 
 	X509_REQ_free(req);
 
@@ -129,13 +129,13 @@ int PkiUtility::SignCsr(const String& csrfile, const String& certfile)
 
 int PkiUtility::SaveCert(const String& host, const String& port, const String& keyfile, const String& certfile, const String& trustedfile)
 {
-	TcpSocket::Ptr client = make_shared<TcpSocket>();
+	TcpSocket::Ptr client = new TcpSocket();
 
 	client->Connect(host, port);
 
-	shared_ptr<SSL_CTX> sslContext = MakeSSLContext(certfile, keyfile);
+	boost::shared_ptr<SSL_CTX> sslContext = MakeSSLContext(certfile, keyfile);
 
-	TlsStream::Ptr stream = make_shared<TlsStream>(client, RoleClient, sslContext);
+	TlsStream::Ptr stream = new TlsStream(client, RoleClient, sslContext);
 
 	try {
 		stream->Handshake();
@@ -143,7 +143,7 @@ int PkiUtility::SaveCert(const String& host, const String& port, const String& k
 
 	}
 
-	shared_ptr<X509> cert = stream->GetPeerCertificate();
+	boost::shared_ptr<X509> cert = stream->GetPeerCertificate();
 
 	std::ofstream fpcert;
 	fpcert.open(trustedfile.CStr());
@@ -172,7 +172,7 @@ int PkiUtility::GenTicket(const String& cn, const String& salt, std::ostream& ti
 int PkiUtility::RequestCertificate(const String& host, const String& port, const String& keyfile,
     const String& certfile, const String& cafile, const String& trustedfile, const String& ticket)
 {
-	TcpSocket::Ptr client = make_shared<TcpSocket>();
+	TcpSocket::Ptr client = new TcpSocket();
 
 	try {
 		client->Connect(host, port);
@@ -184,7 +184,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 		return 1;
 	}
 
-	shared_ptr<SSL_CTX> sslContext;
+	boost::shared_ptr<SSL_CTX> sslContext;
 
 	try {
 		sslContext = MakeSSLContext(certfile, keyfile);
@@ -194,7 +194,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 		return 1;
 	}
 
-	TlsStream::Ptr stream = make_shared<TlsStream>(client, RoleClient, sslContext);
+	TlsStream::Ptr stream = new TlsStream(client, RoleClient, sslContext);
 
 	try {
 		stream->Handshake();
@@ -203,9 +203,9 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 		return 1;
 	}
 
-	shared_ptr<X509> peerCert = stream->GetPeerCertificate();
+	boost::shared_ptr<X509> peerCert = stream->GetPeerCertificate();
 
-	shared_ptr<X509> trustedCert;
+	boost::shared_ptr<X509> trustedCert;
 
 	try {
 		trustedCert = GetX509Certificate(trustedfile);
@@ -220,7 +220,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 		return 1;
 	}
 
-	Dictionary::Ptr request = make_shared<Dictionary>();
+	Dictionary::Ptr request = new Dictionary();
 
 	String msgid = Utility::NewUniqueID();
 
@@ -228,7 +228,7 @@ int PkiUtility::RequestCertificate(const String& host, const String& port, const
 	request->Set("id", msgid);
 	request->Set("method", "pki::RequestCertificate");
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("ticket", String(ticket));
 
 	request->Set("params", params);
diff --git a/lib/cli/repositoryobjectcommand.cpp b/lib/cli/repositoryobjectcommand.cpp
index a3bbba435..35ab319e3 100644
--- a/lib/cli/repositoryobjectcommand.cpp
+++ b/lib/cli/repositoryobjectcommand.cpp
@@ -45,13 +45,13 @@ RegisterRepositoryCLICommandHelper::RegisterRepositoryCLICommandHelper(const Str
 	name.push_back("repository");
 	name.push_back(ltype);
 	name.push_back("add");
-	CLICommand::Register(name, make_shared<RepositoryObjectCommand>(type, RepositoryCommandAdd));
+	CLICommand::Register(name, new RepositoryObjectCommand(type, RepositoryCommandAdd));
 
 	name[2] = "remove";
-	CLICommand::Register(name, make_shared<RepositoryObjectCommand>(type, RepositoryCommandRemove));
+	CLICommand::Register(name, new RepositoryObjectCommand(type, RepositoryCommandRemove));
 
 	name[2] = "list";
-	CLICommand::Register(name, make_shared<RepositoryObjectCommand>(type, RepositoryCommandList));
+	CLICommand::Register(name, new RepositoryObjectCommand(type, RepositoryCommandList));
 }
 
 RepositoryObjectCommand::RepositoryObjectCommand(const String& type, RepositoryCommandType command)
@@ -183,7 +183,7 @@ int RepositoryObjectCommand::Run(const boost::program_options::variables_map& vm
 	String name = attrs->Get("name");
 
 	if (vm.count("import")) {
-		Array::Ptr imports = make_shared<Array>();
+		Array::Ptr imports = new Array();
 
 		BOOST_FOREACH(const String& import, vm["import"].as<std::vector<std::string> >()) {
 			imports->Add(import);
diff --git a/lib/cli/repositoryutility.cpp b/lib/cli/repositoryutility.cpp
index b9c64b91e..a02b024b9 100644
--- a/lib/cli/repositoryutility.cpp
+++ b/lib/cli/repositoryutility.cpp
@@ -46,7 +46,7 @@ using namespace icinga;
 
 Dictionary::Ptr RepositoryUtility::GetArgumentAttributes(const std::vector<std::string>& arguments)
 {
-	Dictionary::Ptr attrs = make_shared<Dictionary>();
+	Dictionary::Ptr attrs = new Dictionary();
 
 	BOOST_FOREACH(const String& kv, arguments) {
 		std::vector<String> tokens;
@@ -160,7 +160,7 @@ void RepositoryUtility::PrintObjects(std::ostream& fp, const String& type)
 
 void RepositoryUtility::PrintChangeLog(std::ostream& fp)
 {
-	Array::Ptr changelog = make_shared<Array>();
+	Array::Ptr changelog = new Array();
 
 	GetChangeLog(boost::bind(RepositoryUtility::CollectChange, _1, changelog));
 
@@ -204,7 +204,7 @@ bool RepositoryUtility::AddObject(const String& name, const String& type, const
 	/* add a new changelog entry by timestamp */
 	String path = GetRepositoryChangeLogPath() + "/" + Convert::ToString(Utility::GetTime()) + "-" + type + "-" + SHA256(name) + ".change";
 
-	Dictionary::Ptr change = make_shared<Dictionary>();
+	Dictionary::Ptr change = new Dictionary();
 
 	change->Set("timestamp", Utility::GetTime());
 	change->Set("name", name);
@@ -269,7 +269,7 @@ bool RepositoryUtility::RemoveObject(const String& name, const String& type, con
 	/* add a new changelog entry by timestamp */
 	String path = GetRepositoryChangeLogPath() + "/" + Convert::ToString(Utility::GetTime()) + "-" + type + "-" + SHA256(name) + ".change";
 
-	Dictionary::Ptr change = make_shared<Dictionary>();
+	Dictionary::Ptr change = new Dictionary();
 
 	change->Set("timestamp", Utility::GetTime());
 	change->Set("name", name);
@@ -299,7 +299,7 @@ bool RepositoryUtility::CheckChangeExists(const Dictionary::Ptr& change)
 {
 	Dictionary::Ptr attrs = change->Get("attrs");
 
-	Array::Ptr changelog = make_shared<Array>();
+	Array::Ptr changelog = new Array();
 
 	GetChangeLog(boost::bind(RepositoryUtility::CollectChange, _1, changelog));
 
@@ -336,7 +336,7 @@ bool RepositoryUtility::ClearChangeLog(void)
 
 bool RepositoryUtility::ChangeLogHasPendingChanges(void)
 {
-	Array::Ptr changelog = make_shared<Array>();
+	Array::Ptr changelog = new Array();
 	GetChangeLog(boost::bind(RepositoryUtility::CollectChange, _1, changelog));
 
 	return changelog->GetLength() > 0;
diff --git a/lib/cli/variableutility.cpp b/lib/cli/variableutility.cpp
index 2919cb796..5d85496f4 100644
--- a/lib/cli/variableutility.cpp
+++ b/lib/cli/variableutility.cpp
@@ -36,7 +36,7 @@ Value VariableUtility::GetVariable(const String& name)
 	std::fstream fp;
 	fp.open(varsfile.CStr(), std::ios_base::in);
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream(&fp, false);
 
 	String message;
 
@@ -58,7 +58,7 @@ void VariableUtility::PrintVariables(std::ostream& outfp)
 	std::fstream fp;
 	fp.open(varsfile.CStr(), std::ios_base::in);
 
-	StdioStream::Ptr sfp = make_shared<StdioStream>(&fp, false);
+	StdioStream::Ptr sfp = new StdioStream(&fp, false);
 	unsigned long variables_count = 0;
 
 	String message;
diff --git a/lib/compat/checkresultreader.cpp b/lib/compat/checkresultreader.cpp
index 4e9c68810..25cabc37b 100644
--- a/lib/compat/checkresultreader.cpp
+++ b/lib/compat/checkresultreader.cpp
@@ -40,7 +40,7 @@ REGISTER_STATSFUNCTION(CheckResultReaderStats, &CheckResultReader::StatsFunc);
 
 Value CheckResultReader::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const CheckResultReader::Ptr& checkresultreader, DynamicType::GetObjectsByType<CheckResultReader>()) {
 		nodes->Set(checkresultreader->GetName(), 1); //add more stats
@@ -56,7 +56,7 @@ Value CheckResultReader::StatsFunc(const Dictionary::Ptr& status, const Array::P
  */
 void CheckResultReader::Start(void)
 {
-	m_ReadTimer = make_shared<Timer>();
+	m_ReadTimer = new Timer();
 	m_ReadTimer->OnTimerExpired.connect(boost::bind(&CheckResultReader::ReadTimerHandler, this));
 	m_ReadTimer->SetInterval(5);
 	m_ReadTimer->Start();
@@ -134,7 +134,7 @@ void CheckResultReader::ProcessCheckResultFile(const String& path) const
 		return;
 	}
 
-	CheckResult::Ptr result = make_shared<CheckResult>();
+	CheckResult::Ptr result = new CheckResult();
 	std::pair<String, Value> co = PluginUtility::ParseCheckOutput(attrs["output"]);
 	result->SetOutput(co.first);
 	result->SetPerformanceData(PluginUtility::SplitPerfdata(co.second));
diff --git a/lib/compat/compatlogger.cpp b/lib/compat/compatlogger.cpp
index bb8a9e3bf..1c3a3f076 100644
--- a/lib/compat/compatlogger.cpp
+++ b/lib/compat/compatlogger.cpp
@@ -47,7 +47,7 @@ REGISTER_STATSFUNCTION(CompatLoggerStats, &CompatLogger::StatsFunc);
 
 Value CompatLogger::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const CompatLogger::Ptr& compat_logger, DynamicType::GetObjectsByType<CompatLogger>()) {
 		nodes->Set(compat_logger->GetName(), 1); //add more stats
@@ -73,7 +73,7 @@ void CompatLogger::Start(void)
 	Checkable::OnEventCommandExecuted.connect(bind(&CompatLogger::EventCommandHandler, this, _1));
 	ExternalCommandProcessor::OnNewExternalCommand.connect(boost::bind(&CompatLogger::ExternalCommandHandler, this, _2, _3));
 
-	m_RotationTimer = make_shared<Timer>();
+	m_RotationTimer = new Timer();
 	m_RotationTimer->OnTimerExpired.connect(boost::bind(&CompatLogger::RotationTimerHandler, this));
 	m_RotationTimer->Start();
 
diff --git a/lib/compat/externalcommandlistener.cpp b/lib/compat/externalcommandlistener.cpp
index 6cdd4a5d7..95be37150 100644
--- a/lib/compat/externalcommandlistener.cpp
+++ b/lib/compat/externalcommandlistener.cpp
@@ -33,7 +33,7 @@ REGISTER_STATSFUNCTION(ExternalCommandListenerStats, &ExternalCommandListener::S
 
 Value ExternalCommandListener::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const ExternalCommandListener::Ptr& externalcommandlistener, DynamicType::GetObjectsByType<ExternalCommandListener>()) {
 		nodes->Set(externalcommandlistener->GetName(), 1); //add more stats
diff --git a/lib/compat/statusdatawriter.cpp b/lib/compat/statusdatawriter.cpp
index df57ce355..57efb57db 100644
--- a/lib/compat/statusdatawriter.cpp
+++ b/lib/compat/statusdatawriter.cpp
@@ -51,7 +51,7 @@ REGISTER_STATSFUNCTION(StatusDataWriterStats, &StatusDataWriter::StatsFunc);
 
 Value StatusDataWriter::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const StatusDataWriter::Ptr& statusdatawriter, DynamicType::GetObjectsByType<StatusDataWriter>()) {
 		nodes->Set(statusdatawriter->GetName(), 1); //add more stats
@@ -75,7 +75,7 @@ void StatusDataWriter::Start(void)
 {
 	DynamicObject::Start();
 
-	m_StatusTimer = make_shared<Timer>();
+	m_StatusTimer = new Timer();
 	m_StatusTimer->SetInterval(GetUpdateInterval());
 	m_StatusTimer->OnTimerExpired.connect(boost::bind(&StatusDataWriter::StatusTimerHandler, this));
 	m_StatusTimer->Start();
diff --git a/lib/config/config_parser.yy b/lib/config/config_parser.yy
index 0b801f5f1..22fcc22a9 100644
--- a/lib/config/config_parser.yy
+++ b/lib/config/config_parser.yy
@@ -75,7 +75,7 @@ int ignore_newlines = 0;
 
 static void MakeRBinaryOp(Value** result, Expression::OpCallback& op, Value *left, Value *right, DebugInfo& diLeft, DebugInfo& diRight)
 {
-	*result = new Value(make_shared<Expression>(op, *left, *right, DebugInfoRange(diLeft, diRight)));
+	*result = new Value(new Expression(op, *left, *right, DebugInfoRange(diLeft, diRight)));
 	delete left;
 	delete right;
 }
@@ -231,7 +231,7 @@ static std::stack<Expression::Ptr> m_FTerm;
 
 void ConfigCompiler::Compile(void)
 {
-	m_ModuleScope = make_shared<Dictionary>();
+	m_ModuleScope = new Dictionary();
 
 	m_Abstract = std::stack<bool>();
 	m_RuleLists = std::stack<TypeRuleList::Ptr>();
@@ -343,7 +343,7 @@ type: T_TYPE identifier
 		m_Type = ConfigType::GetByName(name);
 
 		if (!m_Type) {
-			m_Type = make_shared<ConfigType>(name, DebugInfoRange(@1, @2));
+			m_Type = new ConfigType(name, DebugInfoRange(@1, @2));
 			m_Type->Register();
 		}
 	}
@@ -363,7 +363,7 @@ type: T_TYPE identifier
 
 typerulelist: '{'
 	{
-		m_RuleLists.push(make_shared<TypeRuleList>());
+		m_RuleLists.push(new TypeRuleList());
 	}
 	typerules
 	'}'
@@ -447,7 +447,7 @@ object:
 	{
 		m_ObjectAssign.pop();
 
-		Array::Ptr args = make_shared<Array>();
+		Array::Ptr args = new Array();
 		
 		args->Add(m_Abstract.top());
 		m_Abstract.pop();
@@ -468,17 +468,17 @@ object:
 
 		m_SeenAssign.pop();
 
-		Expression::Ptr rex = make_shared<Expression>(&Expression::OpLogicalNegate, m_Ignore.top(), DebugInfoRange(@2, @5));
+		Expression::Ptr rex = new Expression(&Expression::OpLogicalNegate, m_Ignore.top(), DebugInfoRange(@2, @5));
 		m_Ignore.pop();
 
-		Expression::Ptr filter = make_shared<Expression>(&Expression::OpLogicalAnd, m_Assign.top(), rex, DebugInfoRange(@2, @5));
+		Expression::Ptr filter = new Expression(&Expression::OpLogicalAnd, m_Assign.top(), rex, DebugInfoRange(@2, @5));
 		m_Assign.pop();
 
 		args->Add(filter);
 
 		args->Add(context->GetZone());
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpObject, args, exprl, DebugInfoRange(@2, @5)));
+		$$ = new Value(new Expression(&Expression::OpObject, args, exprl, DebugInfoRange(@2, @5)));
 	}
 	;
 
@@ -602,13 +602,13 @@ lterm_items_inner: lterm
 
 lterm: indexer combined_set_op rterm
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpSet, MakeArray(Array::Ptr($1), $2), *$3, DebugInfoRange(@1, @3)));
+		$$ = new Value(new Expression(&Expression::OpSet, MakeArray(Array::Ptr($1), $2), *$3, DebugInfoRange(@1, @3)));
 		delete $3;
 	}
 	| T_IMPORT rterm
 	{
-		Expression::Ptr avar = make_shared<Expression>(&Expression::OpVariable, "type", DebugInfoRange(@1, @2));
-		$$ = new Value(make_shared<Expression>(&Expression::OpImport, avar, *$2, DebugInfoRange(@1, @2)));
+		Expression::Ptr avar = new Expression(&Expression::OpVariable, "type", DebugInfoRange(@1, @2));
+		$$ = new Value(new Expression(&Expression::OpImport, avar, *$2, DebugInfoRange(@1, @2)));
 		delete $2;
 	}
 	| T_ASSIGN T_WHERE rterm
@@ -618,7 +618,7 @@ lterm: indexer combined_set_op rterm
 
 		m_SeenAssign.top() = true;
 
-		m_Assign.top() = make_shared<Expression>(&Expression::OpLogicalOr, m_Assign.top(), *$3, DebugInfoRange(@1, @3));
+		m_Assign.top() = new Expression(&Expression::OpLogicalOr, m_Assign.top(), *$3, DebugInfoRange(@1, @3));
 		delete $3;
 
 		$$ = new Value(MakeLiteral());
@@ -628,7 +628,7 @@ lterm: indexer combined_set_op rterm
 		if ((m_Apply.empty() || !m_Apply.top()) && (m_ObjectAssign.empty() || !m_ObjectAssign.top()))
 			BOOST_THROW_EXCEPTION(ConfigError("'ignore' keyword not valid in this context."));
 
-		m_Ignore.top() = make_shared<Expression>(&Expression::OpLogicalOr, m_Ignore.top(), *$3, DebugInfoRange(@1, @3));
+		m_Ignore.top() = new Expression(&Expression::OpLogicalOr, m_Ignore.top(), *$3, DebugInfoRange(@1, @3));
 		delete $3;
 
 		$$ = new Value(MakeLiteral());
@@ -636,7 +636,7 @@ lterm: indexer combined_set_op rterm
 	| T_RETURN rterm
 	{
 		Expression::Ptr aname = MakeLiteral("__result");
-		$$ = new Value(make_shared<Expression>(&Expression::OpSet, MakeArray(MakeArray(MakeLiteral(aname)), OpSetLiteral), *$2, DebugInfoRange(@1, @2)));
+		$$ = new Value(new Expression(&Expression::OpSet, MakeArray(MakeArray(MakeLiteral(aname)), OpSetLiteral), *$2, DebugInfoRange(@1, @2)));
 		delete $2;
 
 	}
@@ -684,37 +684,37 @@ rterm_items_inner: rterm
 
 rterm_array: '[' newlines rterm_items newlines ']'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpArray, Array::Ptr($3), DebugInfoRange(@1, @5)));
+		$$ = new Value(new Expression(&Expression::OpArray, Array::Ptr($3), DebugInfoRange(@1, @5)));
 	}
 	| '[' newlines rterm_items ']'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpArray, Array::Ptr($3), DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpArray, Array::Ptr($3), DebugInfoRange(@1, @4)));
 	}
 	| '[' rterm_items newlines ']'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpArray, Array::Ptr($2), DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpArray, Array::Ptr($2), DebugInfoRange(@1, @4)));
 	}
 	| '[' rterm_items ']'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpArray, Array::Ptr($2), DebugInfoRange(@1, @3)));
+		$$ = new Value(new Expression(&Expression::OpArray, Array::Ptr($2), DebugInfoRange(@1, @3)));
 	}
 	;
 
 rterm_scope: '{' newlines lterm_items newlines '}'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpDict, Array::Ptr($3), DebugInfoRange(@1, @5)));
+		$$ = new Value(new Expression(&Expression::OpDict, Array::Ptr($3), DebugInfoRange(@1, @5)));
 	}
 	| '{' newlines lterm_items '}'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpDict, Array::Ptr($3), DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpDict, Array::Ptr($3), DebugInfoRange(@1, @4)));
 	}
 	| '{' lterm_items newlines '}'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpDict, Array::Ptr($2), DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpDict, Array::Ptr($2), DebugInfoRange(@1, @4)));
 	}
 	| '{' lterm_items '}'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpDict, Array::Ptr($2), DebugInfoRange(@1, @3)));
+		$$ = new Value(new Expression(&Expression::OpDict, Array::Ptr($2), DebugInfoRange(@1, @3)));
 	}
 	;
 
@@ -733,33 +733,33 @@ rterm: T_STRING
 	}
 	| rterm '.' T_IDENTIFIER
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpIndexer, *$1, MakeLiteral($3), DebugInfoRange(@1, @3)));
+		$$ = new Value(new Expression(&Expression::OpIndexer, *$1, MakeLiteral($3), DebugInfoRange(@1, @3)));
 		delete $1;
 		free($3);
 	}
 	| rterm '(' rterm_items ')'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpFunctionCall, *$1, MakeLiteral(Array::Ptr($3)), DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpFunctionCall, *$1, MakeLiteral(Array::Ptr($3)), DebugInfoRange(@1, @4)));
 		delete $1;
 	}
 	| T_IDENTIFIER
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpVariable, $1, @1));
+		$$ = new Value(new Expression(&Expression::OpVariable, $1, @1));
 		free($1);
 	}
 	| '!' rterm
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpLogicalNegate, *$2, DebugInfoRange(@1, @2)));
+		$$ = new Value(new Expression(&Expression::OpLogicalNegate, *$2, DebugInfoRange(@1, @2)));
 		delete $2;
 	}
 	| '~' rterm
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpNegate, *$2, DebugInfoRange(@1, @2)));
+		$$ = new Value(new Expression(&Expression::OpNegate, *$2, DebugInfoRange(@1, @2)));
 		delete $2;
 	}
 	| rterm '[' rterm ']'
 	{
-		$$ = new Value(make_shared<Expression>(&Expression::OpIndexer, *$1, *$3, DebugInfoRange(@1, @4)));
+		$$ = new Value(new Expression(&Expression::OpIndexer, *$1, *$3, DebugInfoRange(@1, @4)));
 		delete $1;
 		delete $3;
 	}
@@ -804,7 +804,7 @@ rterm: T_STRING
 		delete $6;
 		aexpr->MakeInline();
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpFunction, MakeArray($2, aexpr), Array::Ptr($4), DebugInfoRange(@1, @6)));
+		$$ = new Value(new Expression(&Expression::OpFunction, MakeArray($2, aexpr), Array::Ptr($4), DebugInfoRange(@1, @6)));
 		free($2);
 	}
 	| T_FUNCTION '(' identifier_items ')' rterm_scope
@@ -813,7 +813,7 @@ rterm: T_STRING
 		delete $5;
 		aexpr->MakeInline();
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpFunction, MakeArray(Empty, aexpr), Array::Ptr($3), DebugInfoRange(@1, @5)));
+		$$ = new Value(new Expression(&Expression::OpFunction, MakeArray(Empty, aexpr), Array::Ptr($3), DebugInfoRange(@1, @5)));
 	}
 	| T_FOR '(' identifier T_FOLLOWS identifier T_IN rterm ')' rterm_scope
 	{
@@ -823,7 +823,7 @@ rterm: T_STRING
 		Expression::Ptr ascope = *$9;
 		delete $9;
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpFor, MakeArray($3, $5, aexpr), ascope, DebugInfoRange(@1, @9)));
+		$$ = new Value(new Expression(&Expression::OpFor, MakeArray($3, $5, aexpr), ascope, DebugInfoRange(@1, @9)));
 		free($3);
 		free($5);
 	}
@@ -835,7 +835,7 @@ rterm: T_STRING
 		Expression::Ptr ascope = *$7;
 		delete $7;
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpFor, MakeArray($3, Empty, aexpr), ascope, DebugInfoRange(@1, @7)));
+		$$ = new Value(new Expression(&Expression::OpFor, MakeArray($3, Empty, aexpr), ascope, DebugInfoRange(@1, @7)));
 		free($3);
 	}
 	;
@@ -940,10 +940,10 @@ apply:
 
 		m_SeenAssign.pop();
 
-		Expression::Ptr rex = make_shared<Expression>(&Expression::OpLogicalNegate, m_Ignore.top(), DebugInfoRange(@2, @5));
+		Expression::Ptr rex = new Expression(&Expression::OpLogicalNegate, m_Ignore.top(), DebugInfoRange(@2, @5));
 		m_Ignore.pop();
 
-		Expression::Ptr filter = make_shared<Expression>(&Expression::OpLogicalAnd, m_Assign.top(), rex, DebugInfoRange(@2, @5));
+		Expression::Ptr filter = new Expression(&Expression::OpLogicalAnd, m_Assign.top(), rex, DebugInfoRange(@2, @5));
 		m_Assign.pop();
 
 		String fkvar = m_FKVar.top();
@@ -955,7 +955,7 @@ apply:
 		Expression::Ptr fterm = m_FTerm.top();
 		m_FTerm.pop();
 
-		Array::Ptr args = make_shared<Array>();
+		Array::Ptr args = new Array();
 		args->Add(type);
 		args->Add(target);
 		args->Add(aname);
@@ -964,7 +964,7 @@ apply:
 		args->Add(fvvar);
 		args->Add(fterm);
 
-		$$ = new Value(make_shared<Expression>(&Expression::OpApply, args, exprl, DebugInfoRange(@2, @5)));
+		$$ = new Value(new Expression(&Expression::OpApply, args, exprl, DebugInfoRange(@2, @5)));
 	}
 	;
 
diff --git a/lib/config/configcompilercontext.cpp b/lib/config/configcompilercontext.cpp
index e5b95ce25..d688f87e1 100644
--- a/lib/config/configcompilercontext.cpp
+++ b/lib/config/configcompilercontext.cpp
@@ -76,7 +76,7 @@ void ConfigCompilerContext::OpenObjectsFile(const String& filename)
 	if (!*fp)
 		BOOST_THROW_EXCEPTION(std::runtime_error("Could not open '" + tempFilename + "' file"));
 
-	m_ObjectsFP = make_shared<StdioStream>(fp, true);
+	m_ObjectsFP = new StdioStream(fp, true);
 }
 
 void ConfigCompilerContext::WriteObject(const Dictionary::Ptr& object)
diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp
index cf287933d..65c1da063 100644
--- a/lib/config/configitem.cpp
+++ b/lib/config/configitem.cpp
@@ -150,7 +150,7 @@ DynamicObject::Ptr ConfigItem::Commit(bool discard)
 	dobj->SetTypeName(m_Type);
 	dobj->SetZone(m_Zone);
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", m_Scope);
 	m_Scope.reset();
 	locals->Set("name", m_Name);
@@ -175,7 +175,7 @@ DynamicObject::Ptr ConfigItem::Commit(bool discard)
 
 	String name = m_Name;
 
-	shared_ptr<NameComposer> nc = dynamic_pointer_cast<NameComposer>(type);
+	NameComposer *nc = dynamic_cast<NameComposer *>(type.get());
 
 	if (nc) {
 		name = nc->MakeName(m_Name, dobj);
@@ -191,7 +191,7 @@ DynamicObject::Ptr ConfigItem::Commit(bool discard)
 
 	Dictionary::Ptr attrs = Serialize(dobj, FAConfig);
 
-	Dictionary::Ptr persistentItem = make_shared<Dictionary>();
+	Dictionary::Ptr persistentItem = new Dictionary();
 
 	persistentItem->Set("type", GetType());
 	persistentItem->Set("name", GetName());
@@ -230,18 +230,18 @@ DynamicObject::Ptr ConfigItem::Commit(bool discard)
  */
 void ConfigItem::Register(void)
 {
-	ConfigItem::Ptr self = GetSelf();
+	Type::Ptr type = Type::GetByName(m_Type);
 
 	/* If this is a non-abstract object with a composite name
 	 * we register it in m_UnnamedItems instead of m_Items. */
-	if (!m_Abstract && dynamic_pointer_cast<NameComposer>(Type::GetByName(m_Type))) {
+	if (!m_Abstract && dynamic_cast<NameComposer *>(type.get())) {
 		boost::mutex::scoped_lock lock(m_Mutex);
-		m_UnnamedItems.push_back(self);
+		m_UnnamedItems.push_back(this);
 	} else {
 		std::pair<String, String> key = std::make_pair(m_Type, m_Name);
 
 		boost::mutex::scoped_lock lock(m_Mutex);
-		m_Items[key] = self;
+		m_Items[key] = this;
 	}
 }
 
diff --git a/lib/config/configitembuilder.cpp b/lib/config/configitembuilder.cpp
index c843c9cb6..7820aedf2 100644
--- a/lib/config/configitembuilder.cpp
+++ b/lib/config/configitembuilder.cpp
@@ -25,7 +25,7 @@
 using namespace icinga;
 
 ConfigItemBuilder::ConfigItemBuilder(void)
-	: m_Abstract(false), m_Expressions(make_shared<Array>())
+	: m_Abstract(false), m_Expressions(new Array())
 {
 	m_DebugInfo.FirstLine = 0;
 	m_DebugInfo.FirstColumn = 0;
@@ -34,7 +34,7 @@ ConfigItemBuilder::ConfigItemBuilder(void)
 }
 
 ConfigItemBuilder::ConfigItemBuilder(const DebugInfo& debugInfo)
-	: m_Abstract(false), m_Expressions(make_shared<Array>())
+	: m_Abstract(false), m_Expressions(new Array())
 {
 	m_DebugInfo = debugInfo;
 }
@@ -89,19 +89,19 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void)
 		BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
 	}
 
-	Array::Ptr exprs = make_shared<Array>();
-	Array::Ptr templateArray = make_shared<Array>();
+	Array::Ptr exprs = new Array();
+	Array::Ptr templateArray = new Array();
 	templateArray->Add(m_Name);
 
-	exprs->Add(make_shared<Expression>(&Expression::OpSet,
+	exprs->Add(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("templates")), OpSetAdd),
-	    make_shared<Expression>(&Expression::OpLiteral, templateArray, m_DebugInfo),
+	    new Expression(&Expression::OpLiteral, templateArray, m_DebugInfo),
 	    m_DebugInfo));
 
-	exprs->Add(make_shared<Expression>(&Expression::OpDict, m_Expressions, true, m_DebugInfo));
+	exprs->Add(new Expression(&Expression::OpDict, m_Expressions, true, m_DebugInfo));
 	
-	Expression::Ptr exprl = make_shared<Expression>(&Expression::OpDict, exprs, true, m_DebugInfo);
+	Expression::Ptr exprl = new Expression(&Expression::OpDict, exprs, true, m_DebugInfo);
 
-	return make_shared<ConfigItem>(m_Type, m_Name, m_Abstract, exprl,
+	return new ConfigItem(m_Type, m_Name, m_Abstract, exprl,
 	    m_DebugInfo, m_Scope, m_Zone);
 }
diff --git a/lib/config/configtype.cpp b/lib/config/configtype.cpp
index fb28c654e..235331245 100644
--- a/lib/config/configtype.cpp
+++ b/lib/config/configtype.cpp
@@ -28,7 +28,7 @@
 using namespace icinga;
 
 ConfigType::ConfigType(const String& name, const DebugInfo& debuginfo)
-	: m_Name(name), m_RuleList(make_shared<TypeRuleList>()), m_DebugInfo(debuginfo)
+	: m_Name(name), m_RuleList(new TypeRuleList()), m_DebugInfo(debuginfo)
 { }
 
 String ConfigType::GetName(void) const
@@ -85,7 +85,7 @@ void ConfigType::ValidateItem(const String& name, const Dictionary::Ptr& attrs,
 	locations.push_back(location);
 
 	std::vector<TypeRuleList::Ptr> ruleLists;
-	AddParentRules(ruleLists, GetSelf());
+	AddParentRules(ruleLists, this);
 	ruleLists.push_back(m_RuleList);
 
 	ValidateDictionary(attrs, ruleLists, locations, utils);
@@ -278,7 +278,7 @@ void ConfigType::ValidateArray(const Array::Ptr& array,
 
 void ConfigType::Register(void)
 {
-	ConfigTypeRegistry::GetInstance()->Register(GetName(), GetSelf());
+	ConfigTypeRegistry::GetInstance()->Register(GetName(), this);
 }
 
 ConfigType::Ptr ConfigType::GetByName(const String& name)
diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp
index dab19f251..6143354ed 100644
--- a/lib/config/expression.cpp
+++ b/lib/config/expression.cpp
@@ -275,7 +275,7 @@ Value Expression::OpFunctionCall(const Expression *expr, const Object::Ptr& cont
 Value Expression::OpArray(const Expression *expr, const Object::Ptr& context, DebugHint *dhint)
 {
 	Array::Ptr arr = expr->m_Operand1;
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	if (arr) {
 		for (Array::SizeType index = 0; index < arr->GetLength(); index++) {
@@ -291,7 +291,7 @@ Value Expression::OpDict(const Expression *expr, const Object::Ptr& context, Deb
 {
 	Array::Ptr arr = expr->m_Operand1;
 	bool in_place = expr->m_Operand2;
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
 	result->Set("__parent", context);
 
@@ -335,10 +335,10 @@ Value Expression::OpSet(const Expression *expr, const Object::Ptr& context, Debu
 		} else {
 			parent = object;
 
-			Expression::Ptr eparent = make_shared<Expression>(&Expression::OpLiteral, parent, expr->m_DebugInfo);
-			Expression::Ptr eindex = make_shared<Expression>(&Expression::OpLiteral, tempindex, expr->m_DebugInfo);
+			Expression::Ptr eparent = new Expression(&Expression::OpLiteral, parent, expr->m_DebugInfo);
+			Expression::Ptr eindex = new Expression(&Expression::OpLiteral, tempindex, expr->m_DebugInfo);
 
-			Expression::Ptr eip = make_shared<Expression>(&Expression::OpIndexer, eparent, eindex, expr->m_DebugInfo);
+			Expression::Ptr eip = new Expression(&Expression::OpIndexer, eparent, eindex, expr->m_DebugInfo);
 			object = eip->Evaluate(context, dhint);
 		}
 
@@ -346,7 +346,7 @@ Value Expression::OpSet(const Expression *expr, const Object::Ptr& context, Debu
 			sdhint = sdhint->GetChild(index);
 
 		if (i != indexer->GetLength() - 1 && object.IsEmpty()) {
-			object = make_shared<Dictionary>();
+			object = new Dictionary();
 
 			SetField(parent, tempindex, object);
 		}
@@ -374,9 +374,9 @@ Value Expression::OpSet(const Expression *expr, const Object::Ptr& context, Debu
 				VERIFY(!"Invalid opcode.");
 		}
 
-		Expression::Ptr ecp = make_shared<Expression>(op,
-		    make_shared<Expression>(&Expression::OpLiteral, object, expr->m_DebugInfo),
-		    make_shared<Expression>(&Expression::OpLiteral, right, expr->m_DebugInfo),
+		Expression::Ptr ecp = new Expression(op,
+		    new Expression(&Expression::OpLiteral, object, expr->m_DebugInfo),
+		    new Expression(&Expression::OpLiteral, right, expr->m_DebugInfo),
 		    expr->m_DebugInfo);
 
 		right = ecp->Evaluate(context, dhint);
@@ -441,7 +441,7 @@ Value Expression::FunctionWrapper(const std::vector<Value>& arguments, const Arr
 	if (arguments.size() < funcargs->GetLength())
 		BOOST_THROW_EXCEPTION(ConfigError("Too few arguments for function"));
 
-	Dictionary::Ptr context = make_shared<Dictionary>();
+	Dictionary::Ptr context = new Dictionary();
 	context->Set("__parent", scope);
 
 	for (std::vector<Value>::size_type i = 0; i < std::min(arguments.size(), funcargs->GetLength()); i++)
@@ -458,7 +458,7 @@ Value Expression::OpFunction(const Expression* expr, const Object::Ptr& context,
 	String name = left->Get(0);
 
 	Array::Ptr funcargs = expr->m_Operand2;
-	ScriptFunction::Ptr func = make_shared<ScriptFunction>(boost::bind(&Expression::FunctionWrapper, _1, funcargs, aexpr, context));
+	ScriptFunction::Ptr func = new ScriptFunction(boost::bind(&Expression::FunctionWrapper, _1, funcargs, aexpr, context));
 
 	if (!name.IsEmpty())
 		ScriptFunction::Register(name, func);
@@ -497,12 +497,14 @@ Value Expression::OpObject(const Expression* expr, const Object::Ptr& context, D
 
 	String name = aname->Evaluate(context, dhint);
 
-	ConfigItemBuilder::Ptr item = make_shared<ConfigItemBuilder>(expr->m_DebugInfo);
+	ConfigItemBuilder::Ptr item = new ConfigItemBuilder(expr->m_DebugInfo);
 
 	String checkName = name;
 
 	if (!abstract) {
-		shared_ptr<NameComposer> nc = dynamic_pointer_cast<NameComposer>(Type::GetByName(type));
+		Type::Ptr ptype = Type::GetByName(type);
+
+		NameComposer *nc = dynamic_cast<NameComposer *>(ptype.get());
 
 		if (nc)
 			checkName = nc->MakeName(name, Dictionary::Ptr());
@@ -557,7 +559,7 @@ Value Expression::OpFor(const Expression* expr, const Object::Ptr& context, Debu
 
 		ObjectLock olock(arr);
 		BOOST_FOREACH(const Value& value, arr) {
-			Dictionary::Ptr xcontext = make_shared<Dictionary>();
+			Dictionary::Ptr xcontext = new Dictionary();
 			xcontext->Set("__parent", context);
 			xcontext->Set(kvar, value);
 
@@ -571,7 +573,7 @@ Value Expression::OpFor(const Expression* expr, const Object::Ptr& context, Debu
 
 		ObjectLock olock(dict);
 		BOOST_FOREACH(const Dictionary::Pair& kv, dict) {
-			Dictionary::Ptr xcontext = make_shared<Dictionary>();
+			Dictionary::Ptr xcontext = new Dictionary();
 			xcontext->Set("__parent", context);
 			xcontext->Set(kvar, kv.first);
 			xcontext->Set(vvar, kv.second);
@@ -586,12 +588,12 @@ Value Expression::OpFor(const Expression* expr, const Object::Ptr& context, Debu
 
 Dictionary::Ptr DebugHint::ToDictionary(void) const
 {
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
-	Array::Ptr messages = make_shared<Array>();
+	Array::Ptr messages = new Array();
 	typedef std::pair<String, DebugInfo> MessageType;
 	BOOST_FOREACH(const MessageType& message, Messages) {
-		Array::Ptr amsg = make_shared<Array>();
+		Array::Ptr amsg = new Array();
 		amsg->Add(message.first);
 		amsg->Add(message.second.Path);
 		amsg->Add(message.second.FirstLine);
@@ -603,7 +605,7 @@ Dictionary::Ptr DebugHint::ToDictionary(void) const
 
 	result->Set("messages", messages);
 
-	Dictionary::Ptr properties = make_shared<Dictionary>();
+	Dictionary::Ptr properties = new Dictionary();
 
 	typedef std::map<String, DebugHint>::value_type ChildType;
 	BOOST_FOREACH(const ChildType& kv, Children) {
@@ -617,7 +619,7 @@ Dictionary::Ptr DebugHint::ToDictionary(void) const
 
 Expression::Ptr icinga::MakeLiteral(const Value& lit)
 {
-	return make_shared<Expression>(&Expression::OpLiteral, lit, DebugInfo());
+	return new Expression(&Expression::OpLiteral, lit, DebugInfo());
 }
 
 bool Expression::HasField(const Object::Ptr& context, const String& field)
diff --git a/lib/db_ido/commanddbobject.cpp b/lib/db_ido/commanddbobject.cpp
index eb4ba237f..97a6f3310 100644
--- a/lib/db_ido/commanddbobject.cpp
+++ b/lib/db_ido/commanddbobject.cpp
@@ -38,7 +38,7 @@ CommandDbObject::CommandDbObject(const DbType::Ptr& type, const String& name1, c
 
 Dictionary::Ptr CommandDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Command::Ptr command = static_pointer_cast<Command>(GetObject());
 
 	fields->Set("command_line", CompatUtility::GetCommandLine(command));
diff --git a/lib/db_ido/commanddbobject.hpp b/lib/db_ido/commanddbobject.hpp
index c414b6cd7..34be08ca7 100644
--- a/lib/db_ido/commanddbobject.hpp
+++ b/lib/db_ido/commanddbobject.hpp
@@ -36,7 +36,7 @@ class CommandDbObject : public DbObject
 public:
 	DECLARE_PTR_TYPEDEFS(CommandDbObject);
 
-	CommandDbObject(const shared_ptr<DbType>& type, const String& name1, const String& name2);
+	CommandDbObject(const DbType::Ptr& type, const String& name1, const String& name2);
 
 	virtual Dictionary::Ptr GetConfigFields(void) const;
 	virtual Dictionary::Ptr GetStatusFields(void) const;
diff --git a/lib/db_ido/dbconnection.cpp b/lib/db_ido/dbconnection.cpp
index 60af3a7bf..e8c2e1435 100644
--- a/lib/db_ido/dbconnection.cpp
+++ b/lib/db_ido/dbconnection.cpp
@@ -67,7 +67,7 @@ void DbConnection::Resume(void)
 	Log(LogInformation, "DbConnection")
 	    << "Resuming IDO connection: " << GetName();
 
-	m_CleanUpTimer = make_shared<Timer>();
+	m_CleanUpTimer = new Timer();
 	m_CleanUpTimer->SetInterval(60);
 	m_CleanUpTimer->OnTimerExpired.connect(boost::bind(&DbConnection::CleanUpHandler, this));
 	m_CleanUpTimer->Start();
@@ -85,7 +85,7 @@ void DbConnection::Pause(void)
 
 void DbConnection::StaticInitialize(void)
 {
-	m_ProgramStatusTimer = make_shared<Timer>();
+	m_ProgramStatusTimer = new Timer();
 	m_ProgramStatusTimer->SetInterval(10);
 	m_ProgramStatusTimer->OnTimerExpired.connect(boost::bind(&DbConnection::ProgramStatusHandler));
 	m_ProgramStatusTimer->Start();
@@ -97,7 +97,7 @@ void DbConnection::InsertRuntimeVariable(const String& key, const Value& value)
 	query.Table = "runtimevariables";
 	query.Type = DbQueryInsert;
 	query.Category = DbCatProgramStatus;
-	query.Fields = make_shared<Dictionary>();
+	query.Fields = new Dictionary();
 	query.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 	query.Fields->Set("varname", key);
 	query.Fields->Set("varvalue", value);
@@ -110,7 +110,7 @@ void DbConnection::ProgramStatusHandler(void)
 	query1.Table = "programstatus";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatProgramStatus;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("instance_id", 0);  /* DbConnection class fills in real ID */
 	DbObject::OnQuery(query1);
 
@@ -120,7 +120,7 @@ void DbConnection::ProgramStatusHandler(void)
 	query2.Type = DbQueryInsert;
 	query2.Category = DbCatProgramStatus;
 
-	query2.Fields = make_shared<Dictionary>();
+	query2.Fields = new Dictionary();
 	query2.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 	query2.Fields->Set("program_version", Application::GetVersion());
 	query2.Fields->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
@@ -144,7 +144,7 @@ void DbConnection::ProgramStatusHandler(void)
 	query3.Table = "runtimevariables";
 	query3.Type = DbQueryDelete;
 	query3.Category = DbCatProgramStatus;
-	query3.WhereCriteria = make_shared<Dictionary>();
+	query3.WhereCriteria = new Dictionary();
 	query3.WhereCriteria->Set("instance_id", 0);  /* DbConnection class fills in real ID */
 	DbObject::OnQuery(query3);
 
@@ -167,7 +167,7 @@ void DbConnection::ProgramStatusHandler(void)
 			Log(LogDebug, "DbConnection")
 			    << "icinga application customvar key: '" << kv.first << "' value: '" << kv.second << "'";
 
-			Dictionary::Ptr fields4 = make_shared<Dictionary>();
+			Dictionary::Ptr fields4 = new Dictionary();
 			fields4->Set("varname", Convert::ToString(kv.first));
 			fields4->Set("varvalue", Convert::ToString(kv.second));
 			fields4->Set("config_type", 1);
diff --git a/lib/db_ido/dbconnection.ti b/lib/db_ido/dbconnection.ti
index 135f3dc5a..b47069c90 100644
--- a/lib/db_ido/dbconnection.ti
+++ b/lib/db_ido/dbconnection.ti
@@ -30,7 +30,7 @@ abstract class DbConnection : DynamicObject
 	};
 
 	[config] Dictionary::Ptr cleanup {
-		default {{{ return make_shared<Dictionary>(); }}}
+		default {{{ return new Dictionary(); }}}
 	};
 
 	[config] int categories {
diff --git a/lib/db_ido/dbevents.cpp b/lib/db_ido/dbevents.cpp
index 40bf896d2..08cf55cc6 100644
--- a/lib/db_ido/dbevents.cpp
+++ b/lib/db_ido/dbevents.cpp
@@ -99,12 +99,12 @@ void DbEvents::NextCheckChangedHandler(const Checkable::Ptr& checkable, double n
 
 	query1.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("next_check", DbValue::FromTimestamp(nextCheck));
 
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	if (service)
 		query1.WhereCriteria->Set("service_object_id", service);
 	else
@@ -129,13 +129,13 @@ void DbEvents::FlappingChangedHandler(const Checkable::Ptr& checkable, FlappingS
 
 	query1.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("is_flapping", CompatUtility::GetCheckableIsFlapping(checkable));
 	fields1->Set("percent_state_change", CompatUtility::GetCheckablePercentStateChange(checkable));
 
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	if (service)
 		query1.WhereCriteria->Set("service_object_id", service);
 	else
@@ -164,14 +164,14 @@ void DbEvents::LastNotificationChangedHandler(const Notification::Ptr& notificat
 
 	query1.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("last_notification", DbValue::FromTimestamp(now_bag.first));
 	fields1->Set("next_notification", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("current_notification_number", notification->GetNotificationNumber());
 
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	if (service)
 		query1.WhereCriteria->Set("service_object_id", service);
 	else
@@ -222,7 +222,7 @@ void DbEvents::EnableChangedHandlerInternal(const Checkable::Ptr& checkable, boo
 
 	query1.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 
 	if (type == EnableActiveChecks) {
 		fields1->Set("active_checks_enabled", enabled ? 1 : 0);
@@ -238,7 +238,7 @@ void DbEvents::EnableChangedHandlerInternal(const Checkable::Ptr& checkable, boo
 
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	if (service)
 		query1.WhereCriteria->Set("service_object_id", service);
 	else
@@ -294,7 +294,7 @@ void DbEvents::AddCommentByType(const DynamicObject::Ptr& object, const Comment:
 	unsigned long entry_time = static_cast<long>(comment->GetEntryTime());
 	unsigned long entry_time_usec = (comment->GetEntryTime() - entry_time) * 1000 * 1000;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("entry_time", DbValue::FromTimestamp(entry_time));
 	fields1->Set("entry_time_usec", entry_time_usec);
 	fields1->Set("entry_type", comment->GetEntryType());
@@ -348,7 +348,7 @@ void DbEvents::RemoveComments(const Checkable::Ptr& checkable)
 	query1.Table = "comments";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatComment;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("object_id", checkable);
 	DbObject::OnQuery(query1);
 }
@@ -368,7 +368,7 @@ void DbEvents::RemoveComment(const Checkable::Ptr& checkable, const Comment::Ptr
 	query1.Table = "comments";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatComment;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("object_id", checkable);
 	query1.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
 	DbObject::OnQuery(query1);
@@ -384,12 +384,12 @@ void DbEvents::RemoveComment(const Checkable::Ptr& checkable, const Comment::Ptr
 	query2.Type = DbQueryUpdate;
 	query2.Category = DbCatComment;
 
-	Dictionary::Ptr fields2 = make_shared<Dictionary>();
+	Dictionary::Ptr fields2 = new Dictionary();
 	fields2->Set("deletion_time", DbValue::FromTimestamp(time_bag.first));
 	fields2->Set("deletion_time_usec", time_bag.second);
 	query2.Fields = fields2;
 
-	query2.WhereCriteria = make_shared<Dictionary>();
+	query2.WhereCriteria = new Dictionary();
 	query2.WhereCriteria->Set("internal_comment_id", comment->GetLegacyId());
 	query2.WhereCriteria->Set("comment_time", DbValue::FromTimestamp(entry_time));
 	query2.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
@@ -438,7 +438,7 @@ void DbEvents::AddDowntimeInternal(const Checkable::Ptr& checkable, const Downti
 
 void DbEvents::AddDowntimeByType(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime, bool historical)
 {
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime()));
 	fields1->Set("object_id", checkable);
 
@@ -496,7 +496,7 @@ void DbEvents::RemoveDowntimes(const Checkable::Ptr& checkable)
 	query1.Table = "scheduleddowntime";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatDowntime;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("object_id", checkable);
 	DbObject::OnQuery(query1);
 }
@@ -516,7 +516,7 @@ void DbEvents::RemoveDowntime(const Checkable::Ptr& checkable, const Downtime::P
 	query1.Table = "scheduleddowntime";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatDowntime;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("object_id", checkable);
 	query1.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId());
 	DbObject::OnQuery(query1);
@@ -530,13 +530,13 @@ void DbEvents::RemoveDowntime(const Checkable::Ptr& checkable, const Downtime::P
 	query3.Type = DbQueryUpdate;
 	query3.Category = DbCatDowntime;
 
-	Dictionary::Ptr fields3 = make_shared<Dictionary>();
+	Dictionary::Ptr fields3 = new Dictionary();
 	fields3->Set("was_cancelled", downtime->GetWasCancelled() ? 1 : 0);
 	fields3->Set("actual_end_time", DbValue::FromTimestamp(time_bag.first));
 	fields3->Set("actual_end_time_usec", time_bag.second);
 	query3.Fields = fields3;
 
-	query3.WhereCriteria = make_shared<Dictionary>();
+	query3.WhereCriteria = new Dictionary();
 	query3.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId());
 	query3.WhereCriteria->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime()));
 	query3.WhereCriteria->Set("scheduled_start_time", DbValue::FromTimestamp(downtime->GetStartTime()));
@@ -565,7 +565,7 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
 	query1.Type = DbQueryUpdate;
 	query1.Category = DbCatDowntime;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("was_started", 1);
 	fields1->Set("actual_start_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("actual_start_time_usec", time_bag.second);
@@ -573,7 +573,7 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
 	fields1->Set("trigger_time", DbValue::FromTimestamp(downtime->GetTriggerTime()));
 	fields1->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("object_id", checkable);
 	query1.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId());
 
@@ -586,7 +586,7 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
 	query3.Type = DbQueryUpdate;
 	query3.Category = DbCatDowntime;
 
-	Dictionary::Ptr fields3 = make_shared<Dictionary>();
+	Dictionary::Ptr fields3 = new Dictionary();
 	fields3->Set("was_started", 1);
 	fields3->Set("is_in_effect", 1);
 	fields3->Set("actual_start_time", DbValue::FromTimestamp(time_bag.first));
@@ -594,7 +594,7 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
 	fields3->Set("trigger_time", DbValue::FromTimestamp(downtime->GetTriggerTime()));
 	query3.Fields = fields3;
 
-	query3.WhereCriteria = make_shared<Dictionary>();
+	query3.WhereCriteria = new Dictionary();
 	query3.WhereCriteria->Set("internal_downtime_id", downtime->GetLegacyId());
 	query3.WhereCriteria->Set("entry_time", DbValue::FromTimestamp(downtime->GetEntryTime()));
 	query3.WhereCriteria->Set("scheduled_start_time", DbValue::FromTimestamp(downtime->GetStartTime()));
@@ -616,12 +616,12 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
 
 	query4.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields4 = make_shared<Dictionary>();
+	Dictionary::Ptr fields4 = new Dictionary();
 	fields4->Set("scheduled_downtime_depth", checkable->GetDowntimeDepth());
 
 	query4.Fields = fields4;
 
-	query4.WhereCriteria = make_shared<Dictionary>();
+	query4.WhereCriteria = new Dictionary();
 	if (service)
 		query4.WhereCriteria->Set("service_object_id", service);
 	else
@@ -653,7 +653,7 @@ void DbEvents::AddAcknowledgementHistory(const Checkable::Ptr& checkable, const
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("entry_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("entry_time_usec", time_bag.second);
 	fields1->Set("acknowledgement_type", type);
@@ -706,12 +706,12 @@ void DbEvents::AddAcknowledgementInternal(const Checkable::Ptr& checkable, Ackno
 	query1.Type = DbQueryUpdate;
 	query1.Category = DbCatAcknowledgement;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("acknowledgement_type", type);
 	fields1->Set("problem_has_been_acknowledged", add ? 1 : 0);
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	if (service)
 		query1.WhereCriteria->Set("service_object_id", service);
 	else
@@ -744,7 +744,7 @@ void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, con
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("notification_type", 1); /* service */
 	fields1->Set("notification_reason", CompatUtility::MapNotificationReasonType(type));
 	fields1->Set("object_id", checkable);
@@ -782,7 +782,7 @@ void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, con
 		Log(LogDebug, "DbEvents")
 		    << "add contact notification history for service '" << checkable->GetName() << "' and user '" << user->GetName() << "'.";
 
-		Dictionary::Ptr fields2 = make_shared<Dictionary>();
+		Dictionary::Ptr fields2 = new Dictionary();
 		fields2->Set("contact_object_id", user);
 		fields2->Set("start_time", DbValue::FromTimestamp(time_bag.first));
 		fields2->Set("start_time_usec", time_bag.second);
@@ -815,7 +815,7 @@ void DbEvents::AddStateChangeHistory(const Checkable::Ptr& checkable, const Chec
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("state_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("state_time_usec", time_bag.second);
 	fields1->Set("object_id", checkable);
@@ -1133,7 +1133,7 @@ void DbEvents::AddLogHistory(const Checkable::Ptr& checkable, String buffer, Log
 	query1.Type = DbQueryInsert;
 	query1.Category = DbCatLog;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("logentry_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("entry_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("entry_time_usec", time_bag.second);
@@ -1167,7 +1167,7 @@ void DbEvents::AddFlappingHistory(const Checkable::Ptr& checkable, FlappingState
 	query1.Type = DbQueryInsert;
 	query1.Category = DbCatFlapping;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 
 	fields1->Set("event_time", DbValue::FromTimestamp(time_bag.first));
 	fields1->Set("event_time_usec", time_bag.second);
@@ -1232,7 +1232,7 @@ void DbEvents::AddServiceCheckHistory(const Checkable::Ptr& checkable, const Che
 	query1.Type = DbQueryInsert;
 	query1.Category = DbCatCheck;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	double execution_time = Service::CalculateExecutionTime(cr);
 
 	fields1->Set("check_type", CompatUtility::GetCheckableCheckType(checkable));
@@ -1294,7 +1294,7 @@ void DbEvents::AddEventHandlerHistory(const Checkable::Ptr& checkable)
 	query1.Type = DbQueryInsert;
 	query1.Category = DbCatEventHandler;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 
 	Host::Ptr host;
 	Service::Ptr service;
@@ -1333,7 +1333,7 @@ void DbEvents::AddExternalCommandHistory(double time, const String& command, con
 	query1.Type = DbQueryInsert;
 	query1.Category = DbCatExternalCommand;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 
 	fields1->Set("entry_time", DbValue::FromTimestamp(static_cast<long>(time)));
 	fields1->Set("command_type", CompatUtility::MapExternalCommandType(command));
diff --git a/lib/db_ido/dbobject.cpp b/lib/db_ido/dbobject.cpp
index 181ac000d..28fbf8aee 100644
--- a/lib/db_ido/dbobject.cpp
+++ b/lib/db_ido/dbobject.cpp
@@ -40,7 +40,7 @@ boost::signals2::signal<void (const DbQuery&)> DbObject::OnQuery;
 
 INITIALIZE_ONCE(&DbObject::StaticInitialize);
 
-DbObject::DbObject(const shared_ptr<DbType>& type, const String& name1, const String& name2)
+DbObject::DbObject(const intrusive_ptr<DbType>& type, const String& name1, const String& name2)
 	: m_Name1(name1), m_Name2(name2), m_Type(type), m_LastConfigUpdate(0), m_LastStatusUpdate(0)
 { }
 
@@ -95,9 +95,9 @@ void DbObject::SendConfigUpdate(void)
 	query.Fields->Set(GetType()->GetIDColumn(), GetObject());
 	query.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 	query.Fields->Set("config_type", 1);
-	query.WhereCriteria = make_shared<Dictionary>();
+	query.WhereCriteria = new Dictionary();
 	query.WhereCriteria->Set(GetType()->GetIDColumn(), GetObject());
-	query.Object = GetSelf();
+	query.Object = this;
 	query.ConfigUpdate = true;
 	OnQuery(query);
 
@@ -139,9 +139,9 @@ void DbObject::SendStatusUpdate(void)
 	query.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
 	query.Fields->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
-	query.WhereCriteria = make_shared<Dictionary>();
+	query.WhereCriteria = new Dictionary();
 	query.WhereCriteria->Set(GetType()->GetIDColumn(), GetObject());
-	query.Object = GetSelf();
+	query.Object = this;
 	query.StatusUpdate = true;
 	OnQuery(query);
 
@@ -186,7 +186,7 @@ void DbObject::SendVarsConfigUpdate(void)
 			    << "object customvar key: '" << kv.first << "' value: '" << kv.second
 			    << "' overridden: " << overridden;
 
-			Dictionary::Ptr fields = make_shared<Dictionary>();
+			Dictionary::Ptr fields = new Dictionary();
 			fields->Set("varname", kv.first);
 			fields->Set("varvalue", value);
 			fields->Set("is_json", is_json);
@@ -241,7 +241,7 @@ void DbObject::SendVarsStatusUpdate(void)
 			    << "object customvar key: '" << kv.first << "' value: '" << kv.second
 			    << "' overridden: " << overridden;
 
-			Dictionary::Ptr fields = make_shared<Dictionary>();
+			Dictionary::Ptr fields = new Dictionary();
 			fields->Set("varname", kv.first);
 			fields->Set("varvalue", value);
 			fields->Set("is_json", is_json);
@@ -256,10 +256,10 @@ void DbObject::SendVarsStatusUpdate(void)
 			query.Category = DbCatState;
 			query.Fields = fields;
 
-			query.WhereCriteria = make_shared<Dictionary>();
+			query.WhereCriteria = new Dictionary();
 			query.WhereCriteria->Set("object_id", obj);
 			query.WhereCriteria->Set("varname", Convert::ToString(kv.first));
-			query.Object = GetSelf();
+			query.Object = this;
 
 			OnQuery(query);
 		}
diff --git a/lib/db_ido/dbobject.hpp b/lib/db_ido/dbobject.hpp
index 80f85bbd2..4b96e2a9b 100644
--- a/lib/db_ido/dbobject.hpp
+++ b/lib/db_ido/dbobject.hpp
@@ -70,7 +70,7 @@ public:
 
 	String GetName1(void) const;
 	String GetName2(void) const;
-	shared_ptr<DbType> GetType(void) const;
+	intrusive_ptr<DbType> GetType(void) const;
 
 	virtual Dictionary::Ptr GetConfigFields(void) const = 0;
 	virtual Dictionary::Ptr GetStatusFields(void) const = 0;
@@ -88,7 +88,7 @@ public:
 	double GetLastStatusUpdate(void) const;
 
 protected:
-	DbObject(const shared_ptr<DbType>& type, const String& name1, const String& name2);
+	DbObject(const intrusive_ptr<DbType>& type, const String& name1, const String& name2);
 
 	virtual bool IsStatusAttribute(const String& attribute) const;
 
@@ -98,7 +98,7 @@ protected:
 private:
 	String m_Name1;
 	String m_Name2;
-	shared_ptr<DbType> m_Type;
+	intrusive_ptr<DbType> m_Type;
 	DynamicObject::Ptr m_Object;
 	double m_LastConfigUpdate;
 	double m_LastStatusUpdate;
diff --git a/lib/db_ido/dbquery.hpp b/lib/db_ido/dbquery.hpp
index 4d5faa03a..e67add37c 100644
--- a/lib/db_ido/dbquery.hpp
+++ b/lib/db_ido/dbquery.hpp
@@ -66,8 +66,8 @@ struct I2_DB_IDO_API DbQuery
 	String IdColumn;
 	Dictionary::Ptr Fields;
 	Dictionary::Ptr WhereCriteria;
-	shared_ptr<DbObject> Object;
-	shared_ptr<CustomVarObject> NotificationObject;
+	intrusive_ptr<DbObject> Object;
+	intrusive_ptr<CustomVarObject> NotificationObject;
 	bool ConfigUpdate;
 	bool StatusUpdate;
 
@@ -81,3 +81,5 @@ struct I2_DB_IDO_API DbQuery
 }
 
 #endif /* DBQUERY_H */
+
+#include "db_ido/dbobject.hpp"
diff --git a/lib/db_ido/dbtype.cpp b/lib/db_ido/dbtype.cpp
index 2f197e618..f7d248032 100644
--- a/lib/db_ido/dbtype.cpp
+++ b/lib/db_ido/dbtype.cpp
@@ -92,7 +92,7 @@ DbObject::Ptr DbType::GetOrCreateObjectByName(const String& name1, const String&
 	if (it != m_Objects.end())
 		return it->second;
 
-	DbObject::Ptr dbobj = m_ObjectFactory(GetSelf(), name1, name2);
+	DbObject::Ptr dbobj = m_ObjectFactory(this, name1, name2);
 	m_Objects[std::make_pair(name1, name2)] = dbobj;
 
 	return dbobj;
diff --git a/lib/db_ido/dbtype.hpp b/lib/db_ido/dbtype.hpp
index fda97ffc7..9f7544a2f 100644
--- a/lib/db_ido/dbtype.hpp
+++ b/lib/db_ido/dbtype.hpp
@@ -41,9 +41,9 @@ class I2_DB_IDO_API DbType : public Object
 public:
 	DECLARE_PTR_TYPEDEFS(DbType);
 
-	typedef boost::function<shared_ptr<DbObject> (const shared_ptr<DbType>&, const String&, const String&)> ObjectFactory;
+	typedef boost::function<intrusive_ptr<DbObject> (const intrusive_ptr<DbType>&, const String&, const String&)> ObjectFactory;
 	typedef std::map<String, DbType::Ptr> TypeMap;
-	typedef std::map<std::pair<String, String>, shared_ptr<DbObject> > ObjectMap;
+	typedef std::map<std::pair<String, String>, intrusive_ptr<DbObject> > ObjectMap;
 
 	DbType(const String& table, long tid, const String& idcolumn, const ObjectFactory& factory);
 
@@ -57,7 +57,7 @@ public:
 	static DbType::Ptr GetByName(const String& name);
 	static DbType::Ptr GetByID(long tid);
 
-	shared_ptr<DbObject> GetOrCreateObjectByName(const String& name1, const String& name2);
+	intrusive_ptr<DbObject> GetOrCreateObjectByName(const String& name1, const String& name2);
 
 	static std::set<DbType::Ptr> GetAllTypes(void);
 
@@ -100,7 +100,7 @@ public:
 		dbtype = DbType::GetByID(tid);
 
 		if (!dbtype)
-			dbtype = make_shared<DbType>(table, tid, idcolumn, factory);
+			dbtype = new DbType(table, tid, idcolumn, factory);
 
 		DbType::RegisterType(name, dbtype);
 	}
@@ -112,9 +112,9 @@ public:
  * @ingroup ido
  */
 template<typename T>
-shared_ptr<T> DbObjectFactory(const DbType::Ptr& type, const String& name1, const String& name2)
+intrusive_ptr<T> DbObjectFactory(const DbType::Ptr& type, const String& name1, const String& name2)
 {
-	return make_shared<T>(type, name1, name2);
+	return new T(type, name1, name2);
 }
 
 #define REGISTER_DBTYPE(name, table, tid, idcolumn, type) \
diff --git a/lib/db_ido/dbvalue.cpp b/lib/db_ido/dbvalue.cpp
index a1b4242de..250873626 100644
--- a/lib/db_ido/dbvalue.cpp
+++ b/lib/db_ido/dbvalue.cpp
@@ -30,12 +30,12 @@ Value DbValue::FromTimestamp(const Value& ts)
 	if (ts.IsEmpty() || ts == 0)
 		return Empty;
 
-	return make_shared<DbValue>(DbValueTimestamp, ts);
+	return new DbValue(DbValueTimestamp, ts);
 }
 
 Value DbValue::FromTimestampNow(void)
 {
-	return make_shared<DbValue>(DbValueTimestampNow, Empty);
+	return new DbValue(DbValueTimestampNow, Empty);
 }
 
 Value DbValue::FromValue(const Value& value)
@@ -45,7 +45,7 @@ Value DbValue::FromValue(const Value& value)
 
 Value DbValue::FromObjectInsertID(const Value& value)
 {
-	return make_shared<DbValue>(DbValueObjectInsertID, value);
+	return new DbValue(DbValueObjectInsertID, value);
 }
 
 bool DbValue::IsTimestamp(const Value& value)
diff --git a/lib/db_ido/endpointdbobject.cpp b/lib/db_ido/endpointdbobject.cpp
index 39ec869b3..98d7e73b8 100644
--- a/lib/db_ido/endpointdbobject.cpp
+++ b/lib/db_ido/endpointdbobject.cpp
@@ -48,7 +48,7 @@ EndpointDbObject::EndpointDbObject(const DbType::Ptr& type, const String& name1,
 
 Dictionary::Ptr EndpointDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Endpoint::Ptr endpoint = static_pointer_cast<Endpoint>(GetObject());
 
 	fields->Set("identity", endpoint->GetName());
@@ -59,7 +59,7 @@ Dictionary::Ptr EndpointDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr EndpointDbObject::GetStatusFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Endpoint::Ptr endpoint = static_pointer_cast<Endpoint>(GetObject());
 
 	Log(LogDebug, "EndpointDbObject")
@@ -83,12 +83,12 @@ void EndpointDbObject::UpdateConnectedStatus(const Endpoint::Ptr& endpoint)
 	query1.Table = "endpointstatus";
 	query1.Type = DbQueryUpdate;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("is_connected", (connected ? 1 : 0));
 	fields1->Set("status_update_time", DbValue::FromTimestamp(Utility::GetTime()));
 	query1.Fields = fields1;
 
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("endpoint_object_id", endpoint);
 	query1.WhereCriteria->Set("instance_id", 0); /* DbConnection class fills in real ID */
 
@@ -115,7 +115,7 @@ void EndpointDbObject::OnConfigUpdate(void)
 	query1.Table = "endpointstatus";
 	query1.Type = DbQueryInsert;
 
-	Dictionary::Ptr fields1 = make_shared<Dictionary>();
+	Dictionary::Ptr fields1 = new Dictionary();
 	fields1->Set("identity", endpoint->GetName());
 	fields1->Set("node", IcingaApplication::GetInstance()->GetNodeName());
 	fields1->Set("is_connected", EndpointIsConnected(endpoint));
diff --git a/lib/db_ido/endpointdbobject.hpp b/lib/db_ido/endpointdbobject.hpp
index e11fe1b85..72458806b 100644
--- a/lib/db_ido/endpointdbobject.hpp
+++ b/lib/db_ido/endpointdbobject.hpp
@@ -37,7 +37,7 @@ class EndpointDbObject : public DbObject
 public:
 	DECLARE_PTR_TYPEDEFS(EndpointDbObject);
 
-	EndpointDbObject(const shared_ptr<DbType>& type, const String& name1, const String& name2);
+	EndpointDbObject(const intrusive_ptr<DbType>& type, const String& name1, const String& name2);
 
 	static void StaticInitialize(void);
 
diff --git a/lib/db_ido/hostdbobject.cpp b/lib/db_ido/hostdbobject.cpp
index fda26ae26..5b39ac7e1 100644
--- a/lib/db_ido/hostdbobject.cpp
+++ b/lib/db_ido/hostdbobject.cpp
@@ -43,7 +43,7 @@ HostDbObject::HostDbObject(const DbType::Ptr& type, const String& name1, const S
 
 Dictionary::Ptr HostDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Host::Ptr host = static_pointer_cast<Host>(GetObject());
 
 	fields->Set("alias", CompatUtility::GetHostAlias(host));
@@ -110,7 +110,7 @@ Dictionary::Ptr HostDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr HostDbObject::GetStatusFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Host::Ptr host = static_pointer_cast<Host>(GetObject());
 
 	CheckResult::Ptr cr = host->GetLastCheckResult();
@@ -188,7 +188,7 @@ void HostDbObject::OnConfigUpdate(void)
 		    << "host parents: " << parent->GetName();
 
 		/* parents: host_id, parent_host_object_id */
-		Dictionary::Ptr fields1 = make_shared<Dictionary>();
+		Dictionary::Ptr fields1 = new Dictionary();
 		fields1->Set(GetType()->GetTable() + "_id", DbValue::FromObjectInsertID(GetObject()));
 		fields1->Set("parent_host_object_id", parent);
 		fields1->Set("instance_id", 0); /* DbConnection class fills in real ID */
@@ -219,7 +219,7 @@ void HostDbObject::OnConfigUpdate(void)
 		Log(LogDebug, "HostDbObject")
 		    << "parent host: " << parent->GetName();
 
-		Dictionary::Ptr fields2 = make_shared<Dictionary>();
+		Dictionary::Ptr fields2 = new Dictionary();
 		fields2->Set("host_object_id", parent);
 		fields2->Set("dependent_host_object_id", host);
 		fields2->Set("inherits_parent", 1);
@@ -243,7 +243,7 @@ void HostDbObject::OnConfigUpdate(void)
 		Log(LogDebug, "HostDbObject")
 		    << "host contacts: " << user->GetName();
 
-		Dictionary::Ptr fields_contact = make_shared<Dictionary>();
+		Dictionary::Ptr fields_contact = new Dictionary();
 		fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));
 		fields_contact->Set("contact_object_id", user);
 		fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
@@ -263,7 +263,7 @@ void HostDbObject::OnConfigUpdate(void)
 		Log(LogDebug, "HostDbObject")
 		    << "host contactgroups: " << usergroup->GetName();
 
-		Dictionary::Ptr fields_contact = make_shared<Dictionary>();
+		Dictionary::Ptr fields_contact = new Dictionary();
 		fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));
 		fields_contact->Set("contactgroup_object_id", usergroup);
 		fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
diff --git a/lib/db_ido/hostgroupdbobject.cpp b/lib/db_ido/hostgroupdbobject.cpp
index b99fa89b0..ec861a4cd 100644
--- a/lib/db_ido/hostgroupdbobject.cpp
+++ b/lib/db_ido/hostgroupdbobject.cpp
@@ -35,7 +35,7 @@ HostGroupDbObject::HostGroupDbObject(const DbType::Ptr& type, const String& name
 
 Dictionary::Ptr HostGroupDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	HostGroup::Ptr group = static_pointer_cast<HostGroup>(GetObject());
 
 	fields->Set("alias", group->GetDisplayName());
@@ -60,7 +60,7 @@ void HostGroupDbObject::OnConfigUpdate(void)
 		query1.Table = DbType::GetByName("HostGroup")->GetTable() + "_members";
 		query1.Type = DbQueryInsert;
 		query1.Category = DbCatConfig;
-		query1.Fields = make_shared<Dictionary>();
+		query1.Fields = new Dictionary();
 		query1.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 		query1.Fields->Set("hostgroup_id", DbValue::FromObjectInsertID(group));
 		query1.Fields->Set("host_object_id", host);
diff --git a/lib/db_ido/servicedbobject.cpp b/lib/db_ido/servicedbobject.cpp
index 9a114fa71..d5ecfc711 100644
--- a/lib/db_ido/servicedbobject.cpp
+++ b/lib/db_ido/servicedbobject.cpp
@@ -48,7 +48,7 @@ ServiceDbObject::ServiceDbObject(const DbType::Ptr& type, const String& name1, c
 
 Dictionary::Ptr ServiceDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Service::Ptr service = static_pointer_cast<Service>(GetObject());
 	Host::Ptr host = service->GetHost();
 
@@ -106,7 +106,7 @@ Dictionary::Ptr ServiceDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr ServiceDbObject::GetStatusFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	Service::Ptr service = static_pointer_cast<Service>(GetObject());
 	CheckResult::Ptr cr = service->GetLastCheckResult();
 
@@ -195,7 +195,7 @@ void ServiceDbObject::OnConfigUpdate(void)
 		int state_filter = dep->GetStateFilter();
 
 		/* service dependencies */
-		Dictionary::Ptr fields1 = make_shared<Dictionary>();
+		Dictionary::Ptr fields1 = new Dictionary();
 		fields1->Set("service_object_id", parent);
 		fields1->Set("dependent_service_object_id", service);
 		fields1->Set("inherits_parent", 1);
@@ -222,7 +222,7 @@ void ServiceDbObject::OnConfigUpdate(void)
 		Log(LogDebug, "ServiceDbObject")
 		    << "service contacts: " << user->GetName();
 
-		Dictionary::Ptr fields_contact = make_shared<Dictionary>();
+		Dictionary::Ptr fields_contact = new Dictionary();
 		fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));
 		fields_contact->Set("contact_object_id", user);
 		fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
@@ -242,7 +242,7 @@ void ServiceDbObject::OnConfigUpdate(void)
 		Log(LogDebug, "ServiceDbObject")
 		    << "service contactgroups: " << usergroup->GetName();
 
-		Dictionary::Ptr fields_contact = make_shared<Dictionary>();
+		Dictionary::Ptr fields_contact = new Dictionary();
 		fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));
 		fields_contact->Set("contactgroup_object_id", usergroup);
 		fields_contact->Set("instance_id", 0); /* DbConnection class fills in real ID */
diff --git a/lib/db_ido/servicegroupdbobject.cpp b/lib/db_ido/servicegroupdbobject.cpp
index b2cd0673f..b970f1200 100644
--- a/lib/db_ido/servicegroupdbobject.cpp
+++ b/lib/db_ido/servicegroupdbobject.cpp
@@ -34,7 +34,7 @@ ServiceGroupDbObject::ServiceGroupDbObject(const DbType::Ptr& type, const String
 
 Dictionary::Ptr ServiceGroupDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	ServiceGroup::Ptr group = static_pointer_cast<ServiceGroup>(GetObject());
 
 	fields->Set("alias", group->GetDisplayName());
@@ -59,7 +59,7 @@ void ServiceGroupDbObject::OnConfigUpdate(void)
 		query1.Table = DbType::GetByName("ServiceGroup")->GetTable() + "_members";
 		query1.Type = DbQueryInsert;
 		query1.Category = DbCatConfig;
-		query1.Fields = make_shared<Dictionary>();
+		query1.Fields = new Dictionary();
 		query1.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 		query1.Fields->Set("servicegroup_id", DbValue::FromObjectInsertID(group));
 		query1.Fields->Set("service_object_id", service);
diff --git a/lib/db_ido/timeperioddbobject.cpp b/lib/db_ido/timeperioddbobject.cpp
index 810b38a84..cb762c10a 100644
--- a/lib/db_ido/timeperioddbobject.cpp
+++ b/lib/db_ido/timeperioddbobject.cpp
@@ -37,7 +37,7 @@ TimePeriodDbObject::TimePeriodDbObject(const DbType::Ptr& type, const String& na
 
 Dictionary::Ptr TimePeriodDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	TimePeriod::Ptr tp = static_pointer_cast<TimePeriod>(GetObject());
 
 	fields->Set("alias", tp->GetDisplayName());
@@ -58,7 +58,7 @@ void TimePeriodDbObject::OnConfigUpdate(void)
 	query_del1.Table = GetType()->GetTable() + "_timeranges";
 	query_del1.Type = DbQueryDelete;
 	query_del1.Category = DbCatConfig;
-	query_del1.WhereCriteria = make_shared<Dictionary>();
+	query_del1.WhereCriteria = new Dictionary();
 	query_del1.WhereCriteria->Set("timeperiod_id", DbValue::FromObjectInsertID(tp));
 	OnQuery(query_del1);
 
@@ -77,7 +77,7 @@ void TimePeriodDbObject::OnConfigUpdate(void)
 
 		tm reference = Utility::LocalTime(refts);
 
-		Array::Ptr segments = make_shared<Array>();
+		Array::Ptr segments = new Array();
 		LegacyTimePeriod::ProcessTimeRanges(kv.second, &reference, segments);
 
 		ObjectLock olock(segments);
@@ -90,7 +90,7 @@ void TimePeriodDbObject::OnConfigUpdate(void)
 			query.Table = GetType()->GetTable() + "_timeranges";
 			query.Type = DbQueryInsert;
 			query.Category = DbCatConfig;
-			query.Fields = make_shared<Dictionary>();
+			query.Fields = new Dictionary();
 			query.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 			query.Fields->Set("timeperiod_id", DbValue::FromObjectInsertID(tp));
 			query.Fields->Set("day", wday);
diff --git a/lib/db_ido/userdbobject.cpp b/lib/db_ido/userdbobject.cpp
index 4e7027983..4bbe2e659 100644
--- a/lib/db_ido/userdbobject.cpp
+++ b/lib/db_ido/userdbobject.cpp
@@ -37,7 +37,7 @@ UserDbObject::UserDbObject(const DbType::Ptr& type, const String& name1, const S
 
 Dictionary::Ptr UserDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	User::Ptr user = static_pointer_cast<User>(GetObject());
 
 	fields->Set("alias", user->GetDisplayName());
@@ -65,7 +65,7 @@ Dictionary::Ptr UserDbObject::GetConfigFields(void) const
 
 Dictionary::Ptr UserDbObject::GetStatusFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	User::Ptr user = static_pointer_cast<User>(GetObject());
 
 	fields->Set("host_notifications_enabled", user->GetEnableNotifications());
@@ -81,7 +81,7 @@ Dictionary::Ptr UserDbObject::GetStatusFields(void) const
 
 void UserDbObject::OnConfigUpdate(void)
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	User::Ptr user = static_pointer_cast<User>(GetObject());
 
 	/* contact addresses */
diff --git a/lib/db_ido/usergroupdbobject.cpp b/lib/db_ido/usergroupdbobject.cpp
index 7e993b076..c5c853afd 100644
--- a/lib/db_ido/usergroupdbobject.cpp
+++ b/lib/db_ido/usergroupdbobject.cpp
@@ -35,7 +35,7 @@ UserGroupDbObject::UserGroupDbObject(const DbType::Ptr& type, const String& name
 
 Dictionary::Ptr UserGroupDbObject::GetConfigFields(void) const
 {
-	Dictionary::Ptr fields = make_shared<Dictionary>();
+	Dictionary::Ptr fields = new Dictionary();
 	UserGroup::Ptr group = static_pointer_cast<UserGroup>(GetObject());
 
 	fields->Set("alias", group->GetDisplayName());
@@ -56,7 +56,7 @@ void UserGroupDbObject::OnConfigUpdate(void)
 	query1.Table = DbType::GetByName("UserGroup")->GetTable() + "_members";
 	query1.Type = DbQueryDelete;
 	query1.Category = DbCatConfig;
-	query1.WhereCriteria = make_shared<Dictionary>();
+	query1.WhereCriteria = new Dictionary();
 	query1.WhereCriteria->Set("instance_id", 0);
 	query1.WhereCriteria->Set("contactgroup_id", DbValue::FromObjectInsertID(group));
 	OnQuery(query1);
@@ -66,7 +66,7 @@ void UserGroupDbObject::OnConfigUpdate(void)
 		query2.Table = DbType::GetByName("UserGroup")->GetTable() + "_members";
 		query2.Type = DbQueryInsert;
 		query2.Category = DbCatConfig;
-		query2.Fields = make_shared<Dictionary>();
+		query2.Fields = new Dictionary();
 		query2.Fields->Set("instance_id", 0); /* DbConnection class fills in real ID */
 		query2.Fields->Set("contactgroup_id", DbValue::FromObjectInsertID(group));
 		query2.Fields->Set("contact_object_id", user);
diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp
index 733953b56..e7b90e870 100644
--- a/lib/db_ido_mysql/idomysqlconnection.cpp
+++ b/lib/db_ido_mysql/idomysqlconnection.cpp
@@ -41,19 +41,19 @@ REGISTER_STATSFUNCTION(IdoMysqlConnectionStats, &IdoMysqlConnection::StatsFunc);
 
 Value IdoMysqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const IdoMysqlConnection::Ptr& idomysqlconnection, DynamicType::GetObjectsByType<IdoMysqlConnection>()) {
 		size_t items = idomysqlconnection->m_QueryQueue.GetLength();
 
-		Dictionary::Ptr stats = make_shared<Dictionary>();
+		Dictionary::Ptr stats = new Dictionary();
 		stats->Set("version", SCHEMA_VERSION);
 		stats->Set("instance_name", idomysqlconnection->GetInstanceName());
 		stats->Set("query_queue_items", items);
 
 		nodes->Set(idomysqlconnection->GetName(), stats);
 
-		perfdata->Add(make_shared<PerfdataValue>("idomysqlconnection_" + idomysqlconnection->GetName() + "_query_queue_items", items));
+		perfdata->Add(new PerfdataValue("idomysqlconnection_" + idomysqlconnection->GetName() + "_query_queue_items", items));
 	}
 
 	status->Set("idomysqlconnection", nodes);
@@ -69,12 +69,12 @@ void IdoMysqlConnection::Resume(void)
 
 	m_QueryQueue.SetExceptionCallback(boost::bind(&IdoMysqlConnection::ExceptionHandler, this, _1));
 
-	m_TxTimer = make_shared<Timer>();
+	m_TxTimer = new Timer();
 	m_TxTimer->SetInterval(1);
 	m_TxTimer->OnTimerExpired.connect(boost::bind(&IdoMysqlConnection::TxTimerHandler, this));
 	m_TxTimer->Start();
 
-	m_ReconnectTimer = make_shared<Timer>();
+	m_ReconnectTimer = new Timer();
 	m_ReconnectTimer->SetInterval(10);
 	m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&IdoMysqlConnection::ReconnectTimerHandler, this));
 	m_ReconnectTimer->Start();
@@ -444,7 +444,7 @@ Dictionary::Ptr IdoMysqlConnection::FetchRow(const IdoMysqlResult& result)
 	if (!lengths)
 		return Dictionary::Ptr();
 
-	Dictionary::Ptr dict = make_shared<Dictionary>();
+	Dictionary::Ptr dict = new Dictionary();
 
 	mysql_field_seek(result.get(), 0);
 	for (field = mysql_fetch_field(result.get()), i = 0; field; field = mysql_fetch_field(result.get()), i++)
diff --git a/lib/db_ido_mysql/idomysqlconnection.hpp b/lib/db_ido_mysql/idomysqlconnection.hpp
index 5e383921e..6f7b81d8d 100644
--- a/lib/db_ido_mysql/idomysqlconnection.hpp
+++ b/lib/db_ido_mysql/idomysqlconnection.hpp
@@ -29,7 +29,7 @@
 namespace icinga
 {
 
-typedef shared_ptr<MYSQL_RES> IdoMysqlResult;
+typedef boost::shared_ptr<MYSQL_RES> IdoMysqlResult;
 
 /**
  * An IDO MySQL database connection.
diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp
index ad89aaed5..6a52fe862 100644
--- a/lib/db_ido_pgsql/idopgsqlconnection.cpp
+++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp
@@ -43,19 +43,19 @@ REGISTER_STATSFUNCTION(IdoPgsqlConnectionStats, &IdoPgsqlConnection::StatsFunc);
 
 Value IdoPgsqlConnection::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const IdoPgsqlConnection::Ptr& idopgsqlconnection, DynamicType::GetObjectsByType<IdoPgsqlConnection>()) {
 		size_t items = idopgsqlconnection->m_QueryQueue.GetLength();
 
-		Dictionary::Ptr stats = make_shared<Dictionary>();
+		Dictionary::Ptr stats = new Dictionary();
 		stats->Set("version", SCHEMA_VERSION);
 		stats->Set("instance_name", idopgsqlconnection->GetInstanceName());
 		stats->Set("query_queue_items", items);
 
 		nodes->Set(idopgsqlconnection->GetName(), stats);
 
-		perfdata->Add(make_shared<PerfdataValue>("idopgsqlconnection_" + idopgsqlconnection->GetName() + "_query_queue_items", items));
+		perfdata->Add(new PerfdataValue("idopgsqlconnection_" + idopgsqlconnection->GetName() + "_query_queue_items", items));
 	}
 
 	status->Set("idopgsqlconnection", nodes);
@@ -71,12 +71,12 @@ void IdoPgsqlConnection::Resume(void)
 
 	m_QueryQueue.SetExceptionCallback(boost::bind(&IdoPgsqlConnection::ExceptionHandler, this, _1));
 
-	m_TxTimer = make_shared<Timer>();
+	m_TxTimer = new Timer();
 	m_TxTimer->SetInterval(1);
 	m_TxTimer->OnTimerExpired.connect(boost::bind(&IdoPgsqlConnection::TxTimerHandler, this));
 	m_TxTimer->Start();
 
-	m_ReconnectTimer = make_shared<Timer>();
+	m_ReconnectTimer = new Timer();
 	m_ReconnectTimer->SetInterval(10);
 	m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&IdoPgsqlConnection::ReconnectTimerHandler, this));
 	m_ReconnectTimer->Start();
@@ -443,7 +443,7 @@ Dictionary::Ptr IdoPgsqlConnection::FetchRow(const IdoPgsqlResult& result, int r
 
 	int columns = PQnfields(result.get());
 
-	Dictionary::Ptr dict = make_shared<Dictionary>();
+	Dictionary::Ptr dict = new Dictionary();
 
 	for (int column = 0; column < columns; column++) {
 		Value value;
diff --git a/lib/db_ido_pgsql/idopgsqlconnection.hpp b/lib/db_ido_pgsql/idopgsqlconnection.hpp
index 00ed97198..ea9dbd62f 100644
--- a/lib/db_ido_pgsql/idopgsqlconnection.hpp
+++ b/lib/db_ido_pgsql/idopgsqlconnection.hpp
@@ -29,7 +29,7 @@
 namespace icinga
 {
 
-typedef shared_ptr<PGresult> IdoPgsqlResult;
+typedef boost::shared_ptr<PGresult> IdoPgsqlResult;
 
 /**
  * An IDO pgSQL database connection.
diff --git a/lib/demo/demo.cpp b/lib/demo/demo.cpp
index 5a82138a7..38b70f58e 100644
--- a/lib/demo/demo.cpp
+++ b/lib/demo/demo.cpp
@@ -36,7 +36,7 @@ void Demo::Start(void)
 {
 	DynamicObject::Start();
 
-	m_DemoTimer = make_shared<Timer>();
+	m_DemoTimer = new Timer();
 	m_DemoTimer->SetInterval(5);
 	m_DemoTimer->OnTimerExpired.connect(boost::bind(&Demo::DemoTimerHandler, this));
 	m_DemoTimer->Start();
@@ -47,7 +47,7 @@ void Demo::Start(void)
  */
 void Demo::DemoTimerHandler(void)
 {
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("method", "demo::HelloWorld");
 
 	ApiListener::Ptr listener = ApiListener::GetInstance();
diff --git a/lib/icinga/apievents.cpp b/lib/icinga/apievents.cpp
index d13276a5a..dc354199a 100644
--- a/lib/icinga/apievents.cpp
+++ b/lib/icinga/apievents.cpp
@@ -93,7 +93,7 @@ void ApiEvents::StaticInitialize(void)
 	Checkable::OnAcknowledgementSet.connect(&ApiEvents::AcknowledgementSetHandler);
 	Checkable::OnAcknowledgementCleared.connect(&ApiEvents::AcknowledgementClearedHandler);
 
-	l_RepositoryTimer = make_shared<Timer>();
+	l_RepositoryTimer = new Timer();
 	l_RepositoryTimer->SetInterval(30);
 	l_RepositoryTimer->OnTimerExpired.connect(boost::bind(&ApiEvents::RepositoryTimerHandler));
 	l_RepositoryTimer->Start();
@@ -107,7 +107,7 @@ void ApiEvents::CheckResultHandler(const Checkable::Ptr& checkable, const CheckR
 	if (!listener)
 		return;
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::CheckResult");
 
@@ -115,7 +115,7 @@ void ApiEvents::CheckResultHandler(const Checkable::Ptr& checkable, const CheckR
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
@@ -134,7 +134,7 @@ Value ApiEvents::CheckResultAPIHandler(const MessageOrigin& origin, const Dictio
 	if (!params)
 		return Empty;
 
-	CheckResult::Ptr cr = make_shared<CheckResult>();
+	CheckResult::Ptr cr = new CheckResult();
 
 	Dictionary::Ptr vcr = params->Get("cr");
 	Array::Ptr vperf = vcr->Get("performance_data");
@@ -142,7 +142,7 @@ Value ApiEvents::CheckResultAPIHandler(const MessageOrigin& origin, const Dictio
 
 	Deserialize(cr, params->Get("cr"), true);
 
-	Array::Ptr rperf = make_shared<Array>();
+	Array::Ptr rperf = new Array();
 
 	if (vperf) {
 		ObjectLock olock(vperf);
@@ -150,7 +150,7 @@ Value ApiEvents::CheckResultAPIHandler(const MessageOrigin& origin, const Dictio
 			Value p;
 
 			if (vp.IsObjectType<Dictionary>()) {
-				PerfdataValue::Ptr val = make_shared<PerfdataValue>();
+				PerfdataValue::Ptr val = new PerfdataValue();
 				Deserialize(val, vp, true);
 				rperf->Add(val);
 			} else
@@ -194,13 +194,13 @@ void ApiEvents::NextCheckChangedHandler(const Checkable::Ptr& checkable, double
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("next_check", nextCheck);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetNextCheck");
 	message->Set("params", params);
@@ -246,11 +246,11 @@ void ApiEvents::NextNotificationChangedHandler(const Notification::Ptr& notifica
 	if (!listener)
 		return;
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("notification", notification->GetName());
 	params->Set("next_notification", nextNotification);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetNextNotification");
 	message->Set("params", params);
@@ -290,13 +290,13 @@ void ApiEvents::ForceNextCheckChangedHandler(const Checkable::Ptr& checkable, bo
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("forced", forced);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetForceNextCheck");
 	message->Set("params", params);
@@ -346,13 +346,13 @@ void ApiEvents::ForceNextNotificationChangedHandler(const Checkable::Ptr& checka
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("forced", forced);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetForceNextNotification");
 	message->Set("params", params);
@@ -402,13 +402,13 @@ void ApiEvents::EnableActiveChecksChangedHandler(const Checkable::Ptr& checkable
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnableActiveChecks");
 	message->Set("params", params);
@@ -458,13 +458,13 @@ void ApiEvents::EnablePassiveChecksChangedHandler(const Checkable::Ptr& checkabl
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnablePassiveChecks");
 	message->Set("params", params);
@@ -514,13 +514,13 @@ void ApiEvents::EnableNotificationsChangedHandler(const Checkable::Ptr& checkabl
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnableNotifications");
 	message->Set("params", params);
@@ -570,13 +570,13 @@ void ApiEvents::EnableFlappingChangedHandler(const Checkable::Ptr& checkable, bo
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnableFlapping");
 	message->Set("params", params);
@@ -626,13 +626,13 @@ void ApiEvents::EnableEventHandlerChangedHandler(const Checkable::Ptr& checkable
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnableEventHandler");
 	message->Set("params", params);
@@ -682,13 +682,13 @@ void ApiEvents::EnablePerfdataChangedHandler(const Checkable::Ptr& checkable, bo
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("enabled", enabled);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEnablePerfdata");
 	message->Set("params", params);
@@ -738,13 +738,13 @@ void ApiEvents::CheckIntervalChangedHandler(const Checkable::Ptr& checkable, dou
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("interval", interval);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetCheckInterval");
 	message->Set("params", params);
@@ -794,13 +794,13 @@ void ApiEvents::RetryIntervalChangedHandler(const Checkable::Ptr& checkable, dou
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("interval", interval);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetRetryInterval");
 	message->Set("params", params);
@@ -850,13 +850,13 @@ void ApiEvents::MaxCheckAttemptsChangedHandler(const Checkable::Ptr& checkable,
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("attempts", attempts);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetMaxCheckAttempts");
 	message->Set("params", params);
@@ -906,13 +906,13 @@ void ApiEvents::EventCommandChangedHandler(const Checkable::Ptr& checkable, cons
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("command", command->GetName());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetEventCommand");
 	message->Set("params", params);
@@ -967,13 +967,13 @@ void ApiEvents::CheckCommandChangedHandler(const Checkable::Ptr& checkable, cons
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("command", command->GetName());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetCheckCommand");
 	message->Set("params", params);
@@ -1028,13 +1028,13 @@ void ApiEvents::CheckPeriodChangedHandler(const Checkable::Ptr& checkable, const
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("timeperiod", timeperiod->GetName());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetCheckPeriod");
 	message->Set("params", params);
@@ -1085,11 +1085,11 @@ void ApiEvents::VarsChangedHandler(const CustomVarObject::Ptr& object, const Dic
 	if (!listener)
 		return;
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("object", object->GetName());
 	params->Set("vars", Serialize(vars));
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetVars");
 	message->Set("params", params);
@@ -1151,13 +1151,13 @@ void ApiEvents::CommentAddedHandler(const Checkable::Ptr& checkable, const Comme
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("comment", Serialize(comment));
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::AddComment");
 	message->Set("params", params);
@@ -1191,7 +1191,7 @@ Value ApiEvents::CommentAddedAPIHandler(const MessageOrigin& origin, const Dicti
 	if (origin.FromZone && !origin.FromZone->CanAccessObject(checkable))
 		return Empty;
 
-	Comment::Ptr comment = make_shared<Comment>();
+	Comment::Ptr comment = new Comment();
 	Deserialize(comment, params->Get("comment"), true);
 
 	checkable->AddComment(comment->GetEntryType(), comment->GetAuthor(),
@@ -1211,13 +1211,13 @@ void ApiEvents::CommentRemovedHandler(const Checkable::Ptr& checkable, const Com
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("id", comment->GetId());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::RemoveComment");
 	message->Set("params", params);
@@ -1267,13 +1267,13 @@ void ApiEvents::DowntimeAddedHandler(const Checkable::Ptr& checkable, const Down
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("downtime", Serialize(downtime));
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::AddDowntime");
 	message->Set("params", params);
@@ -1307,7 +1307,7 @@ Value ApiEvents::DowntimeAddedAPIHandler(const MessageOrigin& origin, const Dict
 	if (origin.FromZone && !origin.FromZone->CanAccessObject(checkable))
 		return Empty;
 
-	Downtime::Ptr downtime = make_shared<Downtime>();
+	Downtime::Ptr downtime = new Downtime();
 	Deserialize(downtime, params->Get("downtime"), true);
 
 	checkable->AddDowntime(downtime->GetAuthor(), downtime->GetComment(),
@@ -1330,13 +1330,13 @@ void ApiEvents::DowntimeRemovedHandler(const Checkable::Ptr& checkable, const Do
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 	params->Set("id", downtime->GetId());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::RemoveDowntime");
 	message->Set("params", params);
@@ -1388,7 +1388,7 @@ void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable,
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
@@ -1397,7 +1397,7 @@ void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable,
 	params->Set("acktype", type);
 	params->Set("expiry", expiry);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::SetAcknowledgement");
 	message->Set("params", params);
@@ -1449,12 +1449,12 @@ void ApiEvents::AcknowledgementClearedHandler(const Checkable::Ptr& checkable, c
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("host", host->GetName());
 	if (service)
 		params->Set("service", service->GetShortName());
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::ClearAcknowledgement");
 	message->Set("params", params);
@@ -1500,10 +1500,10 @@ void ApiEvents::RepositoryTimerHandler(void)
 	if (!listener)
 		return;
 
-	Dictionary::Ptr repository = make_shared<Dictionary>();
+	Dictionary::Ptr repository = new Dictionary();
 
 	BOOST_FOREACH(const Host::Ptr& host, DynamicType::GetObjectsByType<Host>()) {
-		Array::Ptr services = make_shared<Array>();
+		Array::Ptr services = new Array();
 
 		BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
 			services->Add(service->GetShortName());
@@ -1521,7 +1521,7 @@ void ApiEvents::RepositoryTimerHandler(void)
 
 	Zone::Ptr my_zone = my_endpoint->GetZone();
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("seen", Utility::GetTime());
 	params->Set("endpoint", my_endpoint->GetName());
 
@@ -1532,7 +1532,7 @@ void ApiEvents::RepositoryTimerHandler(void)
 	params->Set("zone", my_zone->GetName());
 	params->Set("repository", repository);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::UpdateRepository");
 	message->Set("params", params);
@@ -1577,7 +1577,7 @@ Value ApiEvents::UpdateRepositoryAPIHandler(const MessageOrigin& origin, const D
 	if (!listener)
 		return Empty;
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "event::UpdateRepository");
 	message->Set("params", params);
diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp
index 1290c1b34..77c4cd465 100644
--- a/lib/icinga/checkable-check.cpp
+++ b/lib/icinga/checkable-check.cpp
@@ -66,7 +66,7 @@ void Checkable::SetCheckCommand(const CheckCommand::Ptr& command, const MessageO
 {
 	SetOverrideCheckCommand(command->GetName());
 
-	OnCheckCommandChanged(GetSelf(), command, origin);
+	OnCheckCommandChanged(this, command, origin);
 }
 
 TimePeriod::Ptr Checkable::GetCheckPeriod(void) const
@@ -85,7 +85,7 @@ void Checkable::SetCheckPeriod(const TimePeriod::Ptr& tp, const MessageOrigin& o
 {
 	SetOverrideCheckPeriod(tp->GetName());
 
-	OnCheckPeriodChanged(GetSelf(), tp, origin);
+	OnCheckPeriodChanged(this, tp, origin);
 }
 
 double Checkable::GetCheckInterval(void) const
@@ -100,7 +100,7 @@ void Checkable::SetCheckInterval(double interval, const MessageOrigin& origin)
 {
 	SetOverrideCheckInterval(interval);
 
-	OnCheckIntervalChanged(GetSelf(), interval, origin);
+	OnCheckIntervalChanged(this, interval, origin);
 }
 
 double Checkable::GetRetryInterval(void) const
@@ -115,7 +115,7 @@ void Checkable::SetRetryInterval(double interval, const MessageOrigin& origin)
 {
 	SetOverrideRetryInterval(interval);
 
-	OnRetryIntervalChanged(GetSelf(), interval, origin);
+	OnRetryIntervalChanged(this, interval, origin);
 }
 
 void Checkable::SetSchedulingOffset(long offset)
@@ -132,7 +132,7 @@ void Checkable::SetNextCheck(double nextCheck, const MessageOrigin& origin)
 {
 	SetNextCheckRaw(nextCheck);
 
-	OnNextCheckChanged(GetSelf(), nextCheck, origin);
+	OnNextCheckChanged(this, nextCheck, origin);
 }
 
 double Checkable::GetNextCheck(void)
@@ -186,7 +186,7 @@ void Checkable::SetEnableActiveChecks(bool enabled, const MessageOrigin& origin)
 {
 	SetOverrideEnableActiveChecks(enabled);
 
-	OnEnableActiveChecksChanged(GetSelf(), enabled, origin);
+	OnEnableActiveChecksChanged(this, enabled, origin);
 }
 
 bool Checkable::GetEnablePassiveChecks(void) const
@@ -201,7 +201,7 @@ void Checkable::SetEnablePassiveChecks(bool enabled, const MessageOrigin& origin
 {
 	SetOverrideEnablePassiveChecks(enabled);
 
-	OnEnablePassiveChecksChanged(GetSelf(), enabled, origin);
+	OnEnablePassiveChecksChanged(this, enabled, origin);
 }
 
 bool Checkable::GetForceNextCheck(void) const
@@ -213,7 +213,7 @@ void Checkable::SetForceNextCheck(bool forced, const MessageOrigin& origin)
 {
 	SetForceNextCheckRaw(forced);
 
-	OnForceNextCheckChanged(GetSelf(), forced, origin);
+	OnForceNextCheckChanged(this, forced, origin);
 }
 
 int Checkable::GetMaxCheckAttempts(void) const
@@ -228,7 +228,7 @@ void Checkable::SetMaxCheckAttempts(int attempts, const MessageOrigin& origin)
 {
 	SetOverrideMaxCheckAttempts(attempts);
 
-	OnMaxCheckAttemptsChanged(GetSelf(), attempts, origin);
+	OnMaxCheckAttemptsChanged(this, attempts, origin);
 }
 
 void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrigin& origin)
@@ -368,7 +368,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 
 	Host::Ptr host;
 	Service::Ptr service;
-	tie(host, service) = GetHostService(GetSelf());
+	tie(host, service) = GetHostService(this);
 
 	CheckableType checkable_type = CheckableHost;
 	if (service)
@@ -394,7 +394,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 	if (remove_acknowledgement_comments)
 		RemoveCommentsByType(CommentAcknowledgement);
 
-	Dictionary::Ptr vars_after = make_shared<Dictionary>();
+	Dictionary::Ptr vars_after = new Dictionary();
 	vars_after->Set("state", new_state);
 	vars_after->Set("state_type", GetStateType());
 	vars_after->Set("attempt", GetCheckAttempt());
@@ -424,20 +424,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 //	    << " threshold: " << GetFlappingThreshold()
 //	    << "% current: " + GetFlappingCurrent()) << "%.";
 
-	OnNewCheckResult(GetSelf(), cr, origin);
+	OnNewCheckResult(this, cr, origin);
 
 	/* signal status updates to for example db_ido */
-	OnStateChanged(GetSelf());
+	OnStateChanged(this);
 
 	String old_state_str = (service ? Service::StateToString(old_state) : Host::StateToString(Host::CalculateState(old_state)));
 	String new_state_str = (service ? Service::StateToString(new_state) : Host::StateToString(Host::CalculateState(new_state)));
 
 	if (hardChange) {
-		OnStateChange(GetSelf(), cr, StateTypeHard, origin);
+		OnStateChange(this, cr, StateTypeHard, origin);
 		Log(LogNotice, "Checkable")
 		    << "State Change: Checkable " << GetName() << " hard state change from " << old_state_str << " to " << new_state_str << " detected.";
 	} else if (stateChange) {
-		OnStateChange(GetSelf(), cr, StateTypeSoft, origin);
+		OnStateChange(this, cr, StateTypeSoft, origin);
 		Log(LogNotice, "Checkable")
 		    << "State Change: Checkable " << GetName() << " soft state change from " << old_state_str << " to " << new_state_str << " detected.";
 	}
@@ -446,22 +446,22 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 		ExecuteEventHandler();
 
 	if (send_downtime_notification)
-		OnNotificationsRequested(GetSelf(), in_downtime ? NotificationDowntimeStart : NotificationDowntimeEnd, cr, "", "");
+		OnNotificationsRequested(this, in_downtime ? NotificationDowntimeStart : NotificationDowntimeEnd, cr, "", "");
 
 	if (!was_flapping && is_flapping) {
-		OnNotificationsRequested(GetSelf(), NotificationFlappingStart, cr, "", "");
+		OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "");
 
 		Log(LogNotice, "Checkable")
 		    << "Flapping: Checkable " << GetName() << " started flapping (" << GetFlappingThreshold() << "% < " << GetFlappingCurrent() << "%).";
-		OnFlappingChanged(GetSelf(), FlappingStarted);
+		OnFlappingChanged(this, FlappingStarted);
 	} else if (was_flapping && !is_flapping) {
-		OnNotificationsRequested(GetSelf(), NotificationFlappingEnd, cr, "", "");
+		OnNotificationsRequested(this, NotificationFlappingEnd, cr, "", "");
 
 		Log(LogNotice, "Checkable")
 		    << "Flapping: Checkable " << GetName() << " stopped flapping (" << GetFlappingThreshold() << "% >= " << GetFlappingCurrent() << "%).";
-		OnFlappingChanged(GetSelf(), FlappingStopped);
+		OnFlappingChanged(this, FlappingStopped);
 	} else if (send_notification)
-		OnNotificationsRequested(GetSelf(), recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
+		OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
 }
 
 bool Checkable::IsCheckPending(void) const
@@ -498,14 +498,12 @@ void Checkable::ExecuteCheck(void)
 	double scheduled_start = GetNextCheck();
 	double before_check = Utility::GetTime();
 
-	Checkable::Ptr self = GetSelf();
-
-	CheckResult::Ptr result = make_shared<CheckResult>();
+	CheckResult::Ptr result = new CheckResult();
 
 	result->SetScheduleStart(scheduled_start);
 	result->SetExecutionStart(before_check);
 
-	GetCheckCommand()->Execute(GetSelf(), result);
+	GetCheckCommand()->Execute(this, result);
 }
 
 void Checkable::UpdateStatistics(const CheckResult::Ptr& cr, CheckableType type)
diff --git a/lib/icinga/checkable-comment.cpp b/lib/icinga/checkable-comment.cpp
index ae6497c79..7a94a6a42 100644
--- a/lib/icinga/checkable-comment.cpp
+++ b/lib/icinga/checkable-comment.cpp
@@ -30,7 +30,7 @@ using namespace icinga;
 static int l_NextCommentID = 1;
 static boost::mutex l_CommentMutex;
 static std::map<int, String> l_LegacyCommentsCache;
-static std::map<String, Checkable::WeakPtr> l_CommentsCache;
+static std::map<String, Checkable::Ptr> l_CommentsCache;
 static Timer::Ptr l_CommentsExpireTimer;
 
 boost::signals2::signal<void (const Checkable::Ptr&, const Comment::Ptr&, const MessageOrigin&)> Checkable::OnCommentAdded;
@@ -53,7 +53,7 @@ String Checkable::AddComment(CommentType entryType, const String& author,
 	else
 		uid = id;
 
-	Comment::Ptr comment = make_shared<Comment>();
+	Comment::Ptr comment = new Comment();
 	comment->SetId(uid);;
 	comment->SetEntryTime(Utility::GetTime());
 	comment->SetEntryType(entryType);
@@ -75,10 +75,10 @@ String Checkable::AddComment(CommentType entryType, const String& author,
 	{
 		boost::mutex::scoped_lock lock(l_CommentMutex);
 		l_LegacyCommentsCache[legacy_id] = uid;
-		l_CommentsCache[uid] = GetSelf();
+		l_CommentsCache[uid] = this;
 	}
 
-	OnCommentAdded(GetSelf(), comment, origin);
+	OnCommentAdded(this, comment, origin);
 
 	return uid;
 }
@@ -145,7 +145,7 @@ Checkable::Ptr Checkable::GetOwnerByCommentID(const String& id)
 {
 	boost::mutex::scoped_lock lock(l_CommentMutex);
 
-	return l_CommentsCache[id].lock();
+	return l_CommentsCache[id];
 }
 
 Comment::Ptr Checkable::GetCommentByID(const String& id)
@@ -184,7 +184,7 @@ void Checkable::AddCommentsToCache(void)
 			l_NextCommentID = legacy_id + 1;
 
 		l_LegacyCommentsCache[legacy_id] = kv.first;
-		l_CommentsCache[kv.first] = GetSelf();
+		l_CommentsCache[kv.first] = this;
 	}
 }
 
diff --git a/lib/icinga/checkable-downtime.cpp b/lib/icinga/checkable-downtime.cpp
index 6bb640aff..782c251db 100644
--- a/lib/icinga/checkable-downtime.cpp
+++ b/lib/icinga/checkable-downtime.cpp
@@ -31,7 +31,7 @@ using namespace icinga;
 static int l_NextDowntimeID = 1;
 static boost::mutex l_DowntimeMutex;
 static std::map<int, String> l_LegacyDowntimesCache;
-static std::map<String, Checkable::WeakPtr> l_DowntimesCache;
+static std::map<String, Checkable::Ptr> l_DowntimesCache;
 static Timer::Ptr l_DowntimesExpireTimer;
 
 boost::signals2::signal<void (const Checkable::Ptr&, const Downtime::Ptr&, const MessageOrigin&)> Checkable::OnDowntimeAdded;
@@ -59,7 +59,7 @@ String Checkable::AddDowntime(const String& author, const String& comment,
 	else
 		uid = id;
 
-	Downtime::Ptr downtime = make_shared<Downtime>();
+	Downtime::Ptr downtime = new Downtime();
 	downtime->SetId(uid);
 	downtime->SetEntryTime(Utility::GetTime());
 	downtime->SetAuthor(author);
@@ -101,7 +101,7 @@ String Checkable::AddDowntime(const String& author, const String& comment,
 	{
 		boost::mutex::scoped_lock lock(l_DowntimeMutex);
 		l_LegacyDowntimesCache[legacy_id] = uid;
-		l_DowntimesCache[uid] = GetSelf();
+		l_DowntimesCache[uid] = this;
 	}
 
 	Log(LogNotice, "Checkable")
@@ -109,7 +109,7 @@ String Checkable::AddDowntime(const String& author, const String& comment,
 	    << "' between '" << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", startTime)
 	    << "' and '" << Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", endTime) << "'.";
 
-	OnDowntimeAdded(GetSelf(), downtime, origin);
+	OnDowntimeAdded(this, downtime, origin);
 
 	return uid;
 }
@@ -223,7 +223,7 @@ String Checkable::GetDowntimeIDFromLegacyID(int id)
 Checkable::Ptr Checkable::GetOwnerByDowntimeID(const String& id)
 {
 	boost::mutex::scoped_lock lock(l_DowntimeMutex);
-	return l_DowntimesCache[id].lock();
+	return l_DowntimesCache[id];
 }
 
 Downtime::Ptr Checkable::GetDowntimeByID(const String& id)
@@ -243,7 +243,7 @@ Downtime::Ptr Checkable::GetDowntimeByID(const String& id)
 
 void Checkable::StartDowntimesExpiredTimer(void)
 {
-	l_DowntimesExpireTimer = make_shared<Timer>();
+	l_DowntimesExpireTimer = new Timer();
 	l_DowntimesExpireTimer->SetInterval(60);
 	l_DowntimesExpireTimer->OnTimerExpired.connect(boost::bind(&Checkable::DowntimesExpireTimerHandler));
 	l_DowntimesExpireTimer->Start();
@@ -270,7 +270,7 @@ void Checkable::AddDowntimesToCache(void)
 			l_NextDowntimeID = legacy_id + 1;
 
 		l_LegacyDowntimesCache[legacy_id] = kv.first;
-		l_DowntimesCache[kv.first] = GetSelf();
+		l_DowntimesCache[kv.first] = this;
 	}
 }
 
diff --git a/lib/icinga/checkable-event.cpp b/lib/icinga/checkable-event.cpp
index 8ac20823c..86e450ddf 100644
--- a/lib/icinga/checkable-event.cpp
+++ b/lib/icinga/checkable-event.cpp
@@ -41,7 +41,7 @@ void Checkable::SetEnableEventHandler(bool enabled, const MessageOrigin& origin)
 {
 	SetOverrideEnableEventHandler(enabled);
 
-	OnEnableEventHandlerChanged(GetSelf(), enabled, origin);
+	OnEnableEventHandlerChanged(this, enabled, origin);
 }
 
 EventCommand::Ptr Checkable::GetEventCommand(void) const
@@ -60,7 +60,7 @@ void Checkable::SetEventCommand(const EventCommand::Ptr& command, const MessageO
 {
 	SetOverrideEventCommand(command->GetName());
 
-	OnEventCommandChanged(GetSelf(), command, origin);
+	OnEventCommandChanged(this, command, origin);
 }
 
 void Checkable::ExecuteEventHandler(void)
@@ -78,7 +78,7 @@ void Checkable::ExecuteEventHandler(void)
 	Log(LogNotice, "Checkable")
 	    << "Executing event handler '" << ec->GetName() << "' for service '" << GetName() << "'";
 
-	ec->Execute(GetSelf());
+	ec->Execute(this);
 
-	OnEventCommandExecuted(GetSelf());
+	OnEventCommandExecuted(this);
 }
diff --git a/lib/icinga/checkable-flapping.cpp b/lib/icinga/checkable-flapping.cpp
index fe3de9364..d82c9b5c1 100644
--- a/lib/icinga/checkable-flapping.cpp
+++ b/lib/icinga/checkable-flapping.cpp
@@ -46,8 +46,8 @@ void Checkable::SetEnableFlapping(bool enabled, const MessageOrigin& origin)
 {
 	SetOverrideEnableFlapping(enabled);
 
-	OnFlappingChanged(GetSelf(), enabled ? FlappingEnabled : FlappingDisabled);
-	OnEnableFlappingChanged(GetSelf(), enabled, origin);
+	OnFlappingChanged(this, enabled ? FlappingEnabled : FlappingDisabled);
+	OnEnableFlappingChanged(this, enabled, origin);
 }
 
 void Checkable::UpdateFlappingStatus(bool stateChange)
diff --git a/lib/icinga/checkable-notification.cpp b/lib/icinga/checkable-notification.cpp
index cd255d843..84032f751 100644
--- a/lib/icinga/checkable-notification.cpp
+++ b/lib/icinga/checkable-notification.cpp
@@ -109,7 +109,7 @@ void Checkable::SetEnableNotifications(bool enabled, const MessageOrigin& origin
 {
 	SetOverrideEnableNotifications(enabled);
 
-	OnEnableNotificationsChanged(GetSelf(), enabled, origin);
+	OnEnableNotificationsChanged(this, enabled, origin);
 }
 
 bool Checkable::GetForceNextNotification(void) const
@@ -121,5 +121,5 @@ void Checkable::SetForceNextNotification(bool forced, const MessageOrigin& origi
 {
 	SetForceNextNotificationRaw(forced);
 
-	OnForceNextNotificationChanged(GetSelf(), forced, origin);
+	OnForceNextNotificationChanged(this, forced, origin);
 }
diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp
index 234d0582b..76a064911 100644
--- a/lib/icinga/checkable.cpp
+++ b/lib/icinga/checkable.cpp
@@ -90,7 +90,7 @@ void Checkable::AddGroup(const String& name)
 		return;
 
 	if (!groups)
-		groups = make_shared<Array>();
+		groups = new Array();
 
 	groups->Add(name);
 }
@@ -127,9 +127,9 @@ void Checkable::AcknowledgeProblem(const String& author, const String& comment,
 		SetAcknowledgementExpiry(expiry);
 	}
 
-	OnNotificationsRequested(GetSelf(), NotificationAcknowledgement, GetLastCheckResult(), author, comment);
+	OnNotificationsRequested(this, NotificationAcknowledgement, GetLastCheckResult(), author, comment);
 
-	OnAcknowledgementSet(GetSelf(), author, comment, type, expiry, origin);
+	OnAcknowledgementSet(this, author, comment, type, expiry, origin);
 }
 
 void Checkable::ClearAcknowledgement(const MessageOrigin& origin)
@@ -139,7 +139,7 @@ void Checkable::ClearAcknowledgement(const MessageOrigin& origin)
 	SetAcknowledgementRaw(AcknowledgementNone);
 	SetAcknowledgementExpiry(0);
 
-	OnAcknowledgementCleared(GetSelf(), origin);
+	OnAcknowledgementCleared(this, origin);
 }
 
 bool Checkable::GetEnablePerfdata(void) const
@@ -154,7 +154,7 @@ void Checkable::SetEnablePerfdata(bool enabled, const MessageOrigin& origin)
 {
 	SetOverrideEnablePerfdata(enabled);
 
-	OnEnablePerfdataChanged(GetSelf(), enabled, origin);
+	OnEnablePerfdataChanged(this, enabled, origin);
 }
 
 int Checkable::GetModifiedAttributes(void) const
@@ -209,22 +209,22 @@ void Checkable::SetModifiedAttributes(int flags, const MessageOrigin& origin)
 {
 	if ((flags & ModAttrNotificationsEnabled) == 0) {
 		SetOverrideEnableNotifications(Empty);
-		OnEnableNotificationsChanged(GetSelf(), GetEnableNotifications(), origin);
+		OnEnableNotificationsChanged(this, GetEnableNotifications(), origin);
 	}
 
 	if ((flags & ModAttrActiveChecksEnabled) == 0) {
 		SetOverrideEnableActiveChecks(Empty);
-		OnEnableActiveChecksChanged(GetSelf(), GetEnableActiveChecks(), origin);
+		OnEnableActiveChecksChanged(this, GetEnableActiveChecks(), origin);
 	}
 
 	if ((flags & ModAttrPassiveChecksEnabled) == 0) {
 		SetOverrideEnablePassiveChecks(Empty);
-		OnEnablePassiveChecksChanged(GetSelf(), GetEnablePassiveChecks(), origin);
+		OnEnablePassiveChecksChanged(this, GetEnablePassiveChecks(), origin);
 	}
 
 	if ((flags & ModAttrFlapDetectionEnabled) == 0) {
 		SetOverrideEnableFlapping(Empty);
-		OnEnableFlappingChanged(GetSelf(), GetEnableFlapping(), origin);
+		OnEnableFlappingChanged(this, GetEnableFlapping(), origin);
 	}
 
 	if ((flags & ModAttrEventHandlerEnabled) == 0)
@@ -232,7 +232,7 @@ void Checkable::SetModifiedAttributes(int flags, const MessageOrigin& origin)
 
 	if ((flags & ModAttrPerformanceDataEnabled) == 0) {
 		SetOverrideEnablePerfdata(Empty);
-		OnEnablePerfdataChanged(GetSelf(), GetEnablePerfdata(), origin);
+		OnEnablePerfdataChanged(this, GetEnablePerfdata(), origin);
 	}
 
 	if ((flags & ModAttrNormalCheckInterval) == 0)
@@ -255,6 +255,6 @@ void Checkable::SetModifiedAttributes(int flags, const MessageOrigin& origin)
 
 	if ((flags & ModAttrCustomVariable) == 0) {
 		SetOverrideVars(Empty);
-		OnVarsChanged(GetSelf(), GetVars(), origin);
+		OnVarsChanged(this, GetVars(), origin);
 	}
 }
diff --git a/lib/icinga/checkable.hpp b/lib/icinga/checkable.hpp
index cc36c4331..99d6c90d6 100644
--- a/lib/icinga/checkable.hpp
+++ b/lib/icinga/checkable.hpp
@@ -89,7 +89,7 @@ public:
 
 	//bool IsHostCheck(void) const;
 
-	bool IsReachable(DependencyType dt = DependencyState, shared_ptr<Dependency> *failedDependency = NULL, int rstack = 0) const;
+	bool IsReachable(DependencyType dt = DependencyState, intrusive_ptr<Dependency> *failedDependency = NULL, int rstack = 0) const;
 
 	AcknowledgementType GetAcknowledgement(void);
 
@@ -97,8 +97,8 @@ public:
 	void ClearAcknowledgement(const MessageOrigin& origin = MessageOrigin());
 
 	/* Checks */
-	shared_ptr<CheckCommand> GetCheckCommand(void) const;
-	void SetCheckCommand(const shared_ptr<CheckCommand>& command, const MessageOrigin& origin = MessageOrigin());
+	intrusive_ptr<CheckCommand> GetCheckCommand(void) const;
+	void SetCheckCommand(const intrusive_ptr<CheckCommand>& command, const MessageOrigin& origin = MessageOrigin());
 
 	TimePeriod::Ptr GetCheckPeriod(void) const;
 	void SetCheckPeriod(const TimePeriod::Ptr& tp, const MessageOrigin& origin = MessageOrigin());
@@ -158,8 +158,8 @@ public:
 	static boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> OnCheckIntervalChanged;
 	static boost::signals2::signal<void (const Checkable::Ptr&, double, const MessageOrigin&)> OnRetryIntervalChanged;
 	static boost::signals2::signal<void (const Checkable::Ptr&, int, const MessageOrigin&)> OnMaxCheckAttemptsChanged;
-	static boost::signals2::signal<void (const Checkable::Ptr&, const shared_ptr<EventCommand>&, const MessageOrigin&)> OnEventCommandChanged;
-	static boost::signals2::signal<void (const Checkable::Ptr&, const shared_ptr<CheckCommand>&, const MessageOrigin&)> OnCheckCommandChanged;
+	static boost::signals2::signal<void (const Checkable::Ptr&, const intrusive_ptr<EventCommand>&, const MessageOrigin&)> OnEventCommandChanged;
+	static boost::signals2::signal<void (const Checkable::Ptr&, const intrusive_ptr<CheckCommand>&, const MessageOrigin&)> OnCheckCommandChanged;
 	static boost::signals2::signal<void (const Checkable::Ptr&, const TimePeriod::Ptr&, const MessageOrigin&)> OnCheckPeriodChanged;
 
 	static boost::signals2::signal<void (const Checkable::Ptr&, const CheckResult::Ptr&, const MessageOrigin&)> OnNewCheckResult;
@@ -243,8 +243,8 @@ public:
 	/* Event Handler */
 	void ExecuteEventHandler(void);
 
-	shared_ptr<EventCommand> GetEventCommand(void) const;
-	void SetEventCommand(const shared_ptr<EventCommand>& command, const MessageOrigin& origin = MessageOrigin());
+	intrusive_ptr<EventCommand> GetEventCommand(void) const;
+	void SetEventCommand(const intrusive_ptr<EventCommand>& command, const MessageOrigin& origin = MessageOrigin());
 
 	bool GetEnableEventHandler(void) const;
 	void SetEnableEventHandler(bool enabled, const MessageOrigin& origin = MessageOrigin());
@@ -263,13 +263,13 @@ public:
 	void SetEnablePerfdata(bool enabled, const MessageOrigin& origin = MessageOrigin());
 
 	/* Dependencies */
-	void AddDependency(const shared_ptr<Dependency>& dep);
-	void RemoveDependency(const shared_ptr<Dependency>& dep);
-	std::set<shared_ptr<Dependency> > GetDependencies(void) const;
+	void AddDependency(const intrusive_ptr<Dependency>& dep);
+	void RemoveDependency(const intrusive_ptr<Dependency>& dep);
+	std::set<intrusive_ptr<Dependency> > GetDependencies(void) const;
 
-	void AddReverseDependency(const shared_ptr<Dependency>& dep);
-	void RemoveReverseDependency(const shared_ptr<Dependency>& dep);
-	std::set<shared_ptr<Dependency> > GetReverseDependencies(void) const;
+	void AddReverseDependency(const intrusive_ptr<Dependency>& dep);
+	void RemoveReverseDependency(const intrusive_ptr<Dependency>& dep);
+	std::set<intrusive_ptr<Dependency> > GetReverseDependencies(void) const;
 
 protected:
 	virtual void Start(void);
@@ -297,10 +297,12 @@ private:
 
 	/* Dependencies */
 	mutable boost::mutex m_DependencyMutex;
-	std::set<shared_ptr<Dependency> > m_Dependencies;
-	std::set<shared_ptr<Dependency> > m_ReverseDependencies;
+	std::set<intrusive_ptr<Dependency> > m_Dependencies;
+	std::set<intrusive_ptr<Dependency> > m_ReverseDependencies;
 };
 
 }
 
 #endif /* CHECKABLE_H */
+
+#include "icinga/dependency.hpp"
diff --git a/lib/icinga/checkable.ti b/lib/icinga/checkable.ti
index feee1f43d..65d420094 100644
--- a/lib/icinga/checkable.ti
+++ b/lib/icinga/checkable.ti
@@ -41,7 +41,7 @@ enum AcknowledgementType
 abstract class Checkable : CustomVarObject
 {
 	[config] Array::Ptr groups {
-		default {{{ return make_shared<Array>(); }}}
+		default {{{ return new Array(); }}}
 	};
 	[config, protected] String check_command (CheckCommandRaw);
 	[config] int max_check_attempts (MaxCheckAttemptsRaw) {
@@ -125,10 +125,10 @@ abstract class Checkable : CustomVarObject
 	};
 	[state] double acknowledgement_expiry;
 	[state] Dictionary::Ptr comments {
-		default {{{ return make_shared<Dictionary>(); }}}
+		default {{{ return new Dictionary(); }}}
 	};
 	[state] Dictionary::Ptr downtimes {
-		default {{{ return make_shared<Dictionary>(); }}}
+		default {{{ return new Dictionary(); }}}
 	};
 	[state] bool force_next_notification (ForceNextNotificationRaw);
 	[state] int flapping_positive;
diff --git a/lib/icinga/cib.cpp b/lib/icinga/cib.cpp
index 245734a1d..38e1530b7 100644
--- a/lib/icinga/cib.cpp
+++ b/lib/icinga/cib.cpp
@@ -240,8 +240,8 @@ HostStatistics CIB::CalculateHostStats(void)
  */
 std::pair<Dictionary::Ptr, Array::Ptr> CIB::GetFeatureStats(void)
 {
-	Dictionary::Ptr status = make_shared<Dictionary>();
-	Array::Ptr perfdata = make_shared<Array>();
+	Dictionary::Ptr status = new Dictionary();
+	Array::Ptr perfdata = new Array();
 
 	String name;
 	Value ret;
diff --git a/lib/icinga/command.cpp b/lib/icinga/command.cpp
index ab0c72c48..4056c9037 100644
--- a/lib/icinga/command.cpp
+++ b/lib/icinga/command.cpp
@@ -40,7 +40,7 @@ void Command::SetModifiedAttributes(int flags, const MessageOrigin& origin)
 {
 	if ((flags & ModAttrCustomVariable) == 0) {
 		SetOverrideVars(Empty);
-		OnVarsChanged(GetSelf(), GetVars(), origin);
+		OnVarsChanged(this, GetVars(), origin);
 	}
 }
 
diff --git a/lib/icinga/compatutility.cpp b/lib/icinga/compatutility.cpp
index 19a951dd7..4e8ccd29b 100644
--- a/lib/icinga/compatutility.cpp
+++ b/lib/icinga/compatutility.cpp
@@ -115,7 +115,7 @@ String CompatUtility::GetCheckableCommandArgs(const Checkable::Ptr& checkable)
 {
 	CheckCommand::Ptr command = checkable->GetCheckCommand();
 
-	Dictionary::Ptr args = make_shared<Dictionary>();
+	Dictionary::Ptr args = new Dictionary();
 
 	if (command) {
 		Host::Ptr host;
@@ -387,7 +387,7 @@ Dictionary::Ptr CompatUtility::GetCustomAttributeConfig(const CustomVarObject::P
 {
 	Dictionary::Ptr vars = object->GetVars();
 
-	Dictionary::Ptr varsvars = make_shared<Dictionary>();
+	Dictionary::Ptr varsvars = new Dictionary();
 
 	if (!vars)
 		return Dictionary::Ptr();
@@ -418,7 +418,7 @@ String CompatUtility::GetCustomAttributeConfig(const CustomVarObject::Ptr& objec
 
 Array::Ptr CompatUtility::GetModifiedAttributesList(const CustomVarObject::Ptr& object)
 {
-	Array::Ptr mod_attr_list = make_shared<Array>();
+	Array::Ptr mod_attr_list = new Array();
 
 	if (object->GetType() != DynamicType::GetByName("Host") &&
 	    object->GetType() != DynamicType::GetByName("Service") &&
diff --git a/lib/icinga/customvarobject.cpp b/lib/icinga/customvarobject.cpp
index 8687af256..9b0424a74 100644
--- a/lib/icinga/customvarobject.cpp
+++ b/lib/icinga/customvarobject.cpp
@@ -38,7 +38,7 @@ void CustomVarObject::SetVars(const Dictionary::Ptr& vars, const MessageOrigin&
 {
 	SetOverrideVars(vars);
 
-	OnVarsChanged(GetSelf(), vars, origin);
+	OnVarsChanged(this, vars, origin);
 }
 
 int CustomVarObject::GetModifiedAttributes(void) const
diff --git a/lib/icinga/dependency-apply.cpp b/lib/icinga/dependency-apply.cpp
index 097f64ebf..ed5756afc 100644
--- a/lib/icinga/dependency-apply.cpp
+++ b/lib/icinga/dependency-apply.cpp
@@ -49,7 +49,7 @@ void Dependency::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable, c
 	Log(LogDebug, "Dependency")
 		<< "Applying dependency '" << name << "' to object '" << checkable->GetName() << "' for rule " << di;
 
-	ConfigItemBuilder::Ptr builder = make_shared<ConfigItemBuilder>(di);
+	ConfigItemBuilder::Ptr builder = new ConfigItemBuilder(di);
 	builder->SetType("Dependency");
 	builder->SetName(name);
 	builder->SetScope(locals);
@@ -58,18 +58,18 @@ void Dependency::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable, c
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("parent_host_name")), OpSetLiteral),
 	    MakeLiteral(host->GetName()),
 	    di));
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("child_host_name")), OpSetLiteral),
 	    MakeLiteral(host->GetName()),
 	    di));
 
 	if (service) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("child_service_name")), OpSetLiteral),
 		    MakeLiteral(service->GetShortName()),
 		    di));
@@ -78,7 +78,7 @@ void Dependency::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable, c
 	String zone = checkable->GetZone();
 
 	if (!zone.IsEmpty()) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("zone")), OpSetLiteral),
 		    MakeLiteral(zone),
 		    di));
@@ -104,7 +104,7 @@ bool Dependency::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, const App
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 	if (service)
@@ -118,7 +118,7 @@ bool Dependency::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, const App
 	if (rule.GetFTerm()) {
 		vinstances = rule.GetFTerm()->Evaluate(locals);
 	} else {
-		Array::Ptr instances = make_shared<Array>();
+		Array::Ptr instances = new Array();
 		instances->Add("");
 		vinstances = instances;
 	}
diff --git a/lib/icinga/dependency.cpp b/lib/icinga/dependency.cpp
index 842d7ec52..55fbcc9d5 100644
--- a/lib/icinga/dependency.cpp
+++ b/lib/icinga/dependency.cpp
@@ -82,7 +82,7 @@ void Dependency::OnStateLoaded(void)
 		Log(LogWarning, "Dependency")
 		    << "Dependency '" << GetName() << "' references an invalid child object and will be ignored.";
 	else
-		m_Child->AddDependency(GetSelf());
+		m_Child->AddDependency(this);
 
 	Host::Ptr parentHost = Host::GetByName(GetParentHostName());
 
@@ -102,7 +102,7 @@ void Dependency::OnStateLoaded(void)
 		Log(LogWarning, "Dependency")
 		    << "Dependency '" << GetName() << "' references an invalid parent object and will always fail.";
 	else
-		m_Parent->AddReverseDependency(GetSelf());
+		m_Parent->AddReverseDependency(this);
 }
 
 void Dependency::Stop(void)
@@ -110,10 +110,10 @@ void Dependency::Stop(void)
 	DynamicObject::Stop();
 
 	if (GetChild())
-		GetChild()->RemoveDependency(GetSelf());
+		GetChild()->RemoveDependency(this);
 
 	if (GetParent())
-		GetParent()->RemoveReverseDependency(GetSelf());
+		GetParent()->RemoveReverseDependency(this);
 }
 
 bool Dependency::IsAvailable(DependencyType dt) const
diff --git a/lib/icinga/dependency.hpp b/lib/icinga/dependency.hpp
index d9c22e64a..b35b2b07b 100644
--- a/lib/icinga/dependency.hpp
+++ b/lib/icinga/dependency.hpp
@@ -40,8 +40,8 @@ public:
 	DECLARE_OBJECT(Dependency);
 	DECLARE_OBJECTNAME(Dependency);
 
-	shared_ptr<Checkable> GetParent(void) const;
-	shared_ptr<Checkable> GetChild(void) const;
+	intrusive_ptr<Checkable> GetParent(void) const;
+	intrusive_ptr<Checkable> GetChild(void) const;
 
 	TimePeriod::Ptr GetPeriod(void) const;
 
diff --git a/lib/icinga/downtime.ti b/lib/icinga/downtime.ti
index 5f18cee0e..66b07b29c 100644
--- a/lib/icinga/downtime.ti
+++ b/lib/icinga/downtime.ti
@@ -35,7 +35,7 @@ class Downtime
 	[state] String triggered_by;
 	[state] String scheduled_by;
 	[state] Dictionary::Ptr triggers {
-		default {{{ return make_shared<Dictionary>(); }}}
+		default {{{ return new Dictionary(); }}}
 	};
 	[state] int legacy_id;
 	[state] bool was_cancelled;
diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp
index 06b5acebe..5a6460d17 100644
--- a/lib/icinga/externalcommandprocessor.cpp
+++ b/lib/icinga/externalcommandprocessor.cpp
@@ -91,7 +91,7 @@ static void RegisterCommand(const String& command, const ExternalCommandCallback
 	eci.MaxArgs = (maxArgs == UINT_MAX) ? minArgs : maxArgs;
 	GetCommands()[command] = eci;
 
-	ApiFunction::Ptr afunc = make_shared<ApiFunction>(boost::bind(&ExternalCommandAPIWrapper, command, _2));
+	ApiFunction::Ptr afunc = new ApiFunction(boost::bind(&ExternalCommandAPIWrapper, command, _2));
 	ApiFunction::Register("extcmd::" + command, afunc);
 }
 
@@ -303,7 +303,7 @@ void ExternalCommandProcessor::ProcessHostCheckResult(double time, const std::ve
 		BOOST_THROW_EXCEPTION(std::invalid_argument("Got passive check result for host '" + arguments[0] + "' which has passive checks disabled."));
 
 	int exitStatus = Convert::ToDouble(arguments[1]);
-	CheckResult::Ptr result = make_shared<CheckResult>();
+	CheckResult::Ptr result = new CheckResult();
 	std::pair<String, String> co = PluginUtility::ParseCheckOutput(arguments[2]);
 	result->SetOutput(co.first);
 	result->SetPerformanceData(PluginUtility::SplitPerfdata(co.second));
@@ -351,7 +351,7 @@ void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std:
 		BOOST_THROW_EXCEPTION(std::invalid_argument("Got passive check result for service '" + arguments[1] + "' which has passive checks disabled."));
 
 	int exitStatus = Convert::ToDouble(arguments[2]);
-	CheckResult::Ptr result = make_shared<CheckResult>();
+	CheckResult::Ptr result = new CheckResult();
 	std::pair<String, String> co = PluginUtility::ParseCheckOutput(arguments[3]);
 	result->SetOutput(co.first);
 	result->SetPerformanceData(PluginUtility::SplitPerfdata(co.second));
diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp
index 8e3940519..84a61a6b5 100644
--- a/lib/icinga/host.cpp
+++ b/lib/icinga/host.cpp
@@ -49,7 +49,7 @@ void Host::OnConfigLoaded(void)
 			HostGroup::Ptr hg = HostGroup::GetByName(name);
 
 			if (hg)
-				hg->ResolveGroupMembership(GetSelf(), true);
+				hg->ResolveGroupMembership(this, true);
 		}
 	}
 }
@@ -67,7 +67,7 @@ void Host::Stop(void)
 			HostGroup::Ptr hg = HostGroup::GetByName(name);
 
 			if (hg)
-				hg->ResolveGroupMembership(GetSelf(), false);
+				hg->ResolveGroupMembership(this, false);
 		}
 	}
 
diff --git a/lib/icinga/host.hpp b/lib/icinga/host.hpp
index 1754debe6..82800dfaf 100644
--- a/lib/icinga/host.hpp
+++ b/lib/icinga/host.hpp
@@ -41,11 +41,11 @@ public:
 	DECLARE_OBJECT(Host);
 	DECLARE_OBJECTNAME(Host);
 
-	shared_ptr<Service> GetServiceByShortName(const Value& name);
+	intrusive_ptr<Service> GetServiceByShortName(const Value& name);
 
-	std::set<shared_ptr<Service> > GetServices(void) const;
-	void AddService(const shared_ptr<Service>& service);
-	void RemoveService(const shared_ptr<Service>& service);
+	std::set<intrusive_ptr<Service> > GetServices(void) const;
+	void AddService(const intrusive_ptr<Service>& service);
+	void RemoveService(const intrusive_ptr<Service>& service);
 
 	int GetTotalServices(void) const;
 
@@ -72,7 +72,7 @@ protected:
 
 private:
 	mutable boost::mutex m_ServicesMutex;
-	std::map<String, shared_ptr<Service> > m_Services;
+	std::map<String, intrusive_ptr<Service> > m_Services;
 
 	static void RefreshServicesCache(void);
 };
@@ -80,3 +80,5 @@ private:
 }
 
 #endif /* HOST_H */
+
+#include "icinga/service.hpp"
diff --git a/lib/icinga/hostgroup.cpp b/lib/icinga/hostgroup.cpp
index 312378df6..05c63275a 100644
--- a/lib/icinga/hostgroup.cpp
+++ b/lib/icinga/hostgroup.cpp
@@ -45,7 +45,7 @@ bool HostGroup::EvaluateObjectRuleOne(const Host::Ptr& host, const ObjectRule& r
 	msgbuf << "Evaluating 'object' rule (" << di << ")";
 	CONTEXT(msgbuf.str());
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 
diff --git a/lib/icinga/icingaapplication.cpp b/lib/icinga/icingaapplication.cpp
index 6ecb1e146..b52404d92 100644
--- a/lib/icinga/icingaapplication.cpp
+++ b/lib/icinga/icingaapplication.cpp
@@ -65,10 +65,10 @@ REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);
 
 Value IcingaApplication::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const IcingaApplication::Ptr& icingaapplication, DynamicType::GetObjectsByType<IcingaApplication>()) {
-		Dictionary::Ptr stats = make_shared<Dictionary>();
+		Dictionary::Ptr stats = new Dictionary();
 		stats->Set("node_name", icingaapplication->GetNodeName());
 		stats->Set("enable_notifications", icingaapplication->GetEnableNotifications());
 		stats->Set("enable_event_handlers", icingaapplication->GetEnableEventHandlers());
@@ -98,7 +98,7 @@ int IcingaApplication::Main(void)
 	Log(LogDebug, "IcingaApplication", "In IcingaApplication::Main()");
 
 	/* periodically dump the program state */
-	l_RetentionTimer = make_shared<Timer>();
+	l_RetentionTimer = new Timer();
 	l_RetentionTimer->SetInterval(300);
 	l_RetentionTimer->OnTimerExpired.connect(boost::bind(&IcingaApplication::DumpProgramState, this));
 	l_RetentionTimer->Start();
diff --git a/lib/icinga/icingastatuswriter.cpp b/lib/icinga/icingastatuswriter.cpp
index 9f10b7d79..0c1d0d0ac 100644
--- a/lib/icinga/icingastatuswriter.cpp
+++ b/lib/icinga/icingastatuswriter.cpp
@@ -37,7 +37,7 @@ REGISTER_STATSFUNCTION(IcingaStatusWriterStats, &IcingaStatusWriter::StatsFunc);
 
 Value IcingaStatusWriter::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const IcingaStatusWriter::Ptr& icingastatuswriter, DynamicType::GetObjectsByType<IcingaStatusWriter>()) {
 		nodes->Set(icingastatuswriter->GetName(), 1); //add more stats
@@ -61,7 +61,7 @@ void IcingaStatusWriter::Start(void)
 {
 	DynamicObject::Start();
 
-	m_StatusTimer = make_shared<Timer>();
+	m_StatusTimer = new Timer();
 	m_StatusTimer->SetInterval(GetUpdateInterval());
 	m_StatusTimer->OnTimerExpired.connect(boost::bind(&IcingaStatusWriter::StatusTimerHandler, this));
 	m_StatusTimer->Start();
@@ -70,7 +70,7 @@ void IcingaStatusWriter::Start(void)
 
 Dictionary::Ptr IcingaStatusWriter::GetStatusData(void)
 {
-	Dictionary::Ptr bag = make_shared<Dictionary>();
+	Dictionary::Ptr bag = new Dictionary();
 
 	/* features */
 	std::pair<Dictionary::Ptr, Array::Ptr> stats = CIB::GetFeatureStats();
@@ -79,7 +79,7 @@ Dictionary::Ptr IcingaStatusWriter::GetStatusData(void)
 	bag->Set("feature_perfdata", stats.second);
 
 	/* icinga stats */
-	Dictionary::Ptr icinga_stats = make_shared<Dictionary>();
+	Dictionary::Ptr icinga_stats = new Dictionary();
 
 	double interval = Utility::GetTime() - Application::GetStartTime();
 
diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp
index edacace87..d8a6f0f56 100644
--- a/lib/icinga/legacytimeperiod.cpp
+++ b/lib/icinga/legacytimeperiod.cpp
@@ -365,7 +365,7 @@ Dictionary::Ptr LegacyTimePeriod::ProcessTimeRange(const String& timestamp, tm *
 {
 	tm begin, end;
 	ProcessTimeRangeRaw(timestamp, reference, &begin, &end);
-	Dictionary::Ptr segment = make_shared<Dictionary>();
+	Dictionary::Ptr segment = new Dictionary();
 	segment->Set("begin", (long)mktime(&begin));
 	segment->Set("end", (long)mktime(&end));
 	return segment;
@@ -407,7 +407,7 @@ Dictionary::Ptr LegacyTimePeriod::FindNextSegment(const String& daydef, const St
 
 		do {
 			if (IsInTimeRange(&begin, &end, stride, &iter)) {
-				Array::Ptr segments = make_shared<Array>();
+				Array::Ptr segments = new Array();
 				ProcessTimeRanges(timeranges, &iter, segments);
 
 				Dictionary::Ptr bestSegment;
@@ -443,7 +443,7 @@ Dictionary::Ptr LegacyTimePeriod::FindNextSegment(const String& daydef, const St
 
 Array::Ptr LegacyTimePeriod::ScriptFunc(const TimePeriod::Ptr& tp, double begin, double end)
 {
-	Array::Ptr segments = make_shared<Array>();
+	Array::Ptr segments = new Array();
 
 	Dictionary::Ptr ranges = tp->GetRanges();
 
diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp
index 8d0be46d8..05ce4a429 100644
--- a/lib/icinga/macroprocessor.cpp
+++ b/lib/icinga/macroprocessor.cpp
@@ -44,7 +44,7 @@ Value MacroProcessor::ResolveMacros(const Value& str, const ResolverList& resolv
 	if (str.IsScalar()) {
 		result = InternalResolveMacros(str, resolvers, cr, missingMacro, escapeFn);
 	} else if (str.IsObjectType<Array>()) {
-		Array::Ptr resultArr = make_shared<Array>();
+		Array::Ptr resultArr = new Array();
 		Array::Ptr arr = str;
 
 		ObjectLock olock(arr);
@@ -101,7 +101,7 @@ bool MacroProcessor::ResolveMacro(const String& macro, const ResolverList& resol
 			}
 		}
 
-		MacroResolver::Ptr mresolver = dynamic_pointer_cast<MacroResolver>(resolver.second);
+		MacroResolver *mresolver = dynamic_cast<MacroResolver *>(resolver.second.get());
 
 		if (mresolver && mresolver->ResolveMacro(boost::algorithm::join(tokens, "."), cr, result))
 			return true;
diff --git a/lib/icinga/notification-apply.cpp b/lib/icinga/notification-apply.cpp
index f9765c10b..f9f299486 100644
--- a/lib/icinga/notification-apply.cpp
+++ b/lib/icinga/notification-apply.cpp
@@ -49,7 +49,7 @@ void Notification::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable,
 	Log(LogDebug, "Notification")
 	    << "Applying notification '" << name << "' to object '" << checkable->GetName() << "' for rule " << di;
 
-	ConfigItemBuilder::Ptr builder = make_shared<ConfigItemBuilder>(di);
+	ConfigItemBuilder::Ptr builder = new ConfigItemBuilder(di);
 	builder->SetType("Notification");
 	builder->SetName(name);
 	builder->SetScope(locals);
@@ -58,13 +58,13 @@ void Notification::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable,
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("host_name")), OpSetLiteral),
 	    MakeLiteral(host->GetName()),
 	    di));
 
 	if (service) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("service_name")), OpSetLiteral),
 		    MakeLiteral(service->GetShortName()),
 		    di));
@@ -73,7 +73,7 @@ void Notification::EvaluateApplyRuleOneInstance(const Checkable::Ptr& checkable,
 	String zone = checkable->GetZone();
 
 	if (!zone.IsEmpty()) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("zone")), OpSetLiteral),
 		    MakeLiteral(zone),
 		    di));
@@ -99,7 +99,7 @@ bool Notification::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, const A
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 	if (service)
@@ -113,7 +113,7 @@ bool Notification::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, const A
 	if (rule.GetFTerm()) {
 		vinstances = rule.GetFTerm()->Evaluate(locals);
 	} else {
-		Array::Ptr instances = make_shared<Array>();
+		Array::Ptr instances = new Array();
 		instances->Add("");
 		vinstances = instances;
 	}
diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp
index eefe413d0..350a3deae 100644
--- a/lib/icinga/notification.cpp
+++ b/lib/icinga/notification.cpp
@@ -84,7 +84,7 @@ void Notification::OnConfigLoaded(void)
 	Checkable::Ptr obj = GetCheckable();
 
 	if (obj)
-		obj->AddNotification(GetSelf());
+		obj->AddNotification(this);
 }
 
 void Notification::Start(void)
@@ -94,7 +94,7 @@ void Notification::Start(void)
 	Checkable::Ptr obj = GetCheckable();
 
 	if (obj)
-		obj->AddNotification(GetSelf());
+		obj->AddNotification(this);
 }
 
 void Notification::Stop(void)
@@ -104,7 +104,7 @@ void Notification::Stop(void)
 	Checkable::Ptr obj = GetCheckable();
 
 	if (obj)
-		obj->RemoveNotification(GetSelf());
+		obj->RemoveNotification(this);
 }
 
 Checkable::Ptr Notification::GetCheckable(void) const
@@ -184,7 +184,7 @@ void Notification::SetNextNotification(double time, const MessageOrigin& origin)
 {
 	SetNextNotificationRaw(time);
 
-	OnNextNotificationChanged(GetSelf(), time, origin);
+	OnNextNotificationChanged(this, time, origin);
 }
 
 void Notification::UpdateNotificationNumber(void)
@@ -304,7 +304,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 		std::copy(members.begin(), members.end(), std::inserter(allUsers, allUsers.begin()));
 	}
 
-	Service::OnNotificationSendStart(GetSelf(), checkable, allUsers, type, cr, author, text);
+	Service::OnNotificationSendStart(this, checkable, allUsers, type, cr, author, text);
 
 	std::set<User::Ptr> allNotifiedUsers;
 	BOOST_FOREACH(const User::Ptr& user, allUsers) {
@@ -321,7 +321,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 	}
 
 	/* used in db_ido for notification history */
-	Service::OnNotificationSentToAllUsers(GetSelf(), checkable, allNotifiedUsers, type, cr, author, text);
+	Service::OnNotificationSentToAllUsers(this, checkable, allNotifiedUsers, type, cr, author, text);
 }
 
 bool Notification::CheckNotificationUserFilters(NotificationType type, const User::Ptr& user, bool force)
@@ -383,7 +383,7 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
 			return;
 		}
 
-		command->Execute(GetSelf(), user, cr, type, author, text);
+		command->Execute(this, user, cr, type, author, text);
 
 		{
 			ObjectLock olock(this);
@@ -392,7 +392,7 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
 		}
 
 		/* required by compatlogger */
-		Service::OnNotificationSentToUser(GetSelf(), GetCheckable(), user, type, cr, author, text, command->GetName());
+		Service::OnNotificationSentToUser(this, GetCheckable(), user, type, cr, author, text, command->GetName());
 
 		Log(LogInformation, "Notification")
 		    << "Completed sending notification for object '" << GetCheckable()->GetName() << "'";
diff --git a/lib/icinga/notification.hpp b/lib/icinga/notification.hpp
index ab3230b27..9d596cfb9 100644
--- a/lib/icinga/notification.hpp
+++ b/lib/icinga/notification.hpp
@@ -81,8 +81,8 @@ public:
 
 	static void StaticInitialize(void);
 
-	shared_ptr<Checkable> GetCheckable(void) const;
-	shared_ptr<NotificationCommand> GetCommand(void) const;
+	intrusive_ptr<Checkable> GetCheckable(void) const;
+	intrusive_ptr<NotificationCommand> GetCommand(void) const;
 	TimePeriod::Ptr GetPeriod(void) const;
 	std::set<User::Ptr> GetUsers(void) const;
 	std::set<UserGroup::Ptr> GetUserGroups(void) const;
@@ -113,8 +113,8 @@ protected:
 private:
 	void ExecuteNotificationHelper(NotificationType type, const User::Ptr& user, const CheckResult::Ptr& cr, bool force, const String& author = "", const String& text = "");
 
-	static void EvaluateApplyRuleOneInstance(const shared_ptr<Checkable>& checkable, const String& name, const Dictionary::Ptr& locals, const ApplyRule& rule);
-	static bool EvaluateApplyRuleOne(const shared_ptr<Checkable>& checkable, const ApplyRule& rule);
+	static void EvaluateApplyRuleOneInstance(const intrusive_ptr<Checkable>& checkable, const String& name, const Dictionary::Ptr& locals, const ApplyRule& rule);
+	static bool EvaluateApplyRuleOne(const intrusive_ptr<Checkable>& checkable, const ApplyRule& rule);
 	static void EvaluateApplyRule(const ApplyRule& rule);
 	static void EvaluateApplyRules(const std::vector<ApplyRule>& rules);
 };
diff --git a/lib/icinga/notificationcommand.hpp b/lib/icinga/notificationcommand.hpp
index 2ab58e651..be8d069ff 100644
--- a/lib/icinga/notificationcommand.hpp
+++ b/lib/icinga/notificationcommand.hpp
@@ -39,7 +39,7 @@ public:
 	DECLARE_OBJECT(NotificationCommand);
 	DECLARE_OBJECTNAME(NotificationCommand);
 
-	virtual Dictionary::Ptr Execute(const shared_ptr<Notification>& notification,
+	virtual Dictionary::Ptr Execute(const intrusive_ptr<Notification>& notification,
 		const User::Ptr& user, const CheckResult::Ptr& cr, const NotificationType& type,
 	    const String& author, const String& comment);
 };
diff --git a/lib/icinga/perfdatavalue.cpp b/lib/icinga/perfdatavalue.cpp
index 4a0f3d601..5a198720b 100644
--- a/lib/icinga/perfdatavalue.cpp
+++ b/lib/icinga/perfdatavalue.cpp
@@ -139,7 +139,7 @@ PerfdataValue::Ptr PerfdataValue::Parse(const String& perfdata)
 	if (!max.IsEmpty())
 		max = max * base;
 
-	return make_shared<PerfdataValue>(label, value, counter, unit, warn, crit, min, max);
+	return new PerfdataValue(label, value, counter, unit, warn, crit, min, max);
 }
 
 String PerfdataValue::Format(void) const
diff --git a/lib/icinga/pluginutility.cpp b/lib/icinga/pluginutility.cpp
index 55e9f028a..87f95cb48 100644
--- a/lib/icinga/pluginutility.cpp
+++ b/lib/icinga/pluginutility.cpp
@@ -61,7 +61,7 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
 	if (!raw_arguments || raw_command.IsObjectType<Array>())
 		command = MacroProcessor::ResolveMacros(raw_command, macroResolvers, cr, NULL, Utility::EscapeShellArg);
 	else {
-		Array::Ptr arr = make_shared<Array>();
+		Array::Ptr arr = new Array();
 		arr->Add(raw_command);
 		command = arr;
 	}
@@ -156,7 +156,7 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
 		}
 	}
 
-	Dictionary::Ptr envMacros = make_shared<Dictionary>();
+	Dictionary::Ptr envMacros = new Dictionary();
 
 	Dictionary::Ptr env = commandObj->GetEnv();
 
@@ -171,7 +171,7 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab
 		}
 	}
 
-	Process::Ptr process = make_shared<Process>(Process::PrepareCommand(command), envMacros);
+	Process::Ptr process = new Process(Process::PrepareCommand(command), envMacros);
 	process->SetTimeout(commandObj->GetTimeout());
 	process->Run(boost::bind(callback, command, _1));
 }
@@ -223,7 +223,7 @@ std::pair<String, String> PluginUtility::ParseCheckOutput(const String& output)
 
 Array::Ptr PluginUtility::SplitPerfdata(const String& perfdata)
 {
-	Array::Ptr result = make_shared<Array>();
+	Array::Ptr result = new Array();
 
 	size_t begin = 0;
 	String multi_prefix;
diff --git a/lib/icinga/scheduleddowntime-apply.cpp b/lib/icinga/scheduleddowntime-apply.cpp
index 63fa43b40..8b830f401 100644
--- a/lib/icinga/scheduleddowntime-apply.cpp
+++ b/lib/icinga/scheduleddowntime-apply.cpp
@@ -48,7 +48,7 @@ void ScheduledDowntime::EvaluateApplyRuleOneInstance(const Checkable::Ptr& check
 	Log(LogDebug, "ScheduledDowntime")
 		<< "Applying scheduled downtime '" << rule.GetName() << "' to object '" << checkable->GetName() << "' for rule " << di;
 
-	ConfigItemBuilder::Ptr builder = make_shared<ConfigItemBuilder>(di);
+	ConfigItemBuilder::Ptr builder = new ConfigItemBuilder(di);
 	builder->SetType("ScheduledDowntime");
 	builder->SetName(name);
 	builder->SetScope(locals);
@@ -57,13 +57,13 @@ void ScheduledDowntime::EvaluateApplyRuleOneInstance(const Checkable::Ptr& check
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("host_name")), OpSetLiteral),
 	    MakeLiteral(host->GetName()),
 	    di));
 
 	if (service) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("service_name")), OpSetLiteral),
 		    MakeLiteral(service->GetShortName()),
 		    di));
@@ -72,7 +72,7 @@ void ScheduledDowntime::EvaluateApplyRuleOneInstance(const Checkable::Ptr& check
 	String zone = checkable->GetZone();
 
 	if (!zone.IsEmpty()) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("zone")), OpSetLiteral),
 		    MakeLiteral(zone),
 		    di));
@@ -97,7 +97,7 @@ bool ScheduledDowntime::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, co
 	Service::Ptr service;
 	tie(host, service) = GetHostService(checkable);
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 	if (service)
@@ -111,7 +111,7 @@ bool ScheduledDowntime::EvaluateApplyRuleOne(const Checkable::Ptr& checkable, co
 	if (rule.GetFTerm()) {
 		vinstances = rule.GetFTerm()->Evaluate(locals);
 	} else {
-		Array::Ptr instances = make_shared<Array>();
+		Array::Ptr instances = new Array();
 		instances->Add("");
 		vinstances = instances;
 	}
diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp
index b9af506c9..544f31fb5 100644
--- a/lib/icinga/scheduleddowntime.cpp
+++ b/lib/icinga/scheduleddowntime.cpp
@@ -58,7 +58,7 @@ String ScheduledDowntimeNameComposer::MakeName(const String& shortName, const Ob
 
 void ScheduledDowntime::StaticInitialize(void)
 {
-	l_Timer = make_shared<Timer>();
+	l_Timer = new Timer();
 	l_Timer->SetInterval(60);
 	l_Timer->OnTimerExpired.connect(boost::bind(&ScheduledDowntime::TimerProc));
 	l_Timer->Start();
@@ -98,7 +98,7 @@ std::pair<double, double> ScheduledDowntime::FindNextSegment(void)
 
 	Dictionary::Ptr ranges = GetRanges();
 
-	Array::Ptr segments = make_shared<Array>();
+	Array::Ptr segments = new Array();
 
 	Dictionary::Ptr bestSegment;
 	double bestBegin;
diff --git a/lib/icinga/service-apply.cpp b/lib/icinga/service-apply.cpp
index de9027a24..83543261f 100644
--- a/lib/icinga/service-apply.cpp
+++ b/lib/icinga/service-apply.cpp
@@ -47,17 +47,17 @@ void Service::EvaluateApplyRuleOneInstance(const Host::Ptr& host, const String&
 	Log(LogDebug, "Service")
 	    << "Applying service '" << name << "' to host '" << host->GetName() << "' for rule " << di;
 
-	ConfigItemBuilder::Ptr builder = make_shared<ConfigItemBuilder>(di);
+	ConfigItemBuilder::Ptr builder = new ConfigItemBuilder(di);
 	builder->SetType("Service");
 	builder->SetName(name);
 	builder->SetScope(locals);
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("host_name")), OpSetLiteral),
 	    MakeLiteral(host->GetName()),
 	    di));
 
-	builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+	builder->AddExpression(new Expression(&Expression::OpSet,
 	    MakeArray(MakeArray(MakeLiteral("name")), OpSetLiteral),
 	    MakeLiteral(name),
 	    di));
@@ -65,7 +65,7 @@ void Service::EvaluateApplyRuleOneInstance(const Host::Ptr& host, const String&
 	String zone = host->GetZone();
 
 	if (!zone.IsEmpty()) {
-		builder->AddExpression(make_shared<Expression>(&Expression::OpSet,
+		builder->AddExpression(new Expression(&Expression::OpSet,
 		    MakeArray(MakeArray(MakeLiteral("zone")), OpSetLiteral),
 		    MakeLiteral(zone),
 		    di));
@@ -86,7 +86,7 @@ bool Service::EvaluateApplyRuleOne(const Host::Ptr& host, const ApplyRule& rule)
 	msgbuf << "Evaluating 'apply' rule (" << di << ")";
 	CONTEXT(msgbuf.str());
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 
@@ -98,7 +98,7 @@ bool Service::EvaluateApplyRuleOne(const Host::Ptr& host, const ApplyRule& rule)
 	if (rule.GetFTerm()) {
 		vinstances = rule.GetFTerm()->Evaluate(locals);
 	} else {
-		Array::Ptr instances = make_shared<Array>();
+		Array::Ptr instances = new Array();
 		instances->Add("");
 		vinstances = instances;
 	}
diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp
index 432405967..9a27c1e1f 100644
--- a/lib/icinga/service.cpp
+++ b/lib/icinga/service.cpp
@@ -53,14 +53,14 @@ void Service::OnConfigLoaded(void)
 			ServiceGroup::Ptr sg = ServiceGroup::GetByName(name);
 
 			if (sg)
-				sg->ResolveGroupMembership(GetSelf(), true);
+				sg->ResolveGroupMembership(this, true);
 		}
 	}
 
 	m_Host = Host::GetByName(GetHostName());
 
 	if (m_Host)
-		m_Host->AddService(GetSelf());
+		m_Host->AddService(this);
 
 	SetSchedulingOffset(Utility::Random());
 
diff --git a/lib/icinga/servicegroup.cpp b/lib/icinga/servicegroup.cpp
index de084c5b7..af59b0d19 100644
--- a/lib/icinga/servicegroup.cpp
+++ b/lib/icinga/servicegroup.cpp
@@ -47,7 +47,7 @@ bool ServiceGroup::EvaluateObjectRuleOne(const Service::Ptr& service, const Obje
 
 	Host::Ptr host = service->GetHost();
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("host", host);
 	locals->Set("service", service);
diff --git a/lib/icinga/timeperiod.cpp b/lib/icinga/timeperiod.cpp
index 929249b63..f2e46a2ea 100644
--- a/lib/icinga/timeperiod.cpp
+++ b/lib/icinga/timeperiod.cpp
@@ -35,7 +35,7 @@ INITIALIZE_ONCE(&TimePeriod::StaticInitialize);
 
 void TimePeriod::StaticInitialize(void)
 {
-	l_UpdateTimer = make_shared<Timer>();
+	l_UpdateTimer = new Timer();
 	l_UpdateTimer->SetInterval(300);
 	l_UpdateTimer->OnTimerExpired.connect(boost::bind(&TimePeriod::UpdateTimerHandler));
 	l_UpdateTimer->Start();
@@ -87,12 +87,12 @@ void TimePeriod::AddSegment(double begin, double end)
 	}
 
 	/* Create new segment if we weren't able to merge this into an existing segment. */
-	Dictionary::Ptr segment = make_shared<Dictionary>();
+	Dictionary::Ptr segment = new Dictionary();
 	segment->Set("begin", begin);
 	segment->Set("end", end);
 
 	if (!segments) {
-		segments = make_shared<Array>();
+		segments = new Array();
 		SetSegments(segments);
 	}
 
@@ -123,7 +123,7 @@ void TimePeriod::RemoveSegment(double begin, double end)
 	if (!segments)
 		return;
 
-	Array::Ptr newSegments = make_shared<Array>();
+	Array::Ptr newSegments = new Array();
 
 	/* Try to split or adjust an existing segment. */
 	ObjectLock dlock(segments);
@@ -172,7 +172,7 @@ void TimePeriod::PurgeSegments(double end)
 	if (!segments)
 		return;
 
-	Array::Ptr newSegments = make_shared<Array>();
+	Array::Ptr newSegments = new Array();
 
 	/* Remove old segments. */
 	ObjectLock dlock(segments);
@@ -194,10 +194,8 @@ void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
 			return;
 	}
 
-	TimePeriod::Ptr self = GetSelf();
-
 	std::vector<Value> arguments;
-	arguments.push_back(self);
+	arguments.push_back(this);
 	arguments.push_back(begin);
 	arguments.push_back(end);
 
diff --git a/lib/icinga/user.cpp b/lib/icinga/user.cpp
index 18342e6af..4691b7437 100644
--- a/lib/icinga/user.cpp
+++ b/lib/icinga/user.cpp
@@ -48,7 +48,7 @@ void User::OnConfigLoaded(void)
 			UserGroup::Ptr ug = UserGroup::GetByName(name);
 
 			if (ug)
-				ug->ResolveGroupMembership(GetSelf(), true);
+				ug->ResolveGroupMembership(this, true);
 		}
 	}
 }
@@ -66,7 +66,7 @@ void User::Stop(void)
 			UserGroup::Ptr ug = UserGroup::GetByName(name);
 
 			if (ug)
-				ug->ResolveGroupMembership(GetSelf(), false);
+				ug->ResolveGroupMembership(this, false);
 		}
 	}
 }
@@ -81,7 +81,7 @@ void User::AddGroup(const String& name)
 		return;
 
 	if (!groups)
-		groups = make_shared<Array>();
+		groups = new Array();
 
 	groups->Add(name);
 }
@@ -124,7 +124,7 @@ void User::SetModifiedAttributes(int flags, const MessageOrigin& origin)
 {
 	if ((flags & ModAttrCustomVariable) == 0) {
 		SetOverrideVars(Empty);
-		OnVarsChanged(GetSelf(), GetVars(), origin);
+		OnVarsChanged(this, GetVars(), origin);
 	}
 }
 
@@ -140,6 +140,6 @@ void User::SetEnableNotifications(bool enabled, const MessageOrigin& origin)
 {
 	SetOverrideEnableNotifications(enabled);
 
-	OnEnableNotificationsChanged(GetSelf(), enabled, origin);
+	OnEnableNotificationsChanged(this, enabled, origin);
 }
 
diff --git a/lib/icinga/user.ti b/lib/icinga/user.ti
index f066b89c2..7e3b38448 100644
--- a/lib/icinga/user.ti
+++ b/lib/icinga/user.ti
@@ -34,7 +34,7 @@ class User : CustomVarObject
 		}}}
 	};
 	[config] Array::Ptr groups {
-		default {{{ return make_shared<Array>(); }}}
+		default {{{ return new Array(); }}}
 	};
 	[config] String period (PeriodRaw);
 	[config] Array::Ptr types;
diff --git a/lib/icinga/usergroup.cpp b/lib/icinga/usergroup.cpp
index a8b56c8a3..aaaf3df31 100644
--- a/lib/icinga/usergroup.cpp
+++ b/lib/icinga/usergroup.cpp
@@ -45,7 +45,7 @@ bool UserGroup::EvaluateObjectRuleOne(const User::Ptr& user, const ObjectRule& r
 	msgbuf << "Evaluating 'object' rule (" << di << ")";
 	CONTEXT(msgbuf.str());
 
-	Dictionary::Ptr locals = make_shared<Dictionary>();
+	Dictionary::Ptr locals = new Dictionary();
 	locals->Set("__parent", rule.GetScope());
 	locals->Set("user", user);
 
diff --git a/lib/livestatus/commandstable.cpp b/lib/livestatus/commandstable.cpp
index babb4d7a1..63de24585 100644
--- a/lib/livestatus/commandstable.cpp
+++ b/lib/livestatus/commandstable.cpp
@@ -105,7 +105,7 @@ Value CommandsTable::CustomVariableNamesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
@@ -133,7 +133,7 @@ Value CommandsTable::CustomVariableValuesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
@@ -161,12 +161,12 @@ Value CommandsTable::CustomVariablesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
 	BOOST_FOREACH(tie(key, value), vars) {
-		Array::Ptr key_val = make_shared<Array>();
+		Array::Ptr key_val = new Array();
 		key_val->Add(key);
 		key_val->Add(value);
 		cv->Add(key_val);
diff --git a/lib/livestatus/contactgroupstable.cpp b/lib/livestatus/contactgroupstable.cpp
index bf1340a0d..6faf512c2 100644
--- a/lib/livestatus/contactgroupstable.cpp
+++ b/lib/livestatus/contactgroupstable.cpp
@@ -81,7 +81,7 @@ Value ContactGroupsTable::MembersAccessor(const Value& row)
 	if(!user_group)
 		return Empty;
 
-	Array::Ptr members = make_shared<Array>();
+	Array::Ptr members = new Array();
 
 	BOOST_FOREACH(const User::Ptr& user, user_group->GetMembers()) {
 		members->Add(user->GetName());
diff --git a/lib/livestatus/contactstable.cpp b/lib/livestatus/contactstable.cpp
index 606ce995c..32f77d6e1 100644
--- a/lib/livestatus/contactstable.cpp
+++ b/lib/livestatus/contactstable.cpp
@@ -213,7 +213,7 @@ Value ContactsTable::CustomVariableNamesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -240,7 +240,7 @@ Value ContactsTable::CustomVariableValuesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -270,11 +270,11 @@ Value ContactsTable::CustomVariablesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
-		Array::Ptr key_val = make_shared<Array>();
+		Array::Ptr key_val = new Array();
 		key_val->Add(kv.first);
 
 		if (kv.second.IsObjectType<Array>() || kv.second.IsObjectType<Dictionary>())
diff --git a/lib/livestatus/hostgroupstable.cpp b/lib/livestatus/hostgroupstable.cpp
index 04b8c3b74..b3c3ab155 100644
--- a/lib/livestatus/hostgroupstable.cpp
+++ b/lib/livestatus/hostgroupstable.cpp
@@ -105,7 +105,7 @@ Value HostGroupsTable::ActionUrlAccessor(const Value& row)
 
 Value HostGroupsTable::MembersAccessor(const Value& row)
 {
-	Array::Ptr members = make_shared<Array>();
+	Array::Ptr members = new Array();
 
 	BOOST_FOREACH(const Host::Ptr& host, static_cast<HostGroup::Ptr>(row)->GetMembers()) {
 		members->Add(host->GetName());
@@ -116,10 +116,10 @@ Value HostGroupsTable::MembersAccessor(const Value& row)
 
 Value HostGroupsTable::MembersWithStateAccessor(const Value& row)
 {
-	Array::Ptr members = make_shared<Array>();
+	Array::Ptr members = new Array();
 
 	BOOST_FOREACH(const Host::Ptr& host, static_cast<HostGroup::Ptr>(row)->GetMembers()) {
-		Array::Ptr member_state = make_shared<Array>();
+		Array::Ptr member_state = new Array();
 		member_state->Add(host->GetName());
 		member_state->Add(host->GetState());
 		members->Add(member_state);
diff --git a/lib/livestatus/hoststable.cpp b/lib/livestatus/hoststable.cpp
index 36c9a4b0c..f4de88742 100644
--- a/lib/livestatus/hoststable.cpp
+++ b/lib/livestatus/hoststable.cpp
@@ -873,7 +873,7 @@ Value HostsTable::ContactsAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr contact_names = make_shared<Array>();
+	Array::Ptr contact_names = new Array();
 
 	BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(host)) {
 		contact_names->Add(user->GetName());
@@ -891,7 +891,7 @@ Value HostsTable::DowntimesAccessor(const Value& row)
 
 	Dictionary::Ptr downtimes = host->GetDowntimes();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(downtimes);
 
@@ -920,7 +920,7 @@ Value HostsTable::DowntimesWithInfoAccessor(const Value& row)
 
 	Dictionary::Ptr downtimes = host->GetDowntimes();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(downtimes);
 
@@ -934,7 +934,7 @@ Value HostsTable::DowntimesWithInfoAccessor(const Value& row)
 		if (downtime->IsExpired())
 			continue;
 
-		Array::Ptr downtime_info = make_shared<Array>();
+		Array::Ptr downtime_info = new Array();
 		downtime_info->Add(downtime->GetLegacyId());
 		downtime_info->Add(downtime->GetAuthor());
 		downtime_info->Add(downtime->GetComment());
@@ -953,7 +953,7 @@ Value HostsTable::CommentsAccessor(const Value& row)
 
 	Dictionary::Ptr comments = host->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -982,7 +982,7 @@ Value HostsTable::CommentsWithInfoAccessor(const Value& row)
 
 	Dictionary::Ptr comments = host->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -996,7 +996,7 @@ Value HostsTable::CommentsWithInfoAccessor(const Value& row)
 		if (comment->IsExpired())
 			continue;
 
-		Array::Ptr comment_info = make_shared<Array>();
+		Array::Ptr comment_info = new Array();
 		comment_info->Add(comment->GetLegacyId());
 		comment_info->Add(comment->GetAuthor());
 		comment_info->Add(comment->GetText());
@@ -1015,7 +1015,7 @@ Value HostsTable::CommentsWithExtraInfoAccessor(const Value& row)
 
 	Dictionary::Ptr comments = host->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -1029,7 +1029,7 @@ Value HostsTable::CommentsWithExtraInfoAccessor(const Value& row)
 		if (comment->IsExpired())
 			continue;
 
-		Array::Ptr comment_info = make_shared<Array>();
+		Array::Ptr comment_info = new Array();
 		comment_info->Add(comment->GetLegacyId());
 		comment_info->Add(comment->GetAuthor());
 		comment_info->Add(comment->GetText());
@@ -1058,7 +1058,7 @@ Value HostsTable::CustomVariableNamesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -1085,7 +1085,7 @@ Value HostsTable::CustomVariableValuesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -1115,11 +1115,11 @@ Value HostsTable::CustomVariablesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
-		Array::Ptr key_val = make_shared<Array>();
+		Array::Ptr key_val = new Array();
 		key_val->Add(kv.first);
 
 		if (kv.second.IsObjectType<Array>() || kv.second.IsObjectType<Dictionary>())
@@ -1168,7 +1168,7 @@ Value HostsTable::ParentsAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr parents = make_shared<Array>();
+	Array::Ptr parents = new Array();
 
 	BOOST_FOREACH(const Checkable::Ptr& parent, host->GetParents()) {
 		Host::Ptr parent_host = dynamic_pointer_cast<Host>(parent);
@@ -1189,7 +1189,7 @@ Value HostsTable::ChildsAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr childs = make_shared<Array>();
+	Array::Ptr childs = new Array();
 
 	BOOST_FOREACH(const Checkable::Ptr& child, host->GetChildren()) {
 		Host::Ptr child_host = dynamic_pointer_cast<Host>(child);
@@ -1450,7 +1450,7 @@ Value HostsTable::ContactGroupsAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr contactgroup_names = make_shared<Array>();
+	Array::Ptr contactgroup_names = new Array();
 
 	BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(host)) {
 		contactgroup_names->Add(usergroup->GetName());
@@ -1466,7 +1466,7 @@ Value HostsTable::ServicesAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr services = make_shared<Array>();
+	Array::Ptr services = new Array();
 
 	BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
 		services->Add(service->GetShortName());
@@ -1482,10 +1482,10 @@ Value HostsTable::ServicesWithStateAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr services = make_shared<Array>();
+	Array::Ptr services = new Array();
 
 	BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
-		Array::Ptr svc_add = make_shared<Array>();
+		Array::Ptr svc_add = new Array();
 
 		svc_add->Add(service->GetShortName());
 		svc_add->Add(service->GetState());
@@ -1503,10 +1503,10 @@ Value HostsTable::ServicesWithInfoAccessor(const Value& row)
 	if (!host)
 		return Empty;
 
-	Array::Ptr services = make_shared<Array>();
+	Array::Ptr services = new Array();
 
 	BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
-		Array::Ptr svc_add = make_shared<Array>();
+		Array::Ptr svc_add = new Array();
 
 		svc_add->Add(service->GetShortName());
 		svc_add->Add(service->GetState());
diff --git a/lib/livestatus/livestatuslistener.cpp b/lib/livestatus/livestatuslistener.cpp
index a942e08fd..7a7568aad 100644
--- a/lib/livestatus/livestatuslistener.cpp
+++ b/lib/livestatus/livestatuslistener.cpp
@@ -46,15 +46,15 @@ REGISTER_STATSFUNCTION(LivestatusListenerStats, &LivestatusListener::StatsFunc);
 
 Value LivestatusListener::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const LivestatusListener::Ptr& livestatuslistener, DynamicType::GetObjectsByType<LivestatusListener>()) {
-		Dictionary::Ptr stats = make_shared<Dictionary>();
+		Dictionary::Ptr stats = new Dictionary();
 		stats->Set("connections", l_Connections);
 
 		nodes->Set(livestatuslistener->GetName(), stats);
 
-		perfdata->Add(make_shared<PerfdataValue>("livestatuslistener_" + livestatuslistener->GetName() + "_connections", l_Connections));
+		perfdata->Add(new PerfdataValue("livestatuslistener_" + livestatuslistener->GetName() + "_connections", l_Connections));
 	}
 
 	status->Set("livestatuslistener", nodes);
@@ -70,7 +70,7 @@ void LivestatusListener::Start(void)
 	DynamicObject::Start();
 
 	if (GetSocketType() == "tcp") {
-		TcpSocket::Ptr socket = make_shared<TcpSocket>();
+		TcpSocket::Ptr socket = new TcpSocket();
 		try {
 			socket->Bind(GetBindHost(), GetBindPort(), AF_UNSPEC);
 		} catch (std::exception&) {
@@ -86,7 +86,7 @@ void LivestatusListener::Start(void)
 	}
 	else if (GetSocketType() == "unix") {
 #ifndef _WIN32
-		UnixSocket::Ptr socket = make_shared<UnixSocket>();
+		UnixSocket::Ptr socket = new UnixSocket();
 		try {
 			socket->Bind(GetSocketPath());
 		} catch (std::exception&) {
@@ -153,7 +153,7 @@ void LivestatusListener::ClientHandler(const Socket::Ptr& client)
 		l_Connections++;
 	}
 
-	Stream::Ptr stream = make_shared<NetworkStream>(client);
+	Stream::Ptr stream = new NetworkStream(client);
 
 	for (;;) {
 		String line;
@@ -171,7 +171,7 @@ void LivestatusListener::ClientHandler(const Socket::Ptr& client)
 		if (lines.empty())
 			break;
 
-		LivestatusQuery::Ptr query = make_shared<LivestatusQuery>(lines, GetCompatLogPath());
+		LivestatusQuery::Ptr query = new LivestatusQuery(lines, GetCompatLogPath());
 		if (!query->Execute(stream))
 			break;
 	}
diff --git a/lib/livestatus/livestatuslogutility.cpp b/lib/livestatus/livestatuslogutility.cpp
index 6ffcfeab1..cb5f3ee94 100644
--- a/lib/livestatus/livestatuslogutility.cpp
+++ b/lib/livestatus/livestatuslogutility.cpp
@@ -122,7 +122,7 @@ void LivestatusLogUtility::CreateLogCache(std::map<time_t, String> index, Histor
 
 Dictionary::Ptr LivestatusLogUtility::GetAttributes(const String& text)
 {
-	Dictionary::Ptr bag = make_shared<Dictionary>();
+	Dictionary::Ptr bag = new Dictionary();
 
 	/*
 	 * [1379025342] SERVICE NOTIFICATION: contactname;hostname;servicedesc;WARNING;true;foo output
diff --git a/lib/livestatus/livestatusquery.cpp b/lib/livestatus/livestatusquery.cpp
index 0b3e5dec1..32fd88f3c 100644
--- a/lib/livestatus/livestatusquery.cpp
+++ b/lib/livestatus/livestatusquery.cpp
@@ -168,19 +168,19 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 			Filter::Ptr filter;
 
 			if (aggregate_arg == "sum") {
-				aggregator = make_shared<SumAggregator>(aggregate_attr);
+				aggregator = new SumAggregator(aggregate_attr);
 			} else if (aggregate_arg == "min") {
-				aggregator = make_shared<MinAggregator>(aggregate_attr);
+				aggregator = new MinAggregator(aggregate_attr);
 			} else if (aggregate_arg == "max") {
-				aggregator = make_shared<MaxAggregator>(aggregate_attr);
+				aggregator = new MaxAggregator(aggregate_attr);
 			} else if (aggregate_arg == "avg") {
-				aggregator = make_shared<AvgAggregator>(aggregate_attr);
+				aggregator = new AvgAggregator(aggregate_attr);
 			} else if (aggregate_arg == "std") {
-				aggregator = make_shared<StdAggregator>(aggregate_attr);
+				aggregator = new StdAggregator(aggregate_attr);
 			} else if (aggregate_arg == "suminv") {
-				aggregator = make_shared<InvSumAggregator>(aggregate_attr);
+				aggregator = new InvSumAggregator(aggregate_attr);
 			} else if (aggregate_arg == "avginv") {
-				aggregator = make_shared<InvAvgAggregator>(aggregate_attr);
+				aggregator = new InvAvgAggregator(aggregate_attr);
 			} else {
 				filter = ParseFilter(params, m_LogTimeFrom, m_LogTimeUntil);
 
@@ -191,7 +191,7 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 					return;
 				}
 
-				aggregator = make_shared<CountAggregator>();
+				aggregator = new CountAggregator();
 			}
 
 			aggregator->SetFilter(filter);
@@ -205,11 +205,11 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 			CombinerFilter::Ptr filter;
 
 			if (header == "Or" || header == "StatsOr") {
-				filter = make_shared<OrFilter>();
+				filter = new OrFilter();
 				Log(LogDebug, "LivestatusQuery")
 				    << "Add OR filter for " << params << " column(s). " << deq.size() << " filters available.";
 			} else {
-				filter = make_shared<AndFilter>();
+				filter = new AndFilter();
 				Log(LogDebug, "LivestatusQuery")
 				    << "Add AND filter for " << params << " column(s). " << deq.size() << " filters available.";
 			}
@@ -232,7 +232,7 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 
 			deq.push_back(filter);
 			if (&deq == &stats) {
-				Aggregator::Ptr aggregator = make_shared<CountAggregator>();
+				Aggregator::Ptr aggregator = new CountAggregator();
 				aggregator->SetFilter(filter);
 				aggregators.push_back(aggregator);
 			}
@@ -256,7 +256,7 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 				return;
 			}
 
-			deq.push_back(make_shared<NegateFilter>(filter));
+			deq.push_back(new NegateFilter(filter));
 
 			if (deq == stats) {
 				Aggregator::Ptr aggregator = aggregators.back();
@@ -266,7 +266,7 @@ LivestatusQuery::LivestatusQuery(const std::vector<String>& lines, const String&
 	}
 
 	/* Combine all top-level filters into a single filter. */
-	AndFilter::Ptr top_filter = make_shared<AndFilter>();
+	AndFilter::Ptr top_filter = new AndFilter();
 
 	BOOST_FOREACH(const Filter::Ptr& filter, filters) {
 		top_filter->AddSubFilter(filter);
@@ -338,10 +338,10 @@ Filter::Ptr LivestatusQuery::ParseFilter(const String& params, unsigned long& fr
 		negate = true;
 	}
 
-	Filter::Ptr filter = make_shared<AttributeFilter>(attr, op, val);
+	Filter::Ptr filter = new AttributeFilter(attr, op, val);
 
 	if (negate)
-		filter = make_shared<NegateFilter>(filter);
+		filter = new NegateFilter(filter);
 
 	/* pre-filter log time duration */
 	if (attr == "time") {
@@ -456,13 +456,13 @@ void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
 	else
 		columns = table->GetColumnNames();
 
-	Array::Ptr rs = make_shared<Array>();
+	Array::Ptr rs = new Array();
 
 	if (m_Aggregators.empty()) {
-		Array::Ptr header = make_shared<Array>();
+		Array::Ptr header = new Array();
 
 		BOOST_FOREACH(const Value& object, objects) {
-			Array::Ptr row = make_shared<Array>();
+			Array::Ptr row = new Array();
 
 			BOOST_FOREACH(const String& columnName, columns) {
 				Column column = table->GetColumn(columnName);
@@ -496,7 +496,7 @@ void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
 
 		/* add column headers both for raw and aggregated data */
 		if (m_ColumnHeaders) {
-			Array::Ptr header = make_shared<Array>();
+			Array::Ptr header = new Array();
 
 			BOOST_FOREACH(const String& columnName, m_Columns) {
 				header->Add(columnName);
@@ -509,7 +509,7 @@ void LivestatusQuery::ExecuteGetHelper(const Stream::Ptr& stream)
 			rs->Add(header);
 		}
 
-		Array::Ptr row = make_shared<Array>();
+		Array::Ptr row = new Array();
 
 		/*
 		 * add selected columns next to stats
diff --git a/lib/livestatus/servicegroupstable.cpp b/lib/livestatus/servicegroupstable.cpp
index 2769cb240..6ccd95a74 100644
--- a/lib/livestatus/servicegroupstable.cpp
+++ b/lib/livestatus/servicegroupstable.cpp
@@ -96,10 +96,10 @@ Value ServiceGroupsTable::ActionUrlAccessor(const Value& row)
 
 Value ServiceGroupsTable::MembersAccessor(const Value& row)
 {
-	Array::Ptr members = make_shared<Array>();
+	Array::Ptr members = new Array();
 
 	BOOST_FOREACH(const Service::Ptr& service, static_cast<ServiceGroup::Ptr>(row)->GetMembers()) {
-		Array::Ptr host_svc = make_shared<Array>();
+		Array::Ptr host_svc = new Array();
 		host_svc->Add(service->GetHost()->GetName());
 		host_svc->Add(service->GetShortName());
 		members->Add(host_svc);
@@ -110,10 +110,10 @@ Value ServiceGroupsTable::MembersAccessor(const Value& row)
 
 Value ServiceGroupsTable::MembersWithStateAccessor(const Value& row)
 {
-	Array::Ptr members = make_shared<Array>();
+	Array::Ptr members = new Array();
 
 	BOOST_FOREACH(const Service::Ptr& service, static_cast<ServiceGroup::Ptr>(row)->GetMembers()) {
-		Array::Ptr host_svc = make_shared<Array>();
+		Array::Ptr host_svc = new Array();
 		host_svc->Add(service->GetHost()->GetName());
 		host_svc->Add(service->GetShortName());
 		host_svc->Add(service->GetHost()->GetState());
diff --git a/lib/livestatus/servicestable.cpp b/lib/livestatus/servicestable.cpp
index 8bffa2b21..71f1b8f94 100644
--- a/lib/livestatus/servicestable.cpp
+++ b/lib/livestatus/servicestable.cpp
@@ -877,7 +877,7 @@ Value ServicesTable::ContactsAccessor(const Value& row)
 	if (!service)
 		return Empty;
 
-	Array::Ptr contact_names = make_shared<Array>();
+	Array::Ptr contact_names = new Array();
 
 	BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(service)) {
 		contact_names->Add(user->GetName());
@@ -895,7 +895,7 @@ Value ServicesTable::DowntimesAccessor(const Value& row)
 
 	Dictionary::Ptr downtimes = service->GetDowntimes();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(downtimes);
 
@@ -924,7 +924,7 @@ Value ServicesTable::DowntimesWithInfoAccessor(const Value& row)
 
 	Dictionary::Ptr downtimes = service->GetDowntimes();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(downtimes);
 
@@ -938,7 +938,7 @@ Value ServicesTable::DowntimesWithInfoAccessor(const Value& row)
 		if (downtime->IsExpired())
 			continue;
 
-		Array::Ptr downtime_info = make_shared<Array>();
+		Array::Ptr downtime_info = new Array();
 		downtime_info->Add(downtime->GetLegacyId());
 		downtime_info->Add(downtime->GetAuthor());
 		downtime_info->Add(downtime->GetComment());
@@ -957,7 +957,7 @@ Value ServicesTable::CommentsAccessor(const Value& row)
 
 	Dictionary::Ptr comments = service->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -986,7 +986,7 @@ Value ServicesTable::CommentsWithInfoAccessor(const Value& row)
 
 	Dictionary::Ptr comments = service->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -1000,7 +1000,7 @@ Value ServicesTable::CommentsWithInfoAccessor(const Value& row)
 		if (comment->IsExpired())
 			continue;
 
-		Array::Ptr comment_info = make_shared<Array>();
+		Array::Ptr comment_info = new Array();
 		comment_info->Add(comment->GetLegacyId());
 		comment_info->Add(comment->GetAuthor());
 		comment_info->Add(comment->GetText());
@@ -1019,7 +1019,7 @@ Value ServicesTable::CommentsWithExtraInfoAccessor(const Value& row)
 
 	Dictionary::Ptr comments = service->GetComments();
 
-	Array::Ptr ids = make_shared<Array>();
+	Array::Ptr ids = new Array();
 
 	ObjectLock olock(comments);
 
@@ -1033,7 +1033,7 @@ Value ServicesTable::CommentsWithExtraInfoAccessor(const Value& row)
 		if (comment->IsExpired())
 			continue;
 
-		Array::Ptr comment_info = make_shared<Array>();
+		Array::Ptr comment_info = new Array();
 		comment_info->Add(comment->GetLegacyId());
 		comment_info->Add(comment->GetAuthor());
 		comment_info->Add(comment->GetText());
@@ -1062,7 +1062,7 @@ Value ServicesTable::CustomVariableNamesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -1089,7 +1089,7 @@ Value ServicesTable::CustomVariableValuesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
@@ -1119,11 +1119,11 @@ Value ServicesTable::CustomVariablesAccessor(const Value& row)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	ObjectLock olock(vars);
 	BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
-		Array::Ptr key_val = make_shared<Array>();
+		Array::Ptr key_val = new Array();
 		key_val->Add(kv.first);
 
 		if (kv.second.IsObjectType<Array>() || kv.second.IsObjectType<Dictionary>())
@@ -1187,7 +1187,7 @@ Value ServicesTable::ContactGroupsAccessor(const Value& row)
 	if (!service)
 		return Empty;
 
-	Array::Ptr contactgroup_names = make_shared<Array>();
+	Array::Ptr contactgroup_names = new Array();
 
 	BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(service)) {
 		contactgroup_names->Add(usergroup->GetName());
diff --git a/lib/livestatus/statehisttable.cpp b/lib/livestatus/statehisttable.cpp
index df2843bfa..7aad04904 100644
--- a/lib/livestatus/statehisttable.cpp
+++ b/lib/livestatus/statehisttable.cpp
@@ -87,8 +87,8 @@ void StateHistTable::UpdateLogEntries(const Dictionary::Ptr& log_entry_attrs, in
 	if (m_CheckablesCache.find(checkable) == m_CheckablesCache.end()) {
 
 		/* create new values */
-		state_hist_service_states = make_shared<Array>();
-		state_hist_bag = make_shared<Dictionary>();
+		state_hist_service_states = new Array();
+		state_hist_bag = new Dictionary();
 
 		Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
 		Host::Ptr host;
@@ -155,7 +155,7 @@ void StateHistTable::UpdateLogEntries(const Dictionary::Ptr& log_entry_attrs, in
 					state_hist_bag->Set("until", time); /* add until record for duration calculation */
 
 					/* 2. add new state_hist_bag */
-					Dictionary::Ptr state_hist_bag_new = make_shared<Dictionary>();
+					Dictionary::Ptr state_hist_bag_new = new Dictionary();
 
 					state_hist_bag_new->Set("host_name", state_hist_bag->Get("host_name"));
 					state_hist_bag_new->Set("service_description", state_hist_bag->Get("service_description"));
diff --git a/lib/livestatus/statustable.cpp b/lib/livestatus/statustable.cpp
index 08860e5f0..722c9bd40 100644
--- a/lib/livestatus/statustable.cpp
+++ b/lib/livestatus/statustable.cpp
@@ -115,7 +115,7 @@ String StatusTable::GetPrefix(void) const
 
 void StatusTable::FetchRows(const AddRowFunction& addRowFn)
 {
-	Object::Ptr obj = make_shared<Object>();
+	Object::Ptr obj = new Object();
 
 	/* Return a fake row. */
 	addRowFn(obj);
@@ -237,7 +237,7 @@ Value StatusTable::CustomVariableNamesAccessor(const Value&)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
@@ -255,7 +255,7 @@ Value StatusTable::CustomVariableValuesAccessor(const Value&)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
@@ -273,12 +273,12 @@ Value StatusTable::CustomVariablesAccessor(const Value&)
 	if (!vars)
 		return Empty;
 
-	Array::Ptr cv = make_shared<Array>();
+	Array::Ptr cv = new Array();
 
 	String key;
 	Value value;
 	BOOST_FOREACH(tie(key, value), vars) {
-		Array::Ptr key_val = make_shared<Array>();
+		Array::Ptr key_val = new Array();
 		key_val->Add(key);
 		key_val->Add(value);
 		cv->Add(key_val);
diff --git a/lib/livestatus/table.cpp b/lib/livestatus/table.cpp
index 59a7ac7ee..702a47473 100644
--- a/lib/livestatus/table.cpp
+++ b/lib/livestatus/table.cpp
@@ -48,33 +48,33 @@ Table::Table(void)
 Table::Ptr Table::GetByName(const String& name, const String& compat_log_path, const unsigned long& from, const unsigned long& until)
 {
 	if (name == "status")
-		return make_shared<StatusTable>();
+		return new StatusTable();
 	else if (name == "contactgroups")
-		return make_shared<ContactGroupsTable>();
+		return new ContactGroupsTable();
 	else if (name == "contacts")
-		return make_shared<ContactsTable>();
+		return new ContactsTable();
 	else if (name == "hostgroups")
-		return make_shared<HostGroupsTable>();
+		return new HostGroupsTable();
 	else if (name == "hosts")
-		return make_shared<HostsTable>();
+		return new HostsTable();
 	else if (name == "servicegroups")
-		return make_shared<ServiceGroupsTable>();
+		return new ServiceGroupsTable();
 	else if (name == "services")
-		return make_shared<ServicesTable>();
+		return new ServicesTable();
 	else if (name == "commands")
-		return make_shared<CommandsTable>();
+		return new CommandsTable();
 	else if (name == "comments")
-		return make_shared<CommentsTable>();
+		return new CommentsTable();
 	else if (name == "downtimes")
-		return make_shared<DowntimesTable>();
+		return new DowntimesTable();
 	else if (name == "timeperiods")
-		return make_shared<TimePeriodsTable>();
+		return new TimePeriodsTable();
 	else if (name == "log")
-		return make_shared<LogTable>(compat_log_path, from, until);
+		return new LogTable(compat_log_path, from, until);
 	else if (name == "statehist")
-		return make_shared<StateHistTable>(compat_log_path, from, until);
+		return new StateHistTable(compat_log_path, from, until);
 	else if (name == "endpoints")
-		return make_shared<EndpointsTable>();
+		return new EndpointsTable();
 
 	return Table::Ptr();
 }
@@ -128,7 +128,7 @@ std::vector<Value> Table::FilterRows(const Filter::Ptr& filter)
 
 void Table::FilteredAddRow(std::vector<Value>& rs, const Filter::Ptr& filter, const Value& row)
 {
-	if (!filter || filter->Apply(GetSelf(), row))
+	if (!filter || filter->Apply(this, row))
 		rs.push_back(row);
 }
 
@@ -149,10 +149,10 @@ Value Table::EmptyStringAccessor(const Value&)
 
 Value Table::EmptyArrayAccessor(const Value&)
 {
-	return make_shared<Array>();
+	return new Array();
 }
 
 Value Table::EmptyDictionaryAccessor(const Value&)
 {
-	return make_shared<Dictionary>();
+	return new Dictionary();
 }
diff --git a/lib/livestatus/table.hpp b/lib/livestatus/table.hpp
index 5844f4acf..cffd019a0 100644
--- a/lib/livestatus/table.hpp
+++ b/lib/livestatus/table.hpp
@@ -45,7 +45,7 @@ public:
 	virtual String GetName(void) const = 0;
 	virtual String GetPrefix(void) const = 0;
 
-	std::vector<Value> FilterRows(const shared_ptr<Filter>& filter);
+	std::vector<Value> FilterRows(const intrusive_ptr<Filter>& filter);
 
 	void AddColumn(const String& name, const Column& column);
 	Column GetColumn(const String& name) const;
@@ -65,9 +65,11 @@ protected:
 private:
 	std::map<String, Column> m_Columns;
 
-	void FilteredAddRow(std::vector<Value>& rs, const shared_ptr<Filter>& filter, const Value& row);
+	void FilteredAddRow(std::vector<Value>& rs, const intrusive_ptr<Filter>& filter, const Value& row);
 };
 
 }
 
 #endif /* TABLE_H */
+
+#include "livestatus/filter.hpp"
diff --git a/lib/methods/clrchecktask.cpp b/lib/methods/clrchecktask.cpp
index 298f006ce..1c9eeaa5e 100644
--- a/lib/methods/clrchecktask.cpp
+++ b/lib/methods/clrchecktask.cpp
@@ -161,7 +161,7 @@ void ClrCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
 	resolvers.push_back(std::make_pair("command", commandObj));
 	resolvers.push_back(std::make_pair("icinga", IcingaApplication::GetInstance()));
 
-	Dictionary::Ptr envMacros = make_shared<Dictionary>();
+	Dictionary::Ptr envMacros = new Dictionary();
 
 	Dictionary::Ptr env = commandObj->GetEnv();
 
diff --git a/lib/methods/icingachecktask.cpp b/lib/methods/icingachecktask.cpp
index 445f367ec..3cf69fb0d 100644
--- a/lib/methods/icingachecktask.cpp
+++ b/lib/methods/icingachecktask.cpp
@@ -39,58 +39,58 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResul
 	if (interval > 60)
 		interval = 60;
 
-	Array::Ptr perfdata = make_shared<Array>();
+	Array::Ptr perfdata = new Array();
 
-	perfdata->Add(make_shared<PerfdataValue>("active_host_checks", CIB::GetActiveHostChecksStatistics(interval) / interval));
-	perfdata->Add(make_shared<PerfdataValue>("passive_host_checks", CIB::GetPassiveHostChecksStatistics(interval) / interval));
-	perfdata->Add(make_shared<PerfdataValue>("active_host_checks_1min", CIB::GetActiveHostChecksStatistics(60)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_host_checks_1min", CIB::GetPassiveHostChecksStatistics(60)));
-	perfdata->Add(make_shared<PerfdataValue>("active_host_checks_5min", CIB::GetActiveHostChecksStatistics(60 * 5)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_host_checks_5min", CIB::GetPassiveHostChecksStatistics(60 * 5)));
-	perfdata->Add(make_shared<PerfdataValue>("active_host_checks_15min", CIB::GetActiveHostChecksStatistics(60 * 15)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_host_checks_15min", CIB::GetPassiveHostChecksStatistics(60 * 15)));
+	perfdata->Add(new PerfdataValue("active_host_checks", CIB::GetActiveHostChecksStatistics(interval) / interval));
+	perfdata->Add(new PerfdataValue("passive_host_checks", CIB::GetPassiveHostChecksStatistics(interval) / interval));
+	perfdata->Add(new PerfdataValue("active_host_checks_1min", CIB::GetActiveHostChecksStatistics(60)));
+	perfdata->Add(new PerfdataValue("passive_host_checks_1min", CIB::GetPassiveHostChecksStatistics(60)));
+	perfdata->Add(new PerfdataValue("active_host_checks_5min", CIB::GetActiveHostChecksStatistics(60 * 5)));
+	perfdata->Add(new PerfdataValue("passive_host_checks_5min", CIB::GetPassiveHostChecksStatistics(60 * 5)));
+	perfdata->Add(new PerfdataValue("active_host_checks_15min", CIB::GetActiveHostChecksStatistics(60 * 15)));
+	perfdata->Add(new PerfdataValue("passive_host_checks_15min", CIB::GetPassiveHostChecksStatistics(60 * 15)));
 
-	perfdata->Add(make_shared<PerfdataValue>("active_service_checks", CIB::GetActiveServiceChecksStatistics(interval) / interval));
-	perfdata->Add(make_shared<PerfdataValue>("passive_service_checks", CIB::GetPassiveServiceChecksStatistics(interval) / interval));
-	perfdata->Add(make_shared<PerfdataValue>("active_service_checks_1min", CIB::GetActiveServiceChecksStatistics(60)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_service_checks_1min", CIB::GetPassiveServiceChecksStatistics(60)));
-	perfdata->Add(make_shared<PerfdataValue>("active_service_checks_5min", CIB::GetActiveServiceChecksStatistics(60 * 5)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_service_checks_5min", CIB::GetPassiveServiceChecksStatistics(60 * 5)));
-	perfdata->Add(make_shared<PerfdataValue>("active_service_checks_15min", CIB::GetActiveServiceChecksStatistics(60 * 15)));
-	perfdata->Add(make_shared<PerfdataValue>("passive_service_checks_15min", CIB::GetPassiveServiceChecksStatistics(60 * 15)));
+	perfdata->Add(new PerfdataValue("active_service_checks", CIB::GetActiveServiceChecksStatistics(interval) / interval));
+	perfdata->Add(new PerfdataValue("passive_service_checks", CIB::GetPassiveServiceChecksStatistics(interval) / interval));
+	perfdata->Add(new PerfdataValue("active_service_checks_1min", CIB::GetActiveServiceChecksStatistics(60)));
+	perfdata->Add(new PerfdataValue("passive_service_checks_1min", CIB::GetPassiveServiceChecksStatistics(60)));
+	perfdata->Add(new PerfdataValue("active_service_checks_5min", CIB::GetActiveServiceChecksStatistics(60 * 5)));
+	perfdata->Add(new PerfdataValue("passive_service_checks_5min", CIB::GetPassiveServiceChecksStatistics(60 * 5)));
+	perfdata->Add(new PerfdataValue("active_service_checks_15min", CIB::GetActiveServiceChecksStatistics(60 * 15)));
+	perfdata->Add(new PerfdataValue("passive_service_checks_15min", CIB::GetPassiveServiceChecksStatistics(60 * 15)));
 
 	CheckableCheckStatistics scs = CIB::CalculateServiceCheckStats();
 
-	perfdata->Add(make_shared<PerfdataValue>("min_latency", scs.min_latency));
-	perfdata->Add(make_shared<PerfdataValue>("max_latency", scs.max_latency));
-	perfdata->Add(make_shared<PerfdataValue>("avg_latency", scs.avg_latency));
-	perfdata->Add(make_shared<PerfdataValue>("min_execution_time", scs.min_latency));
-	perfdata->Add(make_shared<PerfdataValue>("max_execution_time", scs.max_latency));
-	perfdata->Add(make_shared<PerfdataValue>("avg_execution_time", scs.avg_execution_time));
+	perfdata->Add(new PerfdataValue("min_latency", scs.min_latency));
+	perfdata->Add(new PerfdataValue("max_latency", scs.max_latency));
+	perfdata->Add(new PerfdataValue("avg_latency", scs.avg_latency));
+	perfdata->Add(new PerfdataValue("min_execution_time", scs.min_latency));
+	perfdata->Add(new PerfdataValue("max_execution_time", scs.max_latency));
+	perfdata->Add(new PerfdataValue("avg_execution_time", scs.avg_execution_time));
 
 	ServiceStatistics ss = CIB::CalculateServiceStats();
 
-	perfdata->Add(make_shared<PerfdataValue>("num_services_ok", ss.services_ok));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_warning", ss.services_warning));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_critical", ss.services_critical));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_unknown", ss.services_unknown));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_pending", ss.services_pending));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_unreachable", ss.services_unreachable));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_flapping", ss.services_flapping));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_in_downtime", ss.services_in_downtime));
-	perfdata->Add(make_shared<PerfdataValue>("num_services_acknowledged", ss.services_acknowledged));
+	perfdata->Add(new PerfdataValue("num_services_ok", ss.services_ok));
+	perfdata->Add(new PerfdataValue("num_services_warning", ss.services_warning));
+	perfdata->Add(new PerfdataValue("num_services_critical", ss.services_critical));
+	perfdata->Add(new PerfdataValue("num_services_unknown", ss.services_unknown));
+	perfdata->Add(new PerfdataValue("num_services_pending", ss.services_pending));
+	perfdata->Add(new PerfdataValue("num_services_unreachable", ss.services_unreachable));
+	perfdata->Add(new PerfdataValue("num_services_flapping", ss.services_flapping));
+	perfdata->Add(new PerfdataValue("num_services_in_downtime", ss.services_in_downtime));
+	perfdata->Add(new PerfdataValue("num_services_acknowledged", ss.services_acknowledged));
 
 	double uptime = Utility::GetTime() - Application::GetStartTime();
-	perfdata->Add(make_shared<PerfdataValue>("uptime", uptime));
+	perfdata->Add(new PerfdataValue("uptime", uptime));
 
 	HostStatistics hs = CIB::CalculateHostStats();
 
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_up", hs.hosts_up));
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_down", hs.hosts_down));
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_unreachable", hs.hosts_unreachable));
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_flapping", hs.hosts_flapping));
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_in_downtime", hs.hosts_in_downtime));
-	perfdata->Add(make_shared<PerfdataValue>("num_hosts_acknowledged", hs.hosts_acknowledged));
+	perfdata->Add(new PerfdataValue("num_hosts_up", hs.hosts_up));
+	perfdata->Add(new PerfdataValue("num_hosts_down", hs.hosts_down));
+	perfdata->Add(new PerfdataValue("num_hosts_unreachable", hs.hosts_unreachable));
+	perfdata->Add(new PerfdataValue("num_hosts_flapping", hs.hosts_flapping));
+	perfdata->Add(new PerfdataValue("num_hosts_in_downtime", hs.hosts_in_downtime));
+	perfdata->Add(new PerfdataValue("num_hosts_acknowledged", hs.hosts_acknowledged));
 
 	cr->SetOutput("Icinga 2 has been running for " + Utility::FormatDuration(uptime) +
 	    ". Version: " + Application::GetVersion());
diff --git a/lib/methods/nullchecktask.cpp b/lib/methods/nullchecktask.cpp
index 4e378d353..2c52a9457 100644
--- a/lib/methods/nullchecktask.cpp
+++ b/lib/methods/nullchecktask.cpp
@@ -36,8 +36,8 @@ void NullCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResult:
 	String output = "Hello from ";
 	output += Utility::GetFQDN();
 
-	Array::Ptr perfdata = make_shared<Array>();
-	perfdata->Add(make_shared<PerfdataValue>("time", Convert::ToDouble(Utility::GetTime())));
+	Array::Ptr perfdata = new Array();
+	perfdata->Add(new PerfdataValue("time", Convert::ToDouble(Utility::GetTime())));
 
 	cr->SetOutput(output);
 	cr->SetPerformanceData(perfdata);
diff --git a/lib/methods/pluginnotificationtask.cpp b/lib/methods/pluginnotificationtask.cpp
index a10c0beab..ec192436a 100644
--- a/lib/methods/pluginnotificationtask.cpp
+++ b/lib/methods/pluginnotificationtask.cpp
@@ -44,7 +44,7 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification, c
 
 	Checkable::Ptr checkable = notification->GetCheckable();
 
-	Dictionary::Ptr notificationExtra = make_shared<Dictionary>();
+	Dictionary::Ptr notificationExtra = new Dictionary();
 	notificationExtra->Set("type", Notification::NotificationTypeToString(type));
 	notificationExtra->Set("author", author);
 	notificationExtra->Set("comment", comment);
diff --git a/lib/methods/randomchecktask.cpp b/lib/methods/randomchecktask.cpp
index a10e2634f..47a930a1a 100644
--- a/lib/methods/randomchecktask.cpp
+++ b/lib/methods/randomchecktask.cpp
@@ -36,8 +36,8 @@ void RandomCheckTask::ScriptFunc(const Checkable::Ptr& service, const CheckResul
 	String output = "Hello from ";
 	output += Utility::GetFQDN();
 
-	Array::Ptr perfdata = make_shared<Array>();
-	perfdata->Add(make_shared<PerfdataValue>("time", Convert::ToDouble(Utility::GetTime())));
+	Array::Ptr perfdata = new Array();
+	perfdata->Add(new PerfdataValue("time", Convert::ToDouble(Utility::GetTime())));
 
 	cr->SetOutput(output);
 	cr->SetPerformanceData(perfdata);
diff --git a/lib/methods/timeperiodtask.cpp b/lib/methods/timeperiodtask.cpp
index 7a21c0dab..7960ecd7c 100644
--- a/lib/methods/timeperiodtask.cpp
+++ b/lib/methods/timeperiodtask.cpp
@@ -27,17 +27,17 @@ REGISTER_SCRIPTFUNCTION(EvenMinutesTimePeriod, &TimePeriodTask::EvenMinutesTimeP
 
 Array::Ptr TimePeriodTask::EmptyTimePeriodUpdate(const TimePeriod::Ptr&, double, double)
 {
-	Array::Ptr segments = make_shared<Array>();
+	Array::Ptr segments = new Array();
 	return segments;
 }
 
 Array::Ptr TimePeriodTask::EvenMinutesTimePeriodUpdate(const TimePeriod::Ptr&, double begin, double end)
 {
-	Array::Ptr segments = make_shared<Array>();
+	Array::Ptr segments = new Array();
 
 	for (long t = begin / 60 - 1; t * 60 < end; t++) {
 		if ((t % 2) == 0) {
-			Dictionary::Ptr segment = make_shared<Dictionary>();
+			Dictionary::Ptr segment = new Dictionary();
 			segment->Set("begin", t * 60);
 			segment->Set("end", (t + 1) * 60);
 
diff --git a/lib/notification/notificationcomponent.cpp b/lib/notification/notificationcomponent.cpp
index 522e7a6e1..2be327054 100644
--- a/lib/notification/notificationcomponent.cpp
+++ b/lib/notification/notificationcomponent.cpp
@@ -36,7 +36,7 @@ REGISTER_STATSFUNCTION(NotificationComponentStats, &NotificationComponent::Stats
 
 Value NotificationComponent::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const NotificationComponent::Ptr& notification_component, DynamicType::GetObjectsByType<NotificationComponent>()) {
 		nodes->Set(notification_component->GetName(), 1); //add more stats
@@ -57,7 +57,7 @@ void NotificationComponent::Start(void)
 	Checkable::OnNotificationsRequested.connect(boost::bind(&NotificationComponent::SendNotificationsHandler, this, _1,
 	    _2, _3, _4, _5));
 
-	m_NotificationTimer = make_shared<Timer>();
+	m_NotificationTimer = new Timer();
 	m_NotificationTimer->SetInterval(5);
 	m_NotificationTimer->OnTimerExpired.connect(boost::bind(&NotificationComponent::NotificationTimerHandler, this));
 	m_NotificationTimer->Start();
diff --git a/lib/perfdata/graphitewriter.cpp b/lib/perfdata/graphitewriter.cpp
index defa0ae0e..7498f3f6c 100644
--- a/lib/perfdata/graphitewriter.cpp
+++ b/lib/perfdata/graphitewriter.cpp
@@ -48,7 +48,7 @@ REGISTER_STATSFUNCTION(GraphiteWriterStats, &GraphiteWriter::StatsFunc);
 
 Value GraphiteWriter::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const GraphiteWriter::Ptr& graphitewriter, DynamicType::GetObjectsByType<GraphiteWriter>()) {
 		nodes->Set(graphitewriter->GetName(), 1); //add more stats
@@ -63,7 +63,7 @@ void GraphiteWriter::Start(void)
 {
 	DynamicObject::Start();
 
-	m_ReconnectTimer = make_shared<Timer>();
+	m_ReconnectTimer = new Timer();
 	m_ReconnectTimer->SetInterval(10);
 	m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&GraphiteWriter::ReconnectTimerHandler, this));
 	m_ReconnectTimer->Start();
@@ -77,7 +77,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
 	if (m_Stream)
 		return;
 
-	TcpSocket::Ptr socket = make_shared<TcpSocket>();
+	TcpSocket::Ptr socket = new TcpSocket();
 
 	Log(LogNotice, "GraphiteWriter")
 	    << "Reconnecting to Graphite on host '" << GetHost() << "' port '" << GetPort() << "'.";
@@ -90,7 +90,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
 		return;
 	}
 
-	m_Stream = make_shared<NetworkStream>(socket);
+	m_Stream = new NetworkStream(socket);
 }
 
 void GraphiteWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
diff --git a/lib/perfdata/perfdatawriter.cpp b/lib/perfdata/perfdatawriter.cpp
index 05b4e059f..40575eac0 100644
--- a/lib/perfdata/perfdatawriter.cpp
+++ b/lib/perfdata/perfdatawriter.cpp
@@ -38,7 +38,7 @@ REGISTER_STATSFUNCTION(PerfdataWriterStats, &PerfdataWriter::StatsFunc);
 
 Value PerfdataWriter::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 
 	BOOST_FOREACH(const PerfdataWriter::Ptr& perfdatawriter, DynamicType::GetObjectsByType<PerfdataWriter>()) {
 		nodes->Set(perfdatawriter->GetName(), 1); //add more stats
@@ -55,7 +55,7 @@ void PerfdataWriter::Start(void)
 
 	Checkable::OnNewCheckResult.connect(boost::bind(&PerfdataWriter::CheckResultHandler, this, _1, _2));
 
-	m_RotationTimer = make_shared<Timer>();
+	m_RotationTimer = new Timer();
 	m_RotationTimer->OnTimerExpired.connect(boost::bind(&PerfdataWriter::RotationTimerHandler, this));
 	m_RotationTimer->SetInterval(GetRotationInterval());
 	m_RotationTimer->Start();
diff --git a/lib/remote/apiclient.cpp b/lib/remote/apiclient.cpp
index 5429599c8..9f54076fd 100644
--- a/lib/remote/apiclient.cpp
+++ b/lib/remote/apiclient.cpp
@@ -43,7 +43,7 @@ ApiClient::ApiClient(const String& identity, bool authenticated, const TlsStream
 
 void ApiClient::Start(void)
 {
-	boost::thread thread(boost::bind(&ApiClient::MessageThreadProc, static_cast<ApiClient::Ptr>(GetSelf())));
+	boost::thread thread(boost::bind(&ApiClient::MessageThreadProc, ApiClient::Ptr(this)));
 	thread.detach();
 }
 
@@ -81,7 +81,7 @@ void ApiClient::SendMessage(const Dictionary::Ptr& message)
 		return;
 	}
 
-	m_WriteQueue.Enqueue(boost::bind(&ApiClient::SendMessageSync, static_cast<ApiClient::Ptr>(GetSelf()), message));
+	m_WriteQueue.Enqueue(boost::bind(&ApiClient::SendMessageSync, ApiClient::Ptr(this), message));
 }
 
 void ApiClient::SendMessageSync(const Dictionary::Ptr& message)
@@ -107,7 +107,7 @@ void ApiClient::SendMessageSync(const Dictionary::Ptr& message)
 
 void ApiClient::Disconnect(void)
 {
-	Utility::QueueAsyncCallback(boost::bind(&ApiClient::DisconnectSync, static_cast<ApiClient::Ptr>(GetSelf())));
+	Utility::QueueAsyncCallback(boost::bind(&ApiClient::DisconnectSync, ApiClient::Ptr(this)));
 }
 
 void ApiClient::DisconnectSync(void)
@@ -116,10 +116,10 @@ void ApiClient::DisconnectSync(void)
 	    << "API client disconnected for identity '" << m_Identity << "'";
 
 	if (m_Endpoint)
-		m_Endpoint->RemoveClient(GetSelf());
+		m_Endpoint->RemoveClient(this);
 	else {
 		ApiListener::Ptr listener = ApiListener::GetInstance();
-		listener->RemoveAnonymousClient(GetSelf());
+		listener->RemoveAnonymousClient(this);
 	}
 
 	m_Stream->Close();
@@ -160,7 +160,7 @@ bool ApiClient::ProcessMessage(void)
 	}
 
 	MessageOrigin origin;
-	origin.FromClient = GetSelf();
+	origin.FromClient = this;
 
 	if (m_Endpoint) {
 		if (m_Endpoint->GetZone() != Zone::GetLocalZone())
@@ -174,7 +174,7 @@ bool ApiClient::ProcessMessage(void)
 	Log(LogNotice, "ApiClient")
 	    << "Received '" << method << "' message from '" << m_Identity << "'";
 
-	Dictionary::Ptr resultMessage = make_shared<Dictionary>();
+	Dictionary::Ptr resultMessage = new Dictionary();
 
 	try {
 		ApiFunction::Ptr afunc = ApiFunction::GetByName(method);
@@ -243,7 +243,7 @@ Value RequestCertificateHandler(const MessageOrigin& origin, const Dictionary::P
 	ApiListener::Ptr listener = ApiListener::GetInstance();
 	String salt = listener->GetTicketSalt();
 
-	Dictionary::Ptr result = make_shared<Dictionary>();
+	Dictionary::Ptr result = new Dictionary();
 
 	if (salt.IsEmpty()) {
 		result->Set("error", "Ticket salt is not configured.");
@@ -258,16 +258,16 @@ Value RequestCertificateHandler(const MessageOrigin& origin, const Dictionary::P
 		return result;
 	}
 
-	shared_ptr<X509> cert = origin.FromClient->GetStream()->GetPeerCertificate();
+	boost::shared_ptr<X509> cert = origin.FromClient->GetStream()->GetPeerCertificate();
 
 	EVP_PKEY *pubkey = X509_get_pubkey(cert.get());
 	X509_NAME *subject = X509_get_subject_name(cert.get());
 
-	shared_ptr<X509> newcert = CreateCertIcingaCA(pubkey, subject);
+	boost::shared_ptr<X509> newcert = CreateCertIcingaCA(pubkey, subject);
 	result->Set("cert", CertificateToString(newcert));
 
 	String cacertfile = GetIcingaCADir() + "/ca.crt";
-	shared_ptr<X509> cacert = GetX509Certificate(cacertfile);
+	boost::shared_ptr<X509> cacert = GetX509Certificate(cacertfile);
 	result->Set("ca", CertificateToString(cacert));
 
 	return result;
diff --git a/lib/remote/apifunction.cpp b/lib/remote/apifunction.cpp
index bbb6fa4fc..2e427df22 100644
--- a/lib/remote/apifunction.cpp
+++ b/lib/remote/apifunction.cpp
@@ -33,7 +33,7 @@ Value ApiFunction::Invoke(const MessageOrigin& origin, const Dictionary::Ptr& ar
 
 RegisterApiFunctionHelper::RegisterApiFunctionHelper(const String& name, const ApiFunction::Callback& function)
 {
-	ApiFunction::Ptr func = make_shared<ApiFunction>(function);
+	ApiFunction::Ptr func = new ApiFunction(function);
 	ApiFunctionRegistry::GetInstance()->Register(name, func);
 }
 
diff --git a/lib/remote/apilistener-sync.cpp b/lib/remote/apilistener-sync.cpp
index d0a524247..310a35cff 100644
--- a/lib/remote/apilistener-sync.cpp
+++ b/lib/remote/apilistener-sync.cpp
@@ -52,7 +52,7 @@ void ApiListener::ConfigGlobHandler(Dictionary::Ptr& config, const String& path,
 
 Dictionary::Ptr ApiListener::LoadConfigDir(const String& dir)
 {
-	Dictionary::Ptr config = make_shared<Dictionary>();
+	Dictionary::Ptr config = new Dictionary();
 	Utility::GlobRecursive(dir, "*.conf", boost::bind(&ApiListener::ConfigGlobHandler, boost::ref(config), dir, _1), GlobFile);
 	return config;
 }
@@ -155,7 +155,7 @@ void ApiListener::SendConfigUpdate(const ApiClient::Ptr& aclient)
 	if (!azone->IsChildOf(lzone))
 		return;
 
-	Dictionary::Ptr configUpdate = make_shared<Dictionary>();
+	Dictionary::Ptr configUpdate = new Dictionary();
 
 	String zonesDir = Application::GetLocalStateDir() + "/lib/icinga2/api/zones";
 
@@ -180,10 +180,10 @@ void ApiListener::SendConfigUpdate(const ApiClient::Ptr& aclient)
 		configUpdate->Set(zone->GetName(), LoadConfigDir(zonesDir + "/" + zone->GetName()));
 	}
 
-	Dictionary::Ptr params = make_shared<Dictionary>();
+	Dictionary::Ptr params = new Dictionary();
 	params->Set("update", configUpdate);
 
-	Dictionary::Ptr message = make_shared<Dictionary>();
+	Dictionary::Ptr message = new Dictionary();
 	message->Set("jsonrpc", "2.0");
 	message->Set("method", "config::Update");
 	message->Set("params", params);
diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp
index da204dd96..5fb31b647 100644
--- a/lib/remote/apilistener.cpp
+++ b/lib/remote/apilistener.cpp
@@ -43,7 +43,7 @@ REGISTER_STATSFUNCTION(ApiListenerStats, &ApiListener::StatsFunc);
 void ApiListener::OnConfigLoaded(void)
 {
 	/* set up SSL context */
-	shared_ptr<X509> cert;
+	boost::shared_ptr<X509> cert;
 	try {
 		cert = GetX509Certificate(GetCertPath());
 	} catch (const std::exception&) {
@@ -115,7 +115,7 @@ void ApiListener::Start(void)
 		Application::Exit(EXIT_FAILURE);
 	}
 
-	m_Timer = make_shared<Timer>();
+	m_Timer = new Timer();
 	m_Timer->OnTimerExpired.connect(boost::bind(&ApiListener::ApiTimerHandler, this));
 	m_Timer->SetInterval(5);
 	m_Timer->Start();
@@ -132,7 +132,7 @@ ApiListener::Ptr ApiListener::GetInstance(void)
 	return ApiListener::Ptr();
 }
 
-shared_ptr<SSL_CTX> ApiListener::GetSSLContext(void) const
+boost::shared_ptr<SSL_CTX> ApiListener::GetSSLContext(void) const
 {
 	return m_SSLContext;
 }
@@ -175,7 +175,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
 {
 	ObjectLock olock(this);
 
-	shared_ptr<SSL_CTX> sslContext = m_SSLContext;
+	boost::shared_ptr<SSL_CTX> sslContext = m_SSLContext;
 
 	if (!sslContext) {
 		Log(LogCritical, "ApiListener", "SSL context is required for AddListener()");
@@ -185,7 +185,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
 	Log(LogInformation, "ApiListener")
 	    << "Adding new listener on port '" << service << "'";
 
-	TcpSocket::Ptr server = make_shared<TcpSocket>();
+	TcpSocket::Ptr server = new TcpSocket();
 
 	try {
 		server->Bind(node, service, AF_UNSPEC);
@@ -229,7 +229,7 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
 	{
 		ObjectLock olock(this);
 
-		shared_ptr<SSL_CTX> sslContext = m_SSLContext;
+		boost::shared_ptr<SSL_CTX> sslContext = m_SSLContext;
 
 		if (!sslContext) {
 			Log(LogCritical, "ApiListener", "SSL context is required for AddConnection()");
@@ -243,7 +243,7 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
 	Log(LogInformation, "ApiClient")
 	    << "Reconnecting to API endpoint '" << endpoint->GetName() << "' via host '" << host << "' and port '" << port << "'";
 
-	TcpSocket::Ptr client = make_shared<TcpSocket>();
+	TcpSocket::Ptr client = new TcpSocket();
 
 	try {
 		endpoint->SetConnecting(true);
@@ -276,7 +276,7 @@ void ApiListener::NewClientHandler(const Socket::Ptr& client, ConnectionRole rol
 	{
 		ObjectLock olock(this);
 		try {
-			tlsStream = make_shared<TlsStream>(client, role, m_SSLContext);
+			tlsStream = new TlsStream(client, role, m_SSLContext);
 		} catch (const std::exception&) {
 			Log(LogCritical, "ApiListener", "Cannot create TLS stream from client connection.");
 			return;
@@ -290,7 +290,7 @@ void ApiListener::NewClientHandler(const Socket::Ptr& client, ConnectionRole rol
 		return;
 	}
 
-	shared_ptr<X509> cert = tlsStream->GetPeerCertificate();
+	boost::shared_ptr<X509> cert = tlsStream->GetPeerCertificate();
 	String identity;
 
 	try {
@@ -316,7 +316,7 @@ void ApiListener::NewClientHandler(const Socket::Ptr& client, ConnectionRole rol
 	if (endpoint)
 		need_sync = !endpoint->IsConnected();
 
-	ApiClient::Ptr aclient = make_shared<ApiClient>(identity, verify_ok, tlsStream, role);
+	ApiClient::Ptr aclient = new ApiClient(identity, verify_ok, tlsStream, role);
 	aclient->Start();
 
 	if (endpoint) {
@@ -417,10 +417,10 @@ void ApiListener::ApiTimerHandler(void)
 		if (ts == 0)
 			continue;
 
-		Dictionary::Ptr lparams = make_shared<Dictionary>();
+		Dictionary::Ptr lparams = new Dictionary();
 		lparams->Set("log_position", ts);
 
-		Dictionary::Ptr lmessage = make_shared<Dictionary>();
+		Dictionary::Ptr lmessage = new Dictionary();
 		lmessage->Set("jsonrpc", "2.0");
 		lmessage->Set("method", "log::SetLogPosition");
 		lmessage->Set("params", lparams);
@@ -459,12 +459,12 @@ void ApiListener::PersistMessage(const Dictionary::Ptr& message, const DynamicOb
 
 	ASSERT(ts != 0);
 
-	Dictionary::Ptr pmessage = make_shared<Dictionary>();
+	Dictionary::Ptr pmessage = new Dictionary();
 	pmessage->Set("timestamp", ts);
 
 	pmessage->Set("message", JsonEncode(message));
 	
-	Dictionary::Ptr secname = make_shared<Dictionary>();
+	Dictionary::Ptr secname = new Dictionary();
 	secname->Set("type", secobj->GetType()->GetName());
 	secname->Set("name", secobj->GetName());
 	pmessage->Set("secobj", secname);
@@ -583,7 +583,7 @@ void ApiListener::OpenLogFile(void)
 		return;
 	}
 
-	m_LogFile = make_shared<StdioStream>(fp, true);
+	m_LogFile = new StdioStream(fp, true);
 	m_LogMessageCount = 0;
 	SetLogMessageTimestamp(Utility::GetTime());
 }
@@ -674,7 +674,7 @@ void ApiListener::ReplayLog(const ApiClient::Ptr& client)
 			    << "Replaying log: " << path;
 
 			std::fstream *fp = new std::fstream(path.CStr(), std::fstream::in);
-			StdioStream::Ptr logStream = make_shared<StdioStream>(fp, true);
+			StdioStream::Ptr logStream = new StdioStream(fp, true);
 
 			String message;
 			while (true) {
@@ -740,7 +740,7 @@ void ApiListener::ReplayLog(const ApiClient::Ptr& client)
 
 Value ApiListener::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
 {
-	Dictionary::Ptr nodes = make_shared<Dictionary>();
+	Dictionary::Ptr nodes = new Dictionary();
 	std::pair<Dictionary::Ptr, Dictionary::Ptr> stats;
 
 	ApiListener::Ptr listener = ApiListener::GetInstance();
@@ -760,15 +760,15 @@ Value ApiListener::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
 
 std::pair<Dictionary::Ptr, Dictionary::Ptr> ApiListener::GetStatus(void)
 {
-	Dictionary::Ptr status = make_shared<Dictionary>();
-	Dictionary::Ptr perfdata = make_shared<Dictionary>();
+	Dictionary::Ptr status = new Dictionary();
+	Dictionary::Ptr perfdata = new Dictionary();
 
 	/* cluster stats */
 	status->Set("identity", GetIdentity());
 
 	double count_endpoints = 0;
-	Array::Ptr not_connected_endpoints = make_shared<Array>();
-	Array::Ptr connected_endpoints = make_shared<Array>();
+	Array::Ptr not_connected_endpoints = new Array();
+	Array::Ptr connected_endpoints = new Array();
 
 	BOOST_FOREACH(const Endpoint::Ptr& endpoint, DynamicType::GetObjectsByType<Endpoint>()) {
 		if (endpoint->GetName() == GetIdentity())
diff --git a/lib/remote/apilistener.hpp b/lib/remote/apilistener.hpp
index deea3e746..de1d8a7ab 100644
--- a/lib/remote/apilistener.hpp
+++ b/lib/remote/apilistener.hpp
@@ -49,7 +49,7 @@ public:
 
 	static ApiListener::Ptr GetInstance(void);
 
-	shared_ptr<SSL_CTX> GetSSLContext(void) const;
+	boost::shared_ptr<SSL_CTX> GetSSLContext(void) const;
 
 	Endpoint::Ptr GetMaster(void) const;
 	bool IsMaster(void) const;
@@ -72,7 +72,7 @@ protected:
 	virtual void Start(void);
 
 private:
-	shared_ptr<SSL_CTX> m_SSLContext;
+	boost::shared_ptr<SSL_CTX> m_SSLContext;
 	std::set<TcpSocket::Ptr> m_Servers;
 	std::set<ApiClient::Ptr> m_AnonymousClients;
 	Timer::Ptr m_Timer;
diff --git a/lib/remote/authority.cpp b/lib/remote/authority.cpp
index 6b4b60d9d..7a90ef6f3 100644
--- a/lib/remote/authority.cpp
+++ b/lib/remote/authority.cpp
@@ -69,7 +69,7 @@ static void AuthorityTimerHandler(void)
 
 static void StaticInitialize(void)
 {
-	l_AuthorityTimer = make_shared<Timer>();
+	l_AuthorityTimer = new Timer();
 	l_AuthorityTimer->OnTimerExpired.connect(boost::bind(&AuthorityTimerHandler));
 	l_AuthorityTimer->SetInterval(30);
 	l_AuthorityTimer->Start();
diff --git a/lib/remote/endpoint.cpp b/lib/remote/endpoint.cpp
index 4b66d8393..35a28486f 100644
--- a/lib/remote/endpoint.cpp
+++ b/lib/remote/endpoint.cpp
@@ -44,7 +44,7 @@ void Endpoint::OnConfigLoaded(void)
 		if (members.empty())
 			continue;
 
-		if (members.find(GetSelf()) != members.end()) {
+		if (members.find(this) != members.end()) {
 			if (m_Zone)
 				BOOST_THROW_EXCEPTION(std::runtime_error("Endpoint '" + GetName() + "' is in more than one zone."));
 
@@ -70,7 +70,7 @@ void Endpoint::AddClient(const ApiClient::Ptr& client)
 	if (was_master != is_master)
 		ApiListener::OnMasterChanged(is_master);
 
-	OnConnected(GetSelf(), client);
+	OnConnected(this, client);
 }
 
 void Endpoint::RemoveClient(const ApiClient::Ptr& client)
@@ -90,7 +90,7 @@ void Endpoint::RemoveClient(const ApiClient::Ptr& client)
 	if (was_master != is_master)
 		ApiListener::OnMasterChanged(is_master);
 
-	OnDisconnected(GetSelf(), client);
+	OnDisconnected(this, client);
 }
 
 std::set<ApiClient::Ptr> Endpoint::GetClients(void) const
diff --git a/lib/remote/endpoint.hpp b/lib/remote/endpoint.hpp
index ee92088c7..1f4463400 100644
--- a/lib/remote/endpoint.hpp
+++ b/lib/remote/endpoint.hpp
@@ -41,14 +41,14 @@ public:
 	DECLARE_OBJECT(Endpoint);
 	DECLARE_OBJECTNAME(Endpoint);
 
-	static boost::signals2::signal<void(const Endpoint::Ptr&, const shared_ptr<ApiClient>&)> OnConnected;
-	static boost::signals2::signal<void(const Endpoint::Ptr&, const shared_ptr<ApiClient>&)> OnDisconnected;
+	static boost::signals2::signal<void(const Endpoint::Ptr&, const intrusive_ptr<ApiClient>&)> OnConnected;
+	static boost::signals2::signal<void(const Endpoint::Ptr&, const intrusive_ptr<ApiClient>&)> OnDisconnected;
 
-	void AddClient(const shared_ptr<ApiClient>& client);
-	void RemoveClient(const shared_ptr<ApiClient>& client);
-	std::set<shared_ptr<ApiClient> > GetClients(void) const;
+	void AddClient(const intrusive_ptr<ApiClient>& client);
+	void RemoveClient(const intrusive_ptr<ApiClient>& client);
+	std::set<intrusive_ptr<ApiClient> > GetClients(void) const;
 
-	shared_ptr<Zone> GetZone(void) const;
+	intrusive_ptr<Zone> GetZone(void) const;
 
 	bool IsConnected(void) const;
 
@@ -59,8 +59,8 @@ protected:
 
 private:
 	mutable boost::mutex m_ClientsLock;
-	std::set<shared_ptr<ApiClient> > m_Clients;
-	shared_ptr<Zone> m_Zone;
+	std::set<intrusive_ptr<ApiClient> > m_Clients;
+	intrusive_ptr<Zone> m_Zone;
 };
 
 }
diff --git a/lib/remote/zone.cpp b/lib/remote/zone.cpp
index e720ba24a..8be1c3f31 100644
--- a/lib/remote/zone.cpp
+++ b/lib/remote/zone.cpp
@@ -18,6 +18,7 @@
  ******************************************************************************/
 
 #include "remote/zone.hpp"
+#include "remote/apiclient.hpp"
 #include "base/objectlock.hpp"
 #include <boost/foreach.hpp>
 
@@ -64,12 +65,12 @@ bool Zone::CanAccessObject(const DynamicObject::Ptr& object)
 	if (!object_zone)
 		object_zone = Zone::GetLocalZone();
 
-	return object_zone->IsChildOf(GetSelf());
+	return object_zone->IsChildOf(this);
 }
 
 bool Zone::IsChildOf(const Zone::Ptr& zone)
 {
-	Zone::Ptr azone = GetSelf();
+	Zone::Ptr azone = this;
 
 	while (azone) {
 		if (azone == zone)
@@ -81,7 +82,7 @@ bool Zone::IsChildOf(const Zone::Ptr& zone)
 	return false;
 }
 
-bool Zone::IsGlobal(void)
+bool Zone::IsGlobal(void) const
 {
 	return GetGlobal();
 }
diff --git a/lib/remote/zone.hpp b/lib/remote/zone.hpp
index ea1ab7464..41c9d9b5f 100644
--- a/lib/remote/zone.hpp
+++ b/lib/remote/zone.hpp
@@ -41,7 +41,7 @@ public:
 
 	bool CanAccessObject(const DynamicObject::Ptr& object);
 	bool IsChildOf(const Zone::Ptr& zone);
-	bool IsGlobal(void);
+	bool IsGlobal(void) const;
 
 	static Zone::Ptr GetLocalZone(void);
 };
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index d2e158b52..099cec27e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -59,7 +59,6 @@ add_boost_test(base
         base_netstring/netstring
         base_object/construct
         base_object/getself
-        base_object/weak
         base_serialize/scalar
         base_serialize/array
         base_serialize/dictionary
diff --git a/test/base-array.cpp b/test/base-array.cpp
index e58cc9e21..6e2077b85 100644
--- a/test/base-array.cpp
+++ b/test/base-array.cpp
@@ -29,14 +29,14 @@ BOOST_AUTO_TEST_SUITE(base_array)
 
 BOOST_AUTO_TEST_CASE(construct)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	BOOST_CHECK(array);
 	BOOST_CHECK(array->GetLength() == 0);
 }
 
 BOOST_AUTO_TEST_CASE(getset)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(2);
 	array->Add(5);
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(getset)
 
 BOOST_AUTO_TEST_CASE(insert)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 
 	array->Insert(0, 11);
 	array->Insert(1, 22);
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(insert)
 
 BOOST_AUTO_TEST_CASE(remove)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(2);
 	array->Add(5);
@@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE(remove)
 
 BOOST_AUTO_TEST_CASE(foreach)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(2);
 	array->Add(5);
@@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(foreach)
 
 BOOST_AUTO_TEST_CASE(clone)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(2);
 	array->Add(5);
@@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(clone)
 
 BOOST_AUTO_TEST_CASE(json)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(2);
 	array->Add(5);
diff --git a/test/base-dictionary.cpp b/test/base-dictionary.cpp
index f140d5a2a..99990e92a 100644
--- a/test/base-dictionary.cpp
+++ b/test/base-dictionary.cpp
@@ -30,13 +30,13 @@ BOOST_AUTO_TEST_SUITE(base_dictionary)
 
 BOOST_AUTO_TEST_CASE(construct)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 	BOOST_CHECK(dictionary);
 }
 
 BOOST_AUTO_TEST_CASE(get1)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 	dictionary->Set("test1", 7);
 	dictionary->Set("test2", "hello world");
 
@@ -58,8 +58,8 @@ BOOST_AUTO_TEST_CASE(get1)
 
 BOOST_AUTO_TEST_CASE(get2)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
-	Dictionary::Ptr other = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
+	Dictionary::Ptr other = new Dictionary();
 
 	dictionary->Set("test1", other);
 
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(get2)
 
 BOOST_AUTO_TEST_CASE(foreach)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 	dictionary->Set("test1", 7);
 	dictionary->Set("test2", "hello world");
 
@@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE(foreach)
 
 BOOST_AUTO_TEST_CASE(remove)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 
 	dictionary->Set("test1", 7);
 	dictionary->Set("test2", "hello world");
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE(remove)
 
 BOOST_AUTO_TEST_CASE(clone)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 
 	dictionary->Set("test1", 7);
 	dictionary->Set("test2", "hello world");
@@ -167,7 +167,7 @@ BOOST_AUTO_TEST_CASE(clone)
 
 BOOST_AUTO_TEST_CASE(json)
 {
-	Dictionary::Ptr dictionary = make_shared<Dictionary>();
+	Dictionary::Ptr dictionary = new Dictionary();
 
 	dictionary->Set("test1", 7);
 	dictionary->Set("test2", "hello world");
diff --git a/test/base-fifo.cpp b/test/base-fifo.cpp
index abe88b1c8..c80fd4b5f 100644
--- a/test/base-fifo.cpp
+++ b/test/base-fifo.cpp
@@ -28,7 +28,7 @@ BOOST_AUTO_TEST_SUITE(base_fifo)
 
 BOOST_AUTO_TEST_CASE(construct)
 {
-	FIFO::Ptr fifo = make_shared<FIFO>();
+	FIFO::Ptr fifo = new FIFO();
 	BOOST_CHECK(fifo);
 	BOOST_CHECK(fifo->GetAvailableBytes() == 0);
 
@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(construct)
 
 BOOST_AUTO_TEST_CASE(io)
 {
-	FIFO::Ptr fifo = make_shared<FIFO>();
+	FIFO::Ptr fifo = new FIFO();
 
 	fifo->Write("hello", 5);
 	BOOST_CHECK(fifo->GetAvailableBytes() == 5);
diff --git a/test/base-netstring.cpp b/test/base-netstring.cpp
index 94becf4d2..47799fed1 100644
--- a/test/base-netstring.cpp
+++ b/test/base-netstring.cpp
@@ -27,7 +27,7 @@ BOOST_AUTO_TEST_SUITE(base_netstring)
 
 BOOST_AUTO_TEST_CASE(netstring)
 {
-	FIFO::Ptr fifo = make_shared<FIFO>();
+	FIFO::Ptr fifo = new FIFO();
 
 	NetString::WriteStringToStream(fifo, "hello");
 
diff --git a/test/base-object.cpp b/test/base-object.cpp
index 8be052703..b67dd12d3 100644
--- a/test/base-object.cpp
+++ b/test/base-object.cpp
@@ -30,7 +30,7 @@ public:
 
 	TestObject::Ptr GetTestRef(void)
 	{
-		return GetSelf();
+		return this;
 	}
 };
 
@@ -38,13 +38,13 @@ BOOST_AUTO_TEST_SUITE(base_object)
 
 BOOST_AUTO_TEST_CASE(construct)
 {
-	Object::Ptr tobject = make_shared<TestObject>();
+	Object::Ptr tobject = new TestObject();
 	BOOST_CHECK(tobject);
 }
 
 BOOST_AUTO_TEST_CASE(getself)
 {
-	TestObject::Ptr tobject = make_shared<TestObject>();
+	TestObject::Ptr tobject = new TestObject();
 	TestObject::Ptr tobject_self = tobject->GetTestRef();
 	BOOST_CHECK(tobject == tobject_self);
 
@@ -53,13 +53,4 @@ BOOST_AUTO_TEST_CASE(getself)
 	BOOST_CHECK(vobject.IsObjectType<TestObject>());
 }
 
-BOOST_AUTO_TEST_CASE(weak)
-{
-	TestObject::Ptr tobject = make_shared<TestObject>();
-	TestObject::WeakPtr wtobject = tobject;
-	tobject.reset();
-	BOOST_CHECK(!tobject);
-	BOOST_CHECK(!wtobject.lock());
-}
-
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/test/base-serialize.cpp b/test/base-serialize.cpp
index 26d6dc471..7be2c08d9 100644
--- a/test/base-serialize.cpp
+++ b/test/base-serialize.cpp
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(scalar)
 
 BOOST_AUTO_TEST_CASE(array)
 {
-	Array::Ptr array = make_shared<Array>();
+	Array::Ptr array = new Array();
 	array->Add(7);
 	array->Add(7.3);
 	array->Add(Empty);
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(array)
 
 BOOST_AUTO_TEST_CASE(dictionary)
 {
-	Dictionary::Ptr dict = make_shared<Dictionary>();
+	Dictionary::Ptr dict = new Dictionary();
 	dict->Set("k1", 7);
 	dict->Set("k2", 7.3);
 	dict->Set("k3", Empty);
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(dictionary)
 
 BOOST_AUTO_TEST_CASE(object)
 {
-	PerfdataValue::Ptr pdv = make_shared<PerfdataValue>("size", 100, true, "bytes");
+	PerfdataValue::Ptr pdv = new PerfdataValue("size", 100, true, "bytes");
 
 	PerfdataValue::Ptr result = Deserialize(Serialize(pdv));
 
diff --git a/test/base-stream.cpp b/test/base-stream.cpp
index 3b523375a..5dc3c42f7 100644
--- a/test/base-stream.cpp
+++ b/test/base-stream.cpp
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(readline_stdio)
 	std::stringstream msgbuf;
 	msgbuf << "Hello\nWorld\n\n";
 
-	StdioStream::Ptr stdstream = make_shared<StdioStream>(&msgbuf, false);
+	StdioStream::Ptr stdstream = new StdioStream(&msgbuf, false);
 
 	ReadLineContext rlc;
 
diff --git a/test/base-timer.cpp b/test/base-timer.cpp
index d7b1380c7..115d9542a 100644
--- a/test/base-timer.cpp
+++ b/test/base-timer.cpp
@@ -42,13 +42,13 @@ BOOST_FIXTURE_TEST_SUITE(base_timer, TimerFixture)
 
 BOOST_AUTO_TEST_CASE(construct)
 {
-	Timer::Ptr timer = make_shared<Timer>();
+	Timer::Ptr timer = new Timer();
 	BOOST_CHECK(timer);
 }
 
 BOOST_AUTO_TEST_CASE(interval)
 {
-	Timer::Ptr timer = make_shared<Timer>();
+	Timer::Ptr timer = new Timer();
 	timer->SetInterval(1.5);
 	BOOST_CHECK(timer->GetInterval() == 1.5);
 }
@@ -61,7 +61,7 @@ static void Callback(int *counter)
 BOOST_AUTO_TEST_CASE(invoke)
 {
 	int counter;
-	Timer::Ptr timer = make_shared<Timer>();
+	Timer::Ptr timer = new Timer();
 	timer->OnTimerExpired.connect(boost::bind(&Callback, &counter));
 	timer->SetInterval(1);
 
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(invoke)
 BOOST_AUTO_TEST_CASE(scope)
 {
 	int counter;
-	Timer::Ptr timer = make_shared<Timer>();
+	Timer::Ptr timer = new Timer();
 	timer->OnTimerExpired.connect(boost::bind(&Callback, &counter));
 	timer->SetInterval(1);