diff --git a/record-encode.cabal b/record-encode.cabal
--- a/record-encode.cabal
+++ b/record-encode.cabal
@@ -1,5 +1,5 @@
 name:                record-encode
-version:             0.2.1
+version:             0.2.2
 synopsis:            Generic encoding of records
 description:         Generic encoding of records. It currently provides a single, polymorphic function to encode sum types (i.e. categorical variables) as one-hot vectors.
 homepage:            https://github.com/ocramz/record-encode
diff --git a/src/Data/Record/Encode.hs b/src/Data/Record/Encode.hs
--- a/src/Data/Record/Encode.hs
+++ b/src/Data/Record/Encode.hs
@@ -20,8 +20,10 @@
 module Data.Record.Encode (
   -- * One-hot encoding
     encodeOneHot
-  -- ** Types and Utilities
-    , OneHot(..), compareOH, oneHotV
+  -- ** Types 
+    , OneHot(..)
+  -- ** Utilities  
+    , compareOH, oneHotV
   -- * Generics-related
     , G
   ) where
@@ -80,11 +82,13 @@
 
 
 -- | A one-hot encoding is a d-dimensional vector having a single component equal to 1 and all others equal to 0.
+-- We represent it here compactly as two integers: an integer dimension and an index (which must both be nonnegative).
 data OneHot = OH {
   oDim :: !Int -- ^ Dimension of ambient space (i.e. number of categories)
   , oIx :: !Int  -- ^ Index of nonzero entry
   } deriving (Eq, Show)
 
+-- | Compares two one-hot encodings for equality. Returns Nothing if the operand dimensions are not equal.
 compareOH :: OneHot -> OneHot -> Maybe Ordering
 compareOH (OH d1 i1) (OH d2 i2)
   | d1 /= d2 = Nothing
@@ -104,10 +108,3 @@
   
   
 
-
-{- |
-
-from A
-  :: (C1 _ U1 :+: (C1 _ U1 +: C1 _ U1)) :+: (C1 _ U1 :+: (C1 _ U1 :+: C1 _ U1))
-
--}
diff --git a/test/LibSpec.hs b/test/LibSpec.hs
--- a/test/LibSpec.hs
+++ b/test/LibSpec.hs
@@ -7,7 +7,7 @@
 import qualified GHC.Generics as G
 import Generics.SOP 
 
-import qualified Data.Vector as V
+-- import qualified Data.Vector as V
 
 import Data.Record.Encode
 
@@ -25,8 +25,8 @@
 spec =
   describe "Data.Record.Encode" $ do
     it "creates a one-hot encoded vector from a sum type" $ do
-      V.length (encodeOneHot Xb) `shouldBe` 3
-      
+      oDim (encodeOneHot Xb) `shouldBe` 3
+      oIx (encodeOneHot Xb) `shouldBe` 1
       
     -- prop "ourAdd is commutative" $ \x y ->
     --   ourAdd x y `shouldBe` ourAdd y x
