diff --git a/Database/HSparql/Connection.hs b/Database/HSparql/Connection.hs
--- a/Database/HSparql/Connection.hs
+++ b/Database/HSparql/Connection.hs
@@ -1,4 +1,9 @@
-module Database.HSparql.Connection where
+module Database.HSparql.Connection
+    ( EndPoint
+    , BindingValue(..)
+    , query
+    )
+where
 
 import Control.Monad
 import Data.Maybe
@@ -7,18 +12,23 @@
 
 import Database.HSparql.QueryGenerator
 
+-- |URI of the SPARQL endpoint.
 type EndPoint = String
 
-data BindingValue = URI String
-                  | Literal String
-                  | TypedLiteral String String -- value, type
-                  | LangLiteral String String -- value, lang 
-                  | Unbound
+-- |Local representations of incoming XML results.
+data BindingValue = URI String                 -- ^Absolute reference to remote resource.
+                  | Literal String             -- ^Simple literal string.
+                  | TypedLiteral String String -- ^Literal element with type resource
+                  | LangLiteral String String  -- ^Literal element with language resource
+                  | Unbound                    -- ^Unbound result value
   deriving (Show, Eq)
 
+-- |Base 'QName' for results with a SPARQL-result URI specified.
 sparqlResult :: String -> QName
 sparqlResult s = (unqual s) { qURI = Just "http://www.w3.org/2005/sparql-results#" }
 
+-- |Transform the 'String' result from the HTTP request into a two-dimensional
+--  table storing the bindings for each variable in each row.
 structureContent :: String -> Maybe [[BindingValue]]
 structureContent s =
     do e <- doc
@@ -49,7 +59,9 @@
           langAttr :: QName
           langAttr = blank_name { qName = "lang", qPrefix = Just "xml" }
 
--- query :: EndPoint -> Query [Variable] -> IO (Maybe [[Element]])
+-- |Connect to remote 'EndPoint' and find all possible bindings for the
+--  'Variable's in the 'Query' action.
+query :: EndPoint -> Query [Variable] -> IO (Maybe [[BindingValue]])
 query ep q = do
     let uri      = ep ++ "?" ++ urlEncodeVars [("query", createQuery q)]
         request  = replaceHeader HdrUserAgent "hsparql-client" (getRequest uri)
diff --git a/Database/HSparql/QueryGenerator.hs b/Database/HSparql/QueryGenerator.hs
--- a/Database/HSparql/QueryGenerator.hs
+++ b/Database/HSparql/QueryGenerator.hs
@@ -1,15 +1,79 @@
 {-# LANGUAGE ExtendedDefaultRules, FlexibleInstances, Rank2Types #-}
-module Database.HSparql.QueryGenerator where
 
+-- |The query generator DSL for SPARQL, used when connecting to remote
+--  endpoints.
+module Database.HSparql.QueryGenerator
+    ( -- * Creating Queries
+      createQuery
+
+    -- * Query Actions
+    , prefix
+    , var
+    , triple
+    , optional
+    , union
+    , filterExpr
+
+    -- ** Duplicate handling
+    , distinct
+    , reduced
+
+    -- ** Order handling
+    , orderNext
+    , orderNextAsc
+    , orderNextDesc
+
+    -- ** Auxiliary
+    , (.:.)
+    , iriRef
+
+    -- * Term Manipulation
+
+    -- ** Operations
+    , (.+.), (.-.), (.*.), (./.)
+
+    -- ** Relations
+    , (.==.), (.!=.), (.<.), (.>.), (.<=.), (.>=.)
+
+    -- ** Negation
+    , notExpr
+
+    -- ** Builtin Functions
+    , str
+    , lang
+    , langMatches
+    , datatype
+    , bound
+    , sameTerm
+    , isIRI
+    , isURI
+    , isBlank
+    , isLiteral
+    , regex
+
+    -- * Printing Queries
+    , qshow
+
+    -- * Types
+    , Query
+    , Variable
+    )
+where
+
 import Control.Monad.State
 import Data.List (intercalate)
 
 -- State monads
+
+-- |The 'State' monad applied to 'QueryData'.
 type Query a = State QueryData a
 
+-- |Execute a 'Query' action, starting with the empty 'queryData', then process
+-- the resulting 'QueryData'.
 execQuery :: Query a -> (QueryData -> b) -> b
 execQuery q f = f $ execState q queryData
 
+-- |Execute a 'Query' action, returning the 'String' representation of the query.
 createQuery :: Query [Variable] -> String
 createQuery q = execQuery specifyVars qshow
     where specifyVars :: Query ()
@@ -17,23 +81,31 @@
                            modify $ \s -> s { vars = vs }
 
 -- Manipulate data within monad
+
+-- |Add a prefix to the query, given an IRI reference, and return it.
 prefix :: IRIRef -> Query Prefix
 prefix ref = do n <- gets prefixIdx
                 let p = Prefix n ref
                 modify $ \s -> s { prefixIdx = n + 1, prefixes = p : prefixes s }
                 return p
 
+-- |Create and return a variable to the query, usable in later expressions.
 var :: Query Variable
 var = do n <- gets varsIdx
          modify $ \s -> s { varsIdx = n + 1 }
          return $ Variable n
 
+-- |Restrict the query to only results for which values match constants in this
+--  triple, or for which the variables can be bound.
 triple :: (TermLike a, TermLike b, TermLike c) => a -> b -> c -> Query Pattern
 triple a b c = do
     let t = Triple (varOrTerm a) (varOrTerm b) (varOrTerm c)
     modify $ \s -> s { pattern = appendPattern t (pattern s) }
     return t
 
+-- |Add optional constraints on matches. Variable bindings within the optional
+--  action are lost, so variables must always be defined prior to opening the
+--  optional block.
 optional :: Query a -> Query Pattern
 optional q = do
     -- Determine the patterns by executing the action on a blank QueryData, and
@@ -42,6 +114,8 @@
     modify $ \s -> s { pattern = appendPattern option (pattern s) }
     return option
 
+-- |Add a union structure to the query pattern. As with 'optional' blocks,
+--  variables must be defined prior to the opening of any block.
 union :: Query a -> Query b -> Query Pattern
 union q1 q2 = do 
     let p1    = execQuery q1 pattern
@@ -50,6 +124,7 @@
     modify $ \s -> s { pattern = appendPattern union (pattern s) }
     return union
 
+-- |Restrict results to only those for which the given expression is true.
 filterExpr :: (TermLike a) => a -> Query Pattern
 filterExpr e = do
     let f = Filter (expr e)
@@ -57,26 +132,42 @@
     return f
 
 -- Random auxiliary
+
+-- |Form a 'PrefixedName' 'IRIRef', with the 'Prefix' and reference name.
 (.:.) :: Prefix -> String -> IRIRef
 (.:.) = PrefixedName
 
+-- |Create an 'IRIRef' with an absolute reference to the address at which it is
+--  located.
 iriRef :: String -> IRIRef
 iriRef = IRIRef
 
 -- Duplicate handling
+
+-- |Set duplicate handling to 'Distinct'. By default, there are no reductions.
 distinct :: Query Duplicates
 distinct = do modify $ \s -> s { duplicates = Distinct }
               gets duplicates
 
+-- |Set duplicate handling to 'Reduced'. By default, there are no reductions.
 reduced :: Query Duplicates
 reduced = do modify $ \s -> s { duplicates = Reduced }
              gets duplicates
 
 -- Order handling
-orderNext, orderNextAsc, orderNextDesc :: (TermLike a) => a -> Query ()
+
+-- |Alias of 'orderNextAsc'.
+orderNext :: (TermLike a) => a -> Query ()
 orderNext = orderNextAsc 
 
+-- |Order the results, after any previous ordering, based on the term, in
+--  ascending order.
+orderNextAsc :: (TermLike a) => a -> Query ()
 orderNextAsc x  = do modify $ \s -> s { ordering = (ordering s) ++ [Asc  $ expr x] }
+
+-- |Order the results, after any previous ordering, based on the term, in
+--  descending order.
+orderNextDesc :: (TermLike a) => a -> Query ()
 orderNextDesc x = do modify $ \s -> s { ordering = (ordering s) ++ [Desc $ expr x] }
 
 -- Permit variables and values to seemlessly be put into argument for 'triple'
@@ -117,25 +208,59 @@
 operation :: (TermLike a, TermLike b) => Operation -> a -> b -> Expr
 operation op x y = NumericExpr $ OperationExpr op (expr x) (expr y)
 
-(.+.), (.-.), (.*.), (./.) :: (TermLike a, TermLike b) => a -> b -> Expr
+-- |Add two terms.
+(.+.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.+.) = operation Add
+
+-- |Find the difference between two terms.
+(.-.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.-.) = operation Subtract
+
+-- |Multiply two terms.
+(.*.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.*.) = operation Multiply
+
+-- |Divide two terms.
+(./.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (./.) = operation Divide
 
 -- Relations
 relation :: (TermLike a, TermLike b) => Relation -> a -> b -> Expr
 relation rel x y = RelationalExpr rel (expr x) (expr y)
 
-(.==.), (.!=.), (.<.), (.>.), (.<=.), (.>=.) :: (TermLike a, TermLike b) => a -> b -> Expr
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their equivalence.
+(.==.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.==.) = relation Equal
+
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their equivalence.
+(.!=.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.!=.) = relation NotEqual
-(.<.)  = relation LessThan
-(.>.)  = relation GreaterThan
+
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their relative value.
+(.<.) :: (TermLike a, TermLike b) => a -> b -> Expr
+(.<.) = relation LessThan
+
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their relative value.
+(.>.) :: (TermLike a, TermLike b) => a -> b -> Expr
+(.>.) = relation GreaterThan
+
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their relative value.
+(.<=.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.<=.) = relation LessThanOrEqual
+
+-- |Create an expression which tests the relationship of the two operands,
+--  evaluating their relative value.
+(.>=.) :: (TermLike a, TermLike b) => a -> b -> Expr
 (.>=.) = relation GreaterThanOrEqual
 
 -- Negation
+
+-- |Negate any term-like expression, for use, e.g., in filtering.
 notExpr :: (TermLike a) => a -> Expr
 notExpr = NegatedExpr . expr
 
@@ -195,6 +320,8 @@
 
 -- Query representation
 class QueryShow a where
+  -- |Convert most query-related types to a 'String', most importantly
+  --  'QueryData's.
   qshow :: a -> String
 
 data Duplicates = NoLimits | Distinct | Reduced
diff --git a/hsparql.cabal b/hsparql.cabal
--- a/hsparql.cabal
+++ b/hsparql.cabal
@@ -1,5 +1,5 @@
 Name:          hsparql
-Version:       0.0
+Version:       0.1
 Synopsis:      A SPARQL query generator and DSL, and a client to query a SPARQL server.
 Category:      Database
 Description:
@@ -13,7 +13,6 @@
 
 Build-type:    Simple
 Build-depends: base >= 4 && < 5
-Build-depends: containers
 Build-depends: HTTP >= 4
 Build-depends: monads-fd
 Build-depends: xml
