diff --git a/hw-rankselect.cabal b/hw-rankselect.cabal
--- a/hw-rankselect.cabal
+++ b/hw-rankselect.cabal
@@ -1,5 +1,5 @@
 name:                   hw-rankselect
-version:                0.1.0.0
+version:                0.1.0.1
 synopsis:               Conduits for tokenizing streams.
 description:            Please see README.md
 homepage:               http://github.com/haskell-works/hw-rankselect#readme
diff --git a/src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs b/src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs
--- a/src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs
+++ b/src/HaskellWorks/Data/Succinct/BalancedParens/Internal.hs
@@ -1,9 +1,18 @@
+{-# LANGUAGE FlexibleInstances #-}
+
 module HaskellWorks.Data.Succinct.BalancedParens.Internal
   ( BalancedParens(..)
+  , closeAt
   , depth
+  , openAt
   , subtreeSize
   ) where
 
+import           Control.Monad
+import qualified Data.Vector.Storable                                       as DVS
+import           Data.Word
+import           HaskellWorks.Data.Bits.BitLength
+import           HaskellWorks.Data.Bits.BitWise
 import           HaskellWorks.Data.Positioning
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank0
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank1
@@ -21,3 +30,159 @@
 
 subtreeSize :: BalancedParens v => v -> Count -> Maybe Count
 subtreeSize v p = (\q -> (q - p + 1) `quot` 2) <$> findClose v p
+
+closeAt :: TestBit a => a -> Count -> Bool
+closeAt v c = not (v .?. toPosition (c - 1))
+{-# INLINABLE closeAt #-}
+
+openAt :: TestBit a => a -> Count -> Bool
+openAt v c = v .?. toPosition (c - 1)
+{-# INLINABLE openAt #-}
+
+-----
+
+findOpen' :: (BitLength a, TestBit a) => Count -> a -> Count -> Maybe Count
+findOpen' c v p = if 0 < p && p <= bitLength v
+  then if v `openAt` p
+    then if c == 0
+      then Just p
+      else findOpen' (c - 1) v (p - 1)
+    else findOpen' (c + 1) v (p - 1)
+  else Nothing
+{-# INLINABLE findOpen' #-}
+
+findClose' :: (BitLength a, TestBit a) => Count -> a -> Count -> Maybe Count
+findClose' c v p = if 1 < p && p <= bitLength v
+  then if v `closeAt` p
+    then if c == 0
+      then Just p
+      else findClose' (c + 1) v (p + 1)
+    else findClose' (c - 1) v (p + 1)
+  else Nothing
+{-# INLINABLE findClose' #-}
+
+instance BalancedParens [Bool] where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens (DVS.Vector Word8) where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens (DVS.Vector Word16) where
+  findOpen  v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose       = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens (DVS.Vector Word32) where
+  findOpen  v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose       = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens (DVS.Vector Word64) where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens Word8 where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens Word16 where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens Word32 where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
+
+instance BalancedParens Word64 where
+  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
+  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
+  enclose         = findOpen' (Count 1)
+  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
+  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
+  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
diff --git a/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs b/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
--- a/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
+++ b/src/HaskellWorks/Data/Succinct/BalancedParens/Simple.hs
@@ -3,31 +3,21 @@
 
 module HaskellWorks.Data.Succinct.BalancedParens.Simple
   ( SimpleBalancedParens(..)
-  , closeAt
-  , findOpen
-  , findClose
-  , findClose'
-  , openAt
   ) where
 
 import           Control.Monad
-import qualified Data.Vector.Storable                                       as DVS
-import           Data.Word
 import           HaskellWorks.Data.Bits.BitLength
 import           HaskellWorks.Data.Bits.BitShow
 import           HaskellWorks.Data.Bits.BitWise
-import           HaskellWorks.Data.Positioning
 import           HaskellWorks.Data.Succinct.BalancedParens.Internal
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank0
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank1
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Select0
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Select1
-import           HaskellWorks.Data.Succinct.RankSelect.Binary.Poppy512
-import           HaskellWorks.Data.Succinct.RankSelect.Binary.Poppy512S
 import           Prelude                                                    as P
 
 newtype SimpleBalancedParens a = SimpleBalancedParens a
-  deriving (BitLength, Eq, BitShow, TestBit, Rank0, Rank1, Select0, Select1)
+  deriving (BalancedParens, BitLength, BitShow, Eq, Rank0, Rank1, Select0, Select1, TestBit)
 
 instance Functor SimpleBalancedParens where
   fmap f (SimpleBalancedParens a) = SimpleBalancedParens (f a)
@@ -35,185 +25,3 @@
 
 instance BitShow a => Show (SimpleBalancedParens a) where
   show = bitShow
-
-closeAt :: TestBit a => a -> Count -> Bool
-closeAt v c = not (v .?. toPosition (c - 1))
-{-# INLINABLE closeAt #-}
-
-openAt :: TestBit a => a -> Count -> Bool
-openAt v c = v .?. toPosition (c - 1)
-{-# INLINABLE openAt #-}
-
-findOpen' :: (BitLength a, TestBit a) => Count -> SimpleBalancedParens a -> Count -> Maybe Count
-findOpen' c v p = if 0 < p && p <= bitLength v
-  then if v `openAt` p
-    then if c == 0
-      then Just p
-      else findOpen' (c - 1) v (p - 1)
-    else findOpen' (c + 1) v (p - 1)
-  else Nothing
-{-# INLINABLE findOpen' #-}
-
-findClose' :: (BitLength a, TestBit a) => Count -> SimpleBalancedParens a -> Count -> Maybe Count
-findClose' c v p = if 1 < p && p <= bitLength v
-  then if v `closeAt` p
-    then if c == 0
-      then Just p
-      else findClose' (c + 1) v (p + 1)
-    else findClose' (c - 1) v (p + 1)
-  else Nothing
-{-# INLINABLE findClose' #-}
-
-instance BalancedParens (SimpleBalancedParens [Bool]) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens (DVS.Vector Word8)) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens (DVS.Vector Word16)) where
-  findOpen  v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose       = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens (DVS.Vector Word32)) where
-  findOpen  v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose       = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens (DVS.Vector Word64)) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Poppy512) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Poppy512S) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Word8) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Word16) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Word32) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
-
-instance BalancedParens (SimpleBalancedParens Word64) where
-  findOpen    v p = if v `openAt`  p then Just p else findOpen'  (Count 0) v (p - 1)
-  findClose   v p = if v `closeAt` p then Just p else findClose' (Count 0) v (p + 1)
-  enclose         = findOpen' (Count 1)
-  firstChild  v p = if openAt v p && openAt v (p + 1)   then Just (p + 1) else Nothing
-  nextSibling v p = if closeAt v p then Nothing else openAt v `mfilter` (findClose v p >>= (\q -> if p /= q then return (q + 1) else Nothing))
-  parent      v p = enclose   v p >>= (\r -> if r >= 1 then return r       else Nothing)
-  {-# INLINABLE findOpen    #-}
-  {-# INLINABLE findClose   #-}
-  {-# INLINABLE enclose     #-}
-  {-# INLINABLE firstChild  #-}
-  {-# INLINABLE nextSibling #-}
-  {-# INLINABLE parent      #-}
diff --git a/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512.hs b/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512.hs
--- a/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512.hs
+++ b/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512.hs
@@ -14,6 +14,7 @@
 import           HaskellWorks.Data.Bits.PopCount.PopCount1
 import           HaskellWorks.Data.Positioning
 import           HaskellWorks.Data.Search
+import           HaskellWorks.Data.Succinct.BalancedParens.Internal
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank0
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank1
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Select0
@@ -65,3 +66,17 @@
     where q = binarySearch (fromIntegral p) wordAt 0 (fromIntegral $ DVS.length i - 1)
           s = Count (fromIntegral q * 512 - (i !!! q))
           wordAt o = fromIntegral o * 512 - (i !!! o)
+
+instance BalancedParens Poppy512 where
+  findOpen    = findOpen    . poppy512Bits
+  findClose   = findClose   . poppy512Bits
+  enclose     = enclose     . poppy512Bits
+  firstChild  = firstChild  . poppy512Bits
+  nextSibling = nextSibling . poppy512Bits
+  parent      = parent      . poppy512Bits
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
diff --git a/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512S.hs b/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512S.hs
--- a/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512S.hs
+++ b/src/HaskellWorks/Data/Succinct/RankSelect/Binary/Poppy512S.hs
@@ -13,6 +13,7 @@
 import           HaskellWorks.Data.Bits.PopCount.PopCount1
 import           HaskellWorks.Data.Positioning
 import           HaskellWorks.Data.Search
+import           HaskellWorks.Data.Succinct.BalancedParens.Internal
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank0
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Rank1
 import           HaskellWorks.Data.Succinct.RankSelect.Binary.Basic.Select1
@@ -86,3 +87,17 @@
           (sampleMin, sampleMax) = sampleRange iv p
           iMin = fromIntegral $  (sampleMin - 1) `div` 512      :: Position
           iMax = fromIntegral $ ((sampleMax - 1) `div` 512) + 1 :: Position
+
+instance BalancedParens Poppy512S where
+  findOpen    = findOpen    . poppy512SBits
+  findClose   = findClose   . poppy512SBits
+  enclose     = enclose     . poppy512SBits
+  firstChild  = firstChild  . poppy512SBits
+  nextSibling = nextSibling . poppy512SBits
+  parent      = parent      . poppy512SBits
+  {-# INLINABLE findOpen    #-}
+  {-# INLINABLE findClose   #-}
+  {-# INLINABLE enclose     #-}
+  {-# INLINABLE firstChild  #-}
+  {-# INLINABLE nextSibling #-}
+  {-# INLINABLE parent      #-}
