diff --git a/reclass/mergers/__init__.py b/reclass/mergers/__init__.py
deleted file mode 100644
index 6329757..0000000
--- a/reclass/mergers/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
diff --git a/reclass/mergers/base.py b/reclass/mergers/base.py
deleted file mode 100644
index b9a23dc..0000000
--- a/reclass/mergers/base.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-class BaseMerger(object):
-
-    def merge(self, first, second):
-        raise NotImplementedError
diff --git a/reclass/mergers/dict/__init__.py b/reclass/mergers/dict/__init__.py
deleted file mode 100644
index 8346017..0000000
--- a/reclass/mergers/dict/__init__.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from update import DictUpdate
-from recursive_update import DictRecursiveUpdate
-from recursive_policy_update import DictRecursivePolicyUpdate
diff --git a/reclass/mergers/dict/base.py b/reclass/mergers/dict/base.py
deleted file mode 100644
index ddf764d..0000000
--- a/reclass/mergers/dict/base.py
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from reclass.mergers.base import BaseMerger
-
-class BaseDictMerger(BaseMerger):
-    pass
diff --git a/reclass/mergers/dict/recursive_policy_update.py b/reclass/mergers/dict/recursive_policy_update.py
deleted file mode 100644
index e280889..0000000
--- a/reclass/mergers/dict/recursive_policy_update.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from base import BaseDictMerger
-
-class DictRecursivePolicyUpdate(BaseDictMerger):
-
-    def __init__(self, policy=None):
-        super(DictRecursivePolicyUpdate, self).__init__()
-        if policy is None:
-            first = lambda first, second: first
-            second = lambda first, second: second
-
-            policy = {(dict,dict)       : self.merge,
-                      (list,list)       : lambda x,y: x+y,
-                      (dict,list)       : lambda x,y: self.merge(x, dict(y)),
-                      (dict,type(None)) : first,
-                      (list,type(None)) : first,
-                      None              : second
-                     }
-        self._policy = policy
-
-    def merge(self, first, second):
-        if second is None:
-            return first
-
-        ret = first.copy()
-        for k,v in second.iteritems():
-            if k in ret:
-                lookup = (type(ret[k]), type(v))
-                pfn = self._policy.get(lookup, self._policy.get(None))
-                ret[k] = pfn(ret[k], v)
-            else:
-                ret[k] = v
-        return ret
diff --git a/reclass/mergers/dict/recursive_update.py b/reclass/mergers/dict/recursive_update.py
deleted file mode 100644
index fc1d425..0000000
--- a/reclass/mergers/dict/recursive_update.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from base import BaseDictMerger
-
-class DictRecursiveUpdate(BaseDictMerger):
-
-    def merge(self, first, second):
-        if second is None:
-            return first
-
-        ret = first.copy()
-        for k,v in second.iteritems():
-            if k in ret:
-                if isinstance(ret[k], dict):
-                    if isinstance(v, (list, tuple)):
-                        v = dict(v)
-                    ret[k] = self.merge(ret[k], v)
-                else:
-                    ret[k] = v
-            else:
-                ret[k] = v
-        return ret
diff --git a/reclass/mergers/dict/tests/test_recursive_policy_update.py b/reclass/mergers/dict/tests/test_recursive_policy_update.py
deleted file mode 100644
index e9e1f31..0000000
--- a/reclass/mergers/dict/tests/test_recursive_policy_update.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from test_recursive_update import TestDictRecursiveUpdate
-from reclass.mergers.dict import DictRecursivePolicyUpdate
-
-class TestDictRecursivePolicyUpdate(TestDictRecursiveUpdate):
-
-    def setUp(self):
-        self.merger = DictRecursivePolicyUpdate()
-
-    def test_nested_lists_extend(self):
-        first = {'one': [1,2],
-                 'two': {'one': [1,2]}}
-        second = {'one': [3,4], 
-                  'two': {'one': [3,4]}}
-        ret = self.merger.merge(first, second)
-        assert len(ret['one']) == 4
-        assert ret['one'][2] == 3
-        assert len(ret['two']['one']) == 4
-        assert ret['two']['one'][3] == 4
-
-    def test_merge_with_none(self):
-        first = {1:2,3:4}
-        ret = self.merger.merge(first, None)
-        assert ret == first
diff --git a/reclass/mergers/dict/tests/test_recursive_update.py b/reclass/mergers/dict/tests/test_recursive_update.py
deleted file mode 100644
index 12d2348..0000000
--- a/reclass/mergers/dict/tests/test_recursive_update.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from test_update import TestDictUpdate
-from reclass.mergers.dict import DictRecursiveUpdate
-
-class TestDictRecursiveUpdate(TestDictUpdate):
-
-    def setUp(self):
-        self.merger = DictRecursiveUpdate()
-
-    def test_simple_recursive_dict_update(self):
-        first = {'one':{1:1,2:3,3:2}}
-        second = {'one':{2:2,3:3,4:4}}
-        ret = self.merger.merge(first, second)
-        assert len(ret) == 1
-        for k,v in ret['one'].iteritems():
-            assert k == v
-
-    def test_complex_recursive_dict_update(self):
-        first = {'one': 1,
-                 'two': {'a':92,'b':94},
-                 'three': {'third':0.33,'two thirds':0.67},
-                 'four': {1:{1:1},2:{2:2},3:{3:4}}
-                }
-        second = {'five': 5,
-                  'one': 1,
-                  'two': {'b':93,'c':94},
-                  'four': {4:{4:4}, 3:{3:3}},
-                 }
-        ret = self.merger.merge(first, second)
-        assert ret['one'] == 1
-        assert len(ret['two']) == 3
-        assert ret['two']['b'] == 93
-        assert len(ret['three']) == 2
-        assert len(ret['four']) == 4
-        for i in range(1,4):
-            assert len(ret['four'][i]) == 1
-            for k,v in ret['four'][i].iteritems():
-                assert k == v
-
-    def test_merge_with_none(self):
-        first = {1:2,3:4}
-        ret = self.merger.merge(first, None)
-        assert ret == first
diff --git a/reclass/mergers/dict/tests/test_update.py b/reclass/mergers/dict/tests/test_update.py
deleted file mode 100644
index 3dcbfd9..0000000
--- a/reclass/mergers/dict/tests/test_update.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from reclass.mergers.dict import DictUpdate
-
-class TestDictUpdate:
-
-    def setUp(self):
-        self.merger = DictUpdate()
-
-    def test_dict_update(self):
-        first = {1:1,2:3,3:2}
-        second = {2:2,3:3,4:4}
-        ret = self.merger.merge(first, second)
-        assert len(ret) == 4
-        for k,v in ret.iteritems():
-            assert k == v
-
-    def test_merge_with_none(self):
-        first = {1:2,3:4}
-        ret = self.merger.merge(first, None)
-        assert ret == first
diff --git a/reclass/mergers/dict/update.py b/reclass/mergers/dict/update.py
deleted file mode 100644
index 69e849d..0000000
--- a/reclass/mergers/dict/update.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from base import BaseDictMerger
-
-class DictUpdate(BaseDictMerger):
-
-    def merge(self, first, second):
-        if second is None:
-            return first
-
-        ret = first.copy()
-        ret.update(second)
-        return ret
diff --git a/reclass/mergers/list/__init__.py b/reclass/mergers/list/__init__.py
deleted file mode 100644
index 51ee818..0000000
--- a/reclass/mergers/list/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from extend import ListExtend
-from set import SetExtend
diff --git a/reclass/mergers/list/base.py b/reclass/mergers/list/base.py
deleted file mode 100644
index 9b2388c..0000000
--- a/reclass/mergers/list/base.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from reclass.mergers.base import BaseMerger
-
-class BaseListMerger(BaseMerger):
-
-    def merge(self, first, second):
-        first = [first] if not isinstance(first, list) else first[:]
-        if second is None:
-            return first
-        second = [second] if not isinstance(second, list) else second[:]
-        return self._combine(first, second)
diff --git a/reclass/mergers/list/extend.py b/reclass/mergers/list/extend.py
deleted file mode 100644
index 5c44ac5..0000000
--- a/reclass/mergers/list/extend.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from base import BaseListMerger
-
-class ListExtend(BaseListMerger):
-
-    def _combine(self, first, second):
-        if second is not None:
-            if isinstance(second, list):
-                first.extend(second)
-            else:
-                first.append(second)
-        return first
diff --git a/reclass/mergers/list/set.py b/reclass/mergers/list/set.py
deleted file mode 100644
index 54770a3..0000000
--- a/reclass/mergers/list/set.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from extend import BaseListMerger
-
-class SetExtend(BaseListMerger):
-
-    def _combine(self, first, second):
-        if second is not None:
-            for i in second:
-                if i not in first:
-                    first.append(i)
-        return first
diff --git a/reclass/mergers/list/tests/test_extend.py b/reclass/mergers/list/tests/test_extend.py
deleted file mode 100644
index e65f77a..0000000
--- a/reclass/mergers/list/tests/test_extend.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from reclass.mergers.list import ListExtend
-
-class TestListExtend:
-
-    def setUp(self):
-        self.merger = ListExtend()
-
-    def _test_merge(self, one, two, target):
-        res = self.merger.merge(one, two)
-        print res, target
-        return res == target
-
-    def test_merge_scalars(self):
-        assert self._test_merge(1, 2, [1,2])
-
-    def test_merge_tuples(self):
-        t1 = (1,2,3)
-        t2 = (6,5,4)
-        target = [t1, t2]
-        assert self._test_merge(t1, t2, target)
-
-    def test_merge_lists(self):
-        l1 = [1,2,3]
-        l2 = [6,5,4]
-        target = l1 + l2
-        assert self._test_merge(l1, l2, target)
-
-    def test_merge_scalar_tuple(self):
-        s = 'one'
-        t = (2,3)
-        target = [s, t]
-        assert self._test_merge(s, t, target)
-
-    def test_merge_scalar_list(self):
-        s = 'foo'
-        l = [1,2,3]
-        target = [s]
-        target.extend(l)
-        assert self._test_merge(s, l, target)
-
-    def test_merge_list_scalar(self):
-        l = [1,2,3]
-        s = 'bar'
-        target = l[:]
-        target.append(s)
-        assert self._test_merge(l, s, target)
-
-    def test_merge_duplicates_scalar(self):
-        s1 = 2
-        s2 = 2
-        target = [2,2]
-        assert self._test_merge(s1, s2, target)
-
-    def test_merge_duplicates_list(self):
-        l1 = [1,2,3]
-        l2 = [3,2,1]
-        target = l1 + l2
-        assert self._test_merge(l1, l2, target)
-
-    def test_merge_with_none(self):
-        first = [1,2,3]
-        ret = self.merger.merge(first, None)
-        assert ret == first
diff --git a/reclass/mergers/list/tests/test_set.py b/reclass/mergers/list/tests/test_set.py
deleted file mode 100644
index 0dc965a..0000000
--- a/reclass/mergers/list/tests/test_set.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# -*- coding: utf-8 -*-
-#
-# This file is part of reclass (http://github.com/madduck/reclass)
-#
-# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-from test_extend import TestListExtend
-from reclass.mergers.list import SetExtend
-
-class TestSetExtend(TestListExtend):
-
-    def setUp(self):
-        self.merger = SetExtend()
-
-    def test_merge_duplicates_scalar(self):
-        s1 = 2
-        s2 = 2
-        target = [2]
-        assert self._test_merge(s1, s2, target)
-
-    def test_merge_duplicates_list(self):
-        l1 = [1,2,3]
-        l2 = [3,2,1]
-        target = l1
-        assert self._test_merge(l1, l2, target)
-
-    def test_merge_with_none(self):
-        first = [1,2,3]
-        ret = self.merger.merge(first, None)
-        assert ret == first
