diff --git a/Data/Apart.hs b/Data/Apart.hs
--- a/Data/Apart.hs
+++ b/Data/Apart.hs
@@ -14,10 +14,39 @@
 -- A simple introduction to this library can be found here: https://iokasimov.github.io/posts/2018/05/cofree-will-tear-us-apart
 ----------------------------------------------------------------------------
 
-module Data.Apart
-	( module Data.Apart.Apart
-	, module Data.Apart.Combinators
-	) where
+module Data.Apart (Apart (..)) where
 
-import Data.Apart.Apart
-import Data.Apart.Combinators
+import "base" Data.Bifoldable (Bifoldable (..))
+import "base" Data.Bifunctor (Bifunctor (..))
+import "base" Data.Bitraversable (Bitraversable (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
+import "semigroupoids" Data.Functor.Apply (Apply (..))
+
+import Data.Apart.Shape (Shape (..))
+
+-- | Structure with scattered segments.
+newtype Apart t raw value = Apart
+	{ part :: (Cofree (Shape t raw) value) }
+
+instance Functor t => Functor (Apart t raw) where
+	fmap f (Apart structure) = Apart $ f <$> structure
+
+instance Apply t => Apply (Apart t raw) where
+	Apart fs <.> Apart structure = Apart $ fs <.> structure
+
+instance Functor t => Bifunctor (Apart t) where
+	bimap g f (Apart (x :< Ready values)) = Apart $
+		f x :< Ready (part . bimap g f . Apart <$> values)
+	bimap g f (Apart (x :< Converted raw)) = Apart $
+		f x :< (Converted $ g raw)
+
+instance Foldable t => Bifoldable (Apart t) where
+	bifoldr g f acc (Apart (x :< Ready values)) = f x $
+		foldr (\st a -> bifoldr g f a $ Apart st) acc values
+	bifoldr g f acc (Apart (x :< Converted raw)) = f x $ g raw acc
+
+instance Traversable t => Bitraversable (Apart t) where
+	bitraverse g f (Apart (x :< Ready values)) = (<$>) Apart $ (:<) <$> f x <*>
+		(Ready <$> traverse ((<$>) part . bitraverse g f . Apart) values)
+	bitraverse g f (Apart (x :< Converted raw)) = (<$>) Apart $
+		(:<) <$> f x <*> (Converted <$> g raw)
diff --git a/Data/Apart/Apart.hs b/Data/Apart/Apart.hs
deleted file mode 100644
--- a/Data/Apart/Apart.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-module Data.Apart.Apart (Apart (..), Shape (..), Segment (..), Scattered (..)) where
-
-import Control.Comonad.Cofree (Cofree (..))
-import Data.Bifoldable (Bifoldable (..))
-import Data.Bifunctor (Bifunctor (..))
-import Data.Bitraversable (Bitraversable (..))
-import Data.Functor.Apply (Apply (..))
-import Data.Kind (Type)
-
-import Data.Apart.Shape (Shape (..))
-
--- | Structure with scattered segments.
-newtype Apart t raw value = Apart
-	{ part :: (Cofree (Shape t raw) value) }
-
-instance Functor t => Functor (Apart t raw) where
-	fmap f (Apart structure) = Apart $ f <$> structure
-
-instance Apply t => Apply (Apart t raw) where
-	Apart fs <.> Apart structure = Apart $ fs <.> structure
-
-instance Functor t => Bifunctor (Apart t) where
-	bimap g f (Apart (x :< Ready values)) = Apart $
-		f x :< Ready (part . bimap g f . Apart <$> values)
-	bimap g f (Apart (x :< Converted raw)) = Apart $
-		f x :< (Converted $ g raw)
-
-instance Foldable t => Bifoldable (Apart t) where
-	bifoldr g f acc (Apart (x :< Ready values)) = f x $
-		foldr (\st a -> bifoldr g f a $ Apart st) acc values
-	bifoldr g f acc (Apart (x :< Converted raw)) = f x $ g raw acc
-
-instance Traversable t => Bitraversable (Apart t) where
-	bitraverse g f (Apart (x :< Ready values)) = (<$>) Apart $ (:<) <$> f x <*>
-		(Ready <$> traverse ((<$>) part . bitraverse g f . Apart) values)
-	bitraverse g f (Apart (x :< Converted raw)) = (<$>) Apart $
-		(:<) <$> f x <*> (Converted <$> g raw)
-
-type family Segment (structure :: Type -> Type) (value :: Type) :: Type where
-	Segment (Cofree t) value = t (Cofree t value)
-
-type family Scattered (structure :: Type -> Type) (value :: Type) (raw :: Type) :: Type where
-	Scattered (Cofree t) value raw = Apart t raw value
diff --git a/Data/Apart/Combinators.hs b/Data/Apart/Combinators.hs
--- a/Data/Apart/Combinators.hs
+++ b/Data/Apart/Combinators.hs
@@ -1,18 +1,20 @@
 module Data.Apart.Combinators (Restorer, Materializer, recover, limit, throughout, inmemory) where
 
-import Control.Applicative (Alternative (..))
-import Control.Comonad.Cofree (Cofree (..))
-import Control.Monad (join)
+import "base" Control.Applicative (Alternative (..))
+import "base" Control.Monad (join)
+import "free" Control.Comonad.Cofree (Cofree (..))
 
-import Data.Apart.Apart (Apart (..), Shape (..), Scattered (..), Segment (..))
+import Data.Apart (Apart (..))
+import Data.Apart.Shape (Shape (..))
+import Data.Apart.Transformations (Segmented (..), Scattered (..))
 
 -- | Pull back segment of values to memory.
 type Restorer g t raw value = (Traversable t, Applicative g) =>
-	raw -> g (Segment (Cofree t) value)
+	raw -> g (Segmented (Cofree t) value)
 
 -- | Put in-memory values to somewhere else.
 type Materializer g t raw value = (Traversable t, Applicative g) =>
-	Segment (Cofree t) value -> g raw
+	Segmented (Cofree t) value -> g raw
 
 -- | Do nothing with in-memory part, pull back all values of structure to memory.
 recover :: (Traversable t, Applicative g) => Restorer g t raw value
diff --git a/Data/Apart/Machinery/Moore.hs b/Data/Apart/Machinery/Moore.hs
--- a/Data/Apart/Machinery/Moore.hs
+++ b/Data/Apart/Machinery/Moore.hs
@@ -1,6 +1,6 @@
 module Data.Apart.Machinery.Moore (Moore, dumb) where
 
-import Control.Comonad.Cofree (Cofree (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
 
 type Moore a b = Cofree ((->) b) a
 
diff --git a/Data/Apart/Shape.hs b/Data/Apart/Shape.hs
--- a/Data/Apart/Shape.hs
+++ b/Data/Apart/Shape.hs
@@ -1,11 +1,11 @@
 module Data.Apart.Shape (Shape (..)) where
 
-import Data.Bifoldable (Bifoldable (..))
-import Data.Bifunctor (Bifunctor (..))
-import Data.Bitraversable (Bitraversable (..))
-import Data.Functor.Apply (Apply (..))
-import Data.Functor.Alt (Alt (..))
-import Data.Semigroup (Semigroup (..))
+import "base" Data.Bifoldable (Bifoldable (..))
+import "base" Data.Bifunctor (Bifunctor (..))
+import "base" Data.Bitraversable (Bitraversable (..))
+import "base" Data.Semigroup (Semigroup (..))
+import "semigroupoids" Data.Functor.Apply (Apply (..))
+import "semigroupoids" Data.Functor.Alt (Alt (..))
 
 -- | Type that can tell you about aggregate state of your structure.
 data Shape t raw value
diff --git a/Data/Apart/Structures/Dictionary.hs b/Data/Apart/Structures/Dictionary.hs
new file mode 100644
--- /dev/null
+++ b/Data/Apart/Structures/Dictionary.hs
@@ -0,0 +1,19 @@
+module Data.Apart.Structures.Dictionary (Dictionary, Association (..)) where
+
+import "base" Data.Functor.Compose (Compose)
+import "free" Control.Comonad.Cofree (Cofree (..))
+
+type Dictionary value = Cofree (Association value :.: Maybe)
+
+type (:.:) = Compose
+
+data Association value key = Association value key
+
+instance Functor (Association value) where
+	fmap f (Association value key) = Association value $ f key
+
+instance Foldable (Association value) where
+	foldr f acc (Association value key) = f key acc
+
+instance Traversable (Association value) where
+	traverse f (Association value key) = Association value <$> f key
diff --git a/Data/Apart/Structures/Graph.hs b/Data/Apart/Structures/Graph.hs
--- a/Data/Apart/Structures/Graph.hs
+++ b/Data/Apart/Structures/Graph.hs
@@ -1,46 +1,48 @@
-module Data.Apart.Structures.Graph (Graph, Edge (..), isolated, star, remove) where
+module Data.Apart.Structures.Graph (Graph, Edges (..), isolated, star, remove) where
 
-import Control.Comonad.Cofree (Cofree (..), unwrap)
-import Control.Comonad (Comonad (..))
+import "free" Control.Comonad.Cofree (Cofree (..), unwrap)
+import "comonad" Control.Comonad (Comonad (..))
 
-import Data.Apart.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
 
 -- | Directed acyclic graph.
-type Graph = Cofree Edge
+type Graph = Cofree Edges
 
-data Edge a = Empty | Single a | Connect a | Overlay a deriving Show
+data Edges a = Empty | Connect a | Overlay a deriving Show
 
-instance Functor Edge where
+instance Functor Edges where
 	fmap f Empty = Empty
-	fmap f (Single x) = Single $ f x
 	fmap f (Connect x) = Connect $ f x
 	fmap f (Overlay x) = Overlay $ f x
 
-instance Foldable Edge where
+instance Foldable Edges where
 	foldr f acc Empty = acc
-	foldr f acc (Single x) = f x acc
 	foldr f acc (Connect x) = f x acc
 	foldr f acc (Overlay x) = f x acc
 
-instance Traversable Edge where
+instance Traversable Edges where
 	traverse f Empty = pure Empty
-	traverse f (Single x) = Connect <$> f x
 	traverse f (Connect x) = Connect <$> f x
 	traverse f (Overlay x) = Overlay <$> f x
 
-single, connect, overlay, empty :: Segment Graph a -> Segment Graph a
-single = foldr (\x _ -> Single x) Empty
+connect, overlay, empty :: Segmented Graph a -> Segmented Graph a
 connect = foldr (\x _ -> Connect x) Empty
 overlay = foldr (\x _ -> Overlay x) Empty
 empty = const Empty
 
-isolated :: Foldable t => t a -> Segment Graph a
+isolated :: Foldable t => t a -> Segmented Graph a
 isolated = foldr (\el -> Overlay . (:<) el) Empty
 
 star :: Foldable t => a -> t a -> Graph a
 star x structure = x :< connect (isolated structure)
 
 -- | Remove vertex and all of its edges.
-remove :: Eq a => a -> Cofree Edge a -> Edge (Cofree Edge a)
+remove :: Eq a => a -> Graph a -> Segmented Graph a
 remove x graph@((==) x . extract -> True) = overlay $ unwrap graph
 remove x graph@(y :< segment) = ((:<) y . overlay . remove x) <$> segment
+
+-- Take a degree of focused value
+degree :: Graph a -> Int
+degree (x :< Empty) = 0
+degree (x :< Overlay xs) = 0
+degree (x :< Connect xs) = length xs
diff --git a/Data/Apart/Structures/Stack.hs b/Data/Apart/Structures/Stack.hs
--- a/Data/Apart/Structures/Stack.hs
+++ b/Data/Apart/Structures/Stack.hs
@@ -1,10 +1,10 @@
 module Data.Apart.Structures.Stack
 	(Stack, insert, singleton, foldaway, final) where
 
-import Control.Comonad.Cofree (Cofree (..), unwrap)
-import Data.Functor.Contravariant (Predicate (..))
+import "contravariant" Data.Functor.Contravariant (Predicate (..))
+import "free" Control.Comonad.Cofree (Cofree (..), unwrap)
 
-import Data.Apart.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
 
 -- | Or non-empty list.
 type Stack = Cofree Maybe
@@ -18,7 +18,7 @@
 -- when I understand how to use partially applied
 -- type families correctly, it can be rewritten
 -- slightly as natural transformation
-foldaway :: Foldable t => t a -> Segment Stack a
+foldaway :: Foldable t => t a -> Segmented Stack a
 foldaway = foldr (\el -> Just . (:<) el) Nothing
 
 final :: Eq a => Predicate (Stack a)
diff --git a/Data/Apart/Structures/Stream.hs b/Data/Apart/Structures/Stream.hs
--- a/Data/Apart/Structures/Stream.hs
+++ b/Data/Apart/Structures/Stream.hs
@@ -1,7 +1,7 @@
 module Data.Apart.Structures.Stream (Stream, same) where
 
-import Control.Comonad.Cofree (Cofree (..))
-import Data.Functor.Identity (Identity (..))
+import "base" Data.Functor.Identity (Identity (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
 
 -- | Infinite sequence.
 type Stream = Cofree Identity
diff --git a/Data/Apart/Structures/Tree/Binary.hs b/Data/Apart/Structures/Tree/Binary.hs
--- a/Data/Apart/Structures/Tree/Binary.hs
+++ b/Data/Apart/Structures/Tree/Binary.hs
@@ -1,13 +1,13 @@
 module Data.Apart.Structures.Tree.Binary
 	(Binary, Branches (..), ls, gt, singleton, insert, height, factor) where
 
-import Control.Comonad.Cofree (Cofree (..))
-import Data.Functor.Apply (Apply (..))
-import Data.Functor.Alt (Alt (..))
-import Data.Functor.Bind (Bind (..))
-import Data.Semigroup (Semigroup (..))
+import "base" Data.Semigroup (Semigroup (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
+import "semigroupoids" Data.Functor.Apply (Apply (..))
+import "semigroupoids" Data.Functor.Alt (Alt (..))
+import "semigroupoids" Data.Functor.Bind (Bind (..))
 
-import Data.Apart.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
 
 type Binary = Cofree Branches
 
@@ -75,13 +75,13 @@
 	traverse f (Branches l g) = Branches <$> f l <*> f g
 
 -- | Get @x@ from @Branches x y@ or from @Less x@.
-ls :: Binary a -> Segment Binary a
+ls :: Binary a -> Segmented Binary a
 ls (_ :< Less x) = Less x
 ls (_ :< Branches x _) = Less x
 ls (_ :< _) = End
 
 -- | Get @y@ from @Branches x y@ or from @Greater y@.
-gt :: Binary a -> Segment Binary a
+gt :: Binary a -> Segmented Binary a
 gt (_ :< Greater x) = Greater x
 gt (_ :< Branches _ x) = Greater x
 gt (_ :< _) = End
diff --git a/Data/Apart/Structures/Tree/Binary/AVL.hs b/Data/Apart/Structures/Tree/Binary/AVL.hs
--- a/Data/Apart/Structures/Tree/Binary/AVL.hs
+++ b/Data/Apart/Structures/Tree/Binary/AVL.hs
@@ -1,26 +1,27 @@
 module Data.Apart.Structures.Tree.Binary.AVL (insert) where
 
-import Control.Arrow ((&&&))
-import Data.Functor.Contravariant (Predicate (..))
-import Data.Functor.Contravariant.Divisible (Divisible (..))
-import Data.Functor.Bind (Bind (..))
+import "base" Control.Arrow ((&&&))
+import "contravariant" Data.Functor.Contravariant (Predicate (..))
+import "contravariant" Data.Functor.Contravariant.Divisible (Divisible (..))
+import "semigroupoids" Data.Functor.Bind (Bind (..))
 
-import Data.Apart.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
+
 import Data.Apart.Structures.Tree.Binary (Binary, Branches (..), ls, gt, height)
 import qualified Data.Apart.Structures.Tree.Binary as Binary (insert)
 import Data.Apart.Structures.Tree.Binary.Rotation (Rotate (..), rtt)
 
 -- | Trying rebalance tree after each insert.
-insert :: Ord a => a -> Binary a -> Segment Binary a
+insert :: Ord a => a -> Binary a -> Segmented Binary a
 insert x tree = balancing $ Binary.insert tree x
 
-balancing :: Binary a -> Segment Binary a
+balancing :: Binary a -> Segmented Binary a
 balancing t@(getPredicate simple_left -> True) = rtt L t
 balancing t@(getPredicate simple_right -> True) = rtt R t
 balancing t@(getPredicate double_left -> True) = rtt RL t
 balancing t@(getPredicate double_right -> True) = rtt LR t
 
-subheight :: Segment Binary a -> Int
+subheight :: Segmented Binary a -> Int
 subheight = foldr (\t _ -> height t) 0
 
 simple_left :: Predicate (Binary a)
diff --git a/Data/Apart/Structures/Tree/Binary/Redblack.hs b/Data/Apart/Structures/Tree/Binary/Redblack.hs
new file mode 100644
--- /dev/null
+++ b/Data/Apart/Structures/Tree/Binary/Redblack.hs
@@ -0,0 +1,20 @@
+module Data.Apart.Structures.Tree.Binary.Redblack (Redblack, Color (..), paint) where
+
+import "free" Control.Comonad.Cofree (Cofree (..))
+
+import Data.Apart.Structures.Tree.Binary (Binary, Branches (..))
+
+data Color = Red | Black deriving Show
+
+type Redblack a = Binary (a, Color)
+
+paint :: Binary a -> Redblack a
+paint tree = step Black tree where
+
+	step :: Color -> Binary a -> Redblack a
+	step color (x :< End) = (x, Black) :< End
+	step color (x :< rest) = (x, color) :< (step (invert color) <$> rest)
+
+	invert :: Color -> Color
+	invert Black = Red
+	invert Red = Black
diff --git a/Data/Apart/Structures/Tree/Binary/Rotation.hs b/Data/Apart/Structures/Tree/Binary/Rotation.hs
--- a/Data/Apart/Structures/Tree/Binary/Rotation.hs
+++ b/Data/Apart/Structures/Tree/Binary/Rotation.hs
@@ -1,13 +1,13 @@
 module Data.Apart.Structures.Tree.Binary.Rotation
 	(Rotate (..), rtt) where
 
-import Control.Comonad (Comonad (..))
-import Control.Comonad.Cofree (Cofree (..))
-import Control.Lens ((<&>))
-import Data.Functor.Bind (Bind (..))
-import Data.Semigroup (Semigroup (..))
+import "base" Data.Semigroup (Semigroup (..))
+import "comonad" Control.Comonad (Comonad (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
+import "lens" Control.Lens ((<&>))
+import "semigroupoids" Data.Functor.Bind (Bind (..))
 
-import Data.Apart.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
 import Data.Apart.Structures.Tree.Binary (Binary, Branches (..), ls, gt, height)
 
 data Rotate
@@ -18,7 +18,7 @@
 	| LL -- ^ Left zig-zig (Splay)
 	| RR -- ^ Right zig-zig (Splay)
 
-rtt :: Rotate -> Binary a -> Segment Binary a
+rtt :: Rotate -> Binary a -> Segmented Binary a
 rtt L t = (<&>) (extract <$> ls t) $ flip (:<) $ (gt t >>- gt)
 	<> (Less $ (extract t) :< (ls t <> (gt t >>- ls)))
 rtt R t = (<&>) (extract <$> gt t) $ flip (:<) $ (ls t >>- ls)
diff --git a/Data/Apart/Structures/Tree/Binary/Splay.hs b/Data/Apart/Structures/Tree/Binary/Splay.hs
--- a/Data/Apart/Structures/Tree/Binary/Splay.hs
+++ b/Data/Apart/Structures/Tree/Binary/Splay.hs
@@ -1,22 +1,24 @@
 module Data.Apart.Structures.Tree.Binary.Splay (search, insert) where
 
-import Control.Comonad (Comonad (..))
-import Data.Foldable (find)
-import Data.Functor.Bind (Bind (..))
-import Data.Functor.Contravariant (Predicate (..))
-import Data.Function ((&))
 
-import Data.Apart.Apart (Segment (..))
+import "base" Data.Function ((&))
+import "base" Data.Foldable (find)
+import "comonad" Control.Comonad (Comonad (..))
+import "contravariant" Data.Functor.Contravariant (Predicate (..))
+import "semigroupoids" Data.Functor.Bind (Bind (..))
+
+
+import Data.Apart.Transformations (Segmented (..))
 import Data.Apart.Structures.Tree.Binary (Binary, Branches (..), ls, gt)
 import qualified Data.Apart.Structures.Tree.Binary as Binary (insert)
 import Data.Apart.Structures.Tree.Binary.Rotation (Rotate (..), rtt)
 
 -- | Splay tree after each insert.
-insert :: Ord a => a -> Binary a -> Segment Binary a
+insert :: Ord a => a -> Binary a -> Segmented Binary a
 insert x t = splay x $ Binary.insert t x
 
 -- | If needed element not in the root - it isn't found.
-search :: Eq a => a -> Binary a -> Segment Binary a
+search :: Eq a => a -> Binary a -> Segmented Binary a
 search x t = maybe End (const $ splay x t) $ find (== x) t
 
 left_zig :: Eq a => Predicate (a, Binary a)
@@ -43,7 +45,7 @@
 right_zig_zag = Predicate $ \ (x, t) -> ls t >>- gt
 	& foldr (\lg _ -> extract lg == x) False
 
-splay :: Eq a => a -> Binary a -> Segment Binary a
+splay :: Eq a => a -> Binary a -> Segmented Binary a
 splay x t@(getPredicate left_zig . (x,) -> True) = rtt L t
 splay x t@(getPredicate right_zig . (x,) -> True) = rtt R t
 splay x t@(getPredicate left_zig_zig . (x,) -> True) = rtt LL t
diff --git a/Data/Apart/Structures/Tree/Prefix.hs b/Data/Apart/Structures/Tree/Prefix.hs
--- a/Data/Apart/Structures/Tree/Prefix.hs
+++ b/Data/Apart/Structures/Tree/Prefix.hs
@@ -1,17 +1,17 @@
 module Data.Apart.Structures.Tree.Prefix
 	(Prefix, Labeled (..), singleton, seek, insert, crumbs) where
 
-import Control.Applicative (Alternative (..))
-import Control.Arrow ((&&&))
-import Control.Comonad (Comonad (..))
-import Control.Comonad.Cofree (Cofree (..), unwrap)
-import Control.Lens (Lens', (^.), (%~))
-import Data.Maybe (isJust)
-import Data.Foldable (find)
-import Data.Function ((&))
-import Data.Functor.Contravariant (Predicate (..))
-import Data.Functor.Contravariant.Divisible (Divisible (..))
-import Data.Monoid (Monoid (..), (<>))
+import "base" Control.Applicative (Alternative (..))
+import "base" Control.Arrow ((&&&))
+import "base" Data.Foldable (find)
+import "base" Data.Function ((&))
+import "base" Data.Maybe (isJust)
+import "base" Data.Monoid (Monoid (..), (<>))
+import "comonad" Control.Comonad (Comonad (..))
+import "contravariant" Data.Functor.Contravariant (Predicate (..))
+import "contravariant" Data.Functor.Contravariant.Divisible (Divisible (..))
+import "free" Control.Comonad.Cofree (Cofree (..), unwrap)
+import "lens" Control.Lens (Lens', (^.), (%~))
 
 import Data.Apart.Structures.Stack (Stack)
 
diff --git a/Data/Apart/Structures/Tree/Rose.hs b/Data/Apart/Structures/Tree/Rose.hs
--- a/Data/Apart/Structures/Tree/Rose.hs
+++ b/Data/Apart/Structures/Tree/Rose.hs
@@ -1,7 +1,7 @@
 module Data.Apart.Structures.Tree.Rose (Rose, singleton, construct) where
 
-import Control.Applicative (Alternative (..))
-import Control.Comonad.Cofree (Cofree (..), coiter)
+import "base" Control.Applicative (Alternative (..))
+import "free" Control.Comonad.Cofree (Cofree (..), coiter)
 
 type Rose t = Cofree t
 
diff --git a/Data/Apart/Structures/Tree/T23.hs b/Data/Apart/Structures/Tree/T23.hs
--- a/Data/Apart/Structures/Tree/T23.hs
+++ b/Data/Apart/Structures/Tree/T23.hs
@@ -1,6 +1,6 @@
 module Data.Apart.Structures.Tree.T23 (T23, N23 (..)) where
 
-import Control.Comonad.Cofree (Cofree (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
 
 data N23 a b = L2 a a | L3 a a a a | B2 b b | B3 a b b b
 
diff --git a/Data/Apart/Structures/Tree/T234.hs b/Data/Apart/Structures/Tree/T234.hs
--- a/Data/Apart/Structures/Tree/T234.hs
+++ b/Data/Apart/Structures/Tree/T234.hs
@@ -1,6 +1,6 @@
 module Data.Apart.Structures.Tree.T234 (T234, N234 (..)) where
 
-import Control.Comonad.Cofree (Cofree (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
 
 data N234 a b = L2 a a | L3 a a a a | L4 a a a a a a
 	| B2 b b | B3 a b b b | B4 a a b b b b
diff --git a/Data/Apart/Transformations.hs b/Data/Apart/Transformations.hs
new file mode 100644
--- /dev/null
+++ b/Data/Apart/Transformations.hs
@@ -0,0 +1,24 @@
+module Data.Apart.Transformations (Attached (..), Embedded (..), Injected (..), Segmented (..), Scattered (..)) where
+
+import "base" Data.Functor.Compose (Compose)
+import "base" Data.Kind (Type)
+import "free" Control.Comonad.Cofree (Cofree)
+
+import Data.Apart (Apart)
+
+type (:.:) = Compose
+
+type family Attached (structure :: Type -> Type) (extension :: Type -> Type) (value :: Type) :: Type where
+	Attached (Cofree t) extension value = Cofree t (extension value)
+
+type family Embedded (structure :: Type -> Type) (extension :: Type -> Type) (value :: Type) :: Type where
+	Embedded (Cofree t) extension value = Cofree (extension :.: t) value
+
+type family Injected (structure :: Type -> Type) (extension :: Type -> Type) (value :: Type) :: Type where
+	Injected (Cofree t) extension value = Cofree (t :.: extension) value
+
+type family Segmented (structure :: Type -> Type) (value :: Type) :: Type where
+	Segmented (Cofree t) value = t (Cofree t value)
+
+type family Scattered (structure :: Type -> Type) (value :: Type) (raw :: Type) :: Type where
+	Scattered (Cofree t) value raw = Apart t raw value
diff --git a/Data/Apart/Usage/Blockchain.hs b/Data/Apart/Usage/Blockchain.hs
--- a/Data/Apart/Usage/Blockchain.hs
+++ b/Data/Apart/Usage/Blockchain.hs
@@ -1,11 +1,13 @@
 module Data.Apart.Usage.Blockchain
 	(Transaction (..), Block, Blockchain, genesis, block, mainchain, verify) where
 
-import Control.Comonad.Cofree (Cofree (..))
-import Data.Bitraversable (Bitraversable (..))
-import Data.Functor.Compose (Compose (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
+import "base" Data.Bitraversable (Bitraversable (..))
+import "base" Data.Functor.Compose (Compose (..))
 
-import Data.Apart (Apart (..), Shape (..), Scattered (..))
+import Data.Apart (Apart (..))
+import Data.Apart.Shape (Shape (..))
+import Data.Apart.Transformations (Scattered (..))
 import Data.Apart.Structures.Stack (Stack)
 
 type Account = Int
diff --git a/Data/Apart/Usage/LRU.hs b/Data/Apart/Usage/LRU.hs
--- a/Data/Apart/Usage/LRU.hs
+++ b/Data/Apart/Usage/LRU.hs
@@ -1,10 +1,10 @@
 module Data.Apart.Usage.LRU (LRU, cache) where
 
-import Control.Comonad.Cofree (Cofree (..))
-import Data.Functor.Alt (Alt (..))
-import Data.Functor.Bind (Bind (..))
+import "free" Control.Comonad.Cofree (Cofree (..))
+import "semigroupoids" Data.Functor.Alt (Alt (..))
+import "semigroupoids" Data.Functor.Bind (Bind (..))
 
-import Data.Apart (Segment (..))
+import Data.Apart.Transformations (Segmented (..))
 import Data.Apart.Structures.Tree.Binary (Binary, Branches (..))
 import Data.Apart.Structures.Tree.Binary.Splay (insert)
 
@@ -14,7 +14,7 @@
 	so we need to add priority for the most recently used elements.
 	Very resembles behavoir of Splay trees, actually.
 -}
-type LRU a = Segment Binary a
+type LRU a = Segmented Binary a
 
 -- | Insert sortable value to cache, aftear that, value moved to root
 cache :: Ord a => a -> LRU a -> LRU a
diff --git a/Example/Main.hs b/Example/Main.hs
--- a/Example/Main.hs
+++ b/Example/Main.hs
@@ -1,21 +1,24 @@
 import Control.Comonad.Cofree (Cofree (..))
 import Data.Foldable (toList)
 
-import Data.Apart (Apart (..), Shape (..), Scattered (..), Segment (..), limit, throughout, recover)
+import Data.Apart (Apart (..))
+import Data.Apart.Shape (Shape (..))
+import Data.Apart.Combinators (limit, throughout, recover)
+import Data.Apart.Transformations (Segmented (..), Scattered (..))
 import Data.Apart.Structures.Stack (Stack)
 
 -- part of data structure in some file
 scattered :: Scattered Stack Int FilePath
 scattered = Apart $ 1 :< Ready (Just $ 2 :< Ready (Just $ 3 :< Converted "Example/piece.txt"))
 
-read_from_file :: FilePath -> IO (Segment Stack Int)
-read_from_file fp = read @(Segment Stack Int) <$> readFile fp
+read_from_file :: FilePath -> IO (Segmented Stack Int)
+read_from_file fp = read @(Segmented Stack Int) <$> readFile fp
 
 -- the whole structure in memory
 in_memory :: Stack Int
 in_memory = 1 :< Just (2 :< Just (3 :< Just (4 :< Just (5 :< Nothing))))
 
-save_to_file :: FilePath -> Segment Stack Int -> IO FilePath
+save_to_file :: FilePath -> Segmented Stack Int -> IO FilePath
 save_to_file fp structure = writeFile fp (show structure) *> pure fp
 
 main = do
diff --git a/Test/Apart.hs b/Test/Apart.hs
--- a/Test/Apart.hs
+++ b/Test/Apart.hs
@@ -1,7 +1,7 @@
 module Main where
 
-import System.IO (BufferMode(..), hSetBuffering, stdout, stderr)
-import Hedgehog (Group (..), checkParallel)
+import "base" System.IO (BufferMode(..), hSetBuffering, stdout, stderr)
+import "hedgehog" Hedgehog (Group (..), checkParallel)
 
 import Test.Apart.Structures.Stack
 import Test.Apart.Structures.Tree.Binary
diff --git a/apart.cabal b/apart.cabal
--- a/apart.cabal
+++ b/apart.cabal
@@ -1,5 +1,5 @@
 name:                apart
-version:             0.1.1
+version:             0.1.3
 synopsis:            Get all your structure and rip it apart.
 homepage:            https://github.com/iokasimov/apart
 license:             BSD3
@@ -20,6 +20,10 @@
 library
   exposed-modules:
     Data.Apart,
+    Data.Apart.Combinators
+    Data.Apart.Shape,
+    Data.Apart.Transformations,
+    Data.Apart.Structures.Dictionary,
     Data.Apart.Structures.Graph,
     Data.Apart.Structures.Stack,
     Data.Apart.Structures.Stream,
@@ -31,13 +35,10 @@
     Data.Apart.Structures.Tree.Binary.Rotation,
     Data.Apart.Structures.Tree.Binary.AVL,
     Data.Apart.Structures.Tree.Binary.Splay,
+    Data.Apart.Structures.Tree.Binary.Redblack,
     Data.Apart.Machinery.Moore,
     Data.Apart.Usage.Blockchain,
     Data.Apart.Usage.LRU
-  other-modules:
-    Data.Apart.Apart,
-    Data.Apart.Shape,
-    Data.Apart.Combinators
   build-depends:
     base == 4.*
     , free
@@ -59,6 +60,7 @@
     TypeFamilies,
     TypeOperators,
     ViewPatterns,
+    PackageImports
     PatternSynonyms,
     TupleSections
 
@@ -85,6 +87,7 @@
     TypeFamilies,
     TypeOperators,
     ViewPatterns,
+    PackageImports
     PatternSynonyms,
     TupleSections
 
@@ -113,6 +116,7 @@
     TypeFamilies,
     TypeOperators,
     ViewPatterns,
+    PackageImports
     PatternSynonyms,
     TupleSections
   ghc-options: -fno-warn-tabs
