diff --git a/hquery.cabal b/hquery.cabal
--- a/hquery.cabal
+++ b/hquery.cabal
@@ -1,5 +1,5 @@
 name:                hquery
-version:             0.1.0.1
+version:             0.1.0.2
 synopsis:            A query language for transforming HTML5
 license:             MIT
 license-file:        LICENSE
@@ -36,7 +36,7 @@
   type: exitcode-stdio-1.0
   build-depends: base ==4.*, hquery >= 0.1.0.0, xmlhtml >= 0.2, HUnit,
                  filepath >= 1.3.0.0, bytestring >= 0.9.2.1, test-framework,
-                 test-framework-hunit
+                 test-framework-hunit, text >= 0.11
   extensions: DeriveDataTypeable
 
 test-suite ParserTests
diff --git a/src/Text/Hquery.hs b/src/Text/Hquery.hs
--- a/src/Text/Hquery.hs
+++ b/src/Text/Hquery.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE OverloadedStrings #-}
 {- | This module exports the top level constructors
 used for building node transformations.
 For example, if your template is
@@ -46,7 +47,13 @@
 
 module Text.Hquery (
   -- * Constructors
-  MakeTransformer(..)
+  MakeTransformer(..),
+  Group(..),
+
+  -- * Values
+  -- | nothing is handy for deleting a node from the tree, you cna replace it
+  -- with nothing, e.g. @ hq \".foo\" nothing @
+  nothing,
   ) where
 
 import Data.List
@@ -68,9 +75,18 @@
   Left _ -> id -- TODO: error handling? invalid sel
   Right (css, attr) -> transform css (builder attr)
 
+nothing :: [Node]
+nothing = []
+
+data Group = Group [Node]
+
 class MakeTransformer a where
   hq :: String -> a -> [Node] -> [Node]
 
+instance MakeTransformer a => MakeTransformer (Maybe a) where
+  hq sel Nothing = hq sel ([] :: [Node])
+  hq sel (Just t) = hq sel t
+
 instance MakeTransformer String where
   hq sel target = parseSel sel nodeXform
     where
@@ -81,11 +97,19 @@
         (Nothing, _) -> (setNode (TextNode (T.pack target))) c
 
 instance MakeTransformer [String] where
-  hq sel xs = hq sel (map (TextNode . T.pack) xs)
+  hq sel xs = hq sel $ map (TextNode . T.pack) xs
 
 instance MakeTransformer Node where
   hq sel target = hq sel [target]
 
+instance MakeTransformer Group where
+  hq sel (Group ns) = parseSel sel groupXform
+    where
+      groupXform attr c = case (attr, current c) of
+        (Just CData, e @ Element {}) -> setNode (e { elementChildren = ns }) c
+        (Just _, _) -> c -- TODO: error handling?
+        (Nothing, _) -> replaceCurrent ns c
+
 instance MakeTransformer ([Node] -> [Node]) where
   hq sel f = hq sel [f]
 
@@ -117,12 +141,15 @@
     pn@Element { elementChildren = kids } -> do
       ix <- elemIndex curN kids
       let next = setNode (pn { elementChildren = concatMap replaceN kids }) p
-      getChild (ix - 1 + (length ns)) next
+      let childIdx = (ix - 1 + (length ns))
+      -- FIXME: xmlhtml <= 0.2.0.3 crashes on negative indicies
+      return $ fromMaybe next $ if childIdx < 0 then Nothing else getChild childIdx next
     _ -> raise "should be no non-Element parents!"
   where
     curN = current c
     replaceN n2 = if n2 == curN then ns else [n2]
-    dflt = fromMaybe c $ do
+    -- FIXME: replacing a root node with no elements generates a bogus comment
+    empty = fromNode (Comment "FIXME: hquery: replaced root with empty node")
+    dflt = fromMaybe empty $ do
       newCur <- (fromNodes ns)
-      endCur <- findRight isLast newCur
-      return endCur
+      return (fromMaybe newCur $ findRight isLast newCur)
diff --git a/tests/TransformTests.hs b/tests/TransformTests.hs
--- a/tests/TransformTests.hs
+++ b/tests/TransformTests.hs
@@ -4,6 +4,7 @@
 import Data.Typeable
 import Data.Maybe
 import qualified Data.ByteString.Char8 as BS
+import qualified Data.Text as T
 import Test.HUnit hiding (Node, Test)
 import Text.XmlHtml
 
@@ -30,6 +31,11 @@
 
   in hq ".person" (map bind people)
 
+groupTest :: [Node]
+groupTest = map (mkSpan . show) [1..3]
+
+mkSpan s = Element (T.pack "span") [] $ [TextNode $ T.pack s]
+
 tests :: [([Node] -> [Node], String)]
 tests = [ (hq "#foo [class+]" "bar", "AddClass")
         , (hq "div [class+]" "bar", "AddClass")
@@ -46,6 +52,12 @@
         , (peopleTest, "PeopleOccupations")
         , (hq ".foo *" "bar", "NestXform")
         , (hq ".foo" "bar", "NestReplace")
+        , (hq "#foo" nothing, "RemoveNode")
+        , (hq ".foo *" $ Group groupTest, "GroupNodes")
+        , (hq "*" nothing, "RemoveStar")
+        , (hq "li *" $ map (hq "li *") ["a", "b", "c"], "ListOfFs")
+        , (hq "li *" $ map (hq "li *") ["a"], "SingleF")
+        , (hq "div" [mkSpan ""], "ReplaceRoot")
         ]
 
 makeTests :: [([Node] -> [Node], String)] -> IO [Test]
