diff --git a/madlang.cabal b/madlang.cabal
--- a/madlang.cabal
+++ b/madlang.cabal
@@ -1,5 +1,5 @@
 name:                madlang
-version:             3.0.0.3
+version:             3.0.0.4
 synopsis:            Randomized templating language DSL
 description:         Madlang is a text templating language written in Haskell,
                      meant to explore computational creativity and generative
@@ -72,6 +72,7 @@
                      , ansi-wl-pprint
                      , containers
                      , titlecase
+                     , th-lift-instances
                      , http-client
                      , tar
                      , zlib
diff --git a/src/Text/Madlibs.hs b/src/Text/Madlibs.hs
--- a/src/Text/Madlibs.hs
+++ b/src/Text/Madlibs.hs
@@ -31,6 +31,7 @@
                     , run
                     , runText
                     , RandTok (..)
+                    , Key
                     -- * Types associated with the parser
                     , Context
                     , SemanticError (..)
@@ -39,6 +40,7 @@
                     -- * Template Haskell EDSL
                     , madlang
                     , madFile
+                    , madEmbed
                     ) where
 
 import           Text.Madlibs.Ana.Parse
diff --git a/src/Text/Madlibs/Ana/ParseUtils.hs b/src/Text/Madlibs/Ana/ParseUtils.hs
--- a/src/Text/Madlibs/Ana/ParseUtils.hs
+++ b/src/Text/Madlibs/Ana/ParseUtils.hs
@@ -18,7 +18,7 @@
 import           Data.Foldable
 import           Data.List
 import qualified Data.Map                    as M
-import           Data.Maybe                  (catMaybes, fromJust)
+import           Data.Maybe                  (catMaybes)
 import           Data.Monoid
 import qualified Data.Text                   as T
 import           Data.Text.Titlecase
@@ -110,9 +110,13 @@
     where isPreTok PreTok{} = True
           isPreTok _        = False
 
+maybeList :: Maybe [a] -> [a]
+maybeList (Just x) = x
+maybeList Nothing  = []
+
 allDeps :: [(Key, [(Prob, [PreTok])])] -> Key -> [Key]
-allDeps context key = let deps = (catMaybes . fmap maybeName . getNames) context in deps <> (allDeps context =<< deps)
-    where getNames = (=<<) snd . fromJust . lookup key
+allDeps context key = let deps = (maybeList . fmap (catMaybes . (fmap maybeName)) . getNames) context in deps <> (allDeps context =<< deps)
+    where getNames = fmap ((=<<) snd) . lookup key
           maybeName (Name n _) = Just n
           maybeName _          = Nothing
 
diff --git a/src/Text/Madlibs/Ana/Resolve.hs b/src/Text/Madlibs/Ana/Resolve.hs
--- a/src/Text/Madlibs/Ana/Resolve.hs
+++ b/src/Text/Madlibs/Ana/Resolve.hs
@@ -5,7 +5,8 @@
     parseFile
   , runFile
   , makeTree
-  , runText ) where
+  , runText
+  , getInclusionCtx ) where
 
 import           Control.Arrow               (first)
 import           Control.Composition
diff --git a/src/Text/Madlibs/Generate/TH.hs b/src/Text/Madlibs/Generate/TH.hs
--- a/src/Text/Madlibs/Generate/TH.hs
+++ b/src/Text/Madlibs/Generate/TH.hs
@@ -4,6 +4,7 @@
 module Text.Madlibs.Generate.TH
     ( madFile
     , madlang
+    , madEmbed
     ) where
 
 import           Data.FileEmbed
@@ -13,6 +14,7 @@
 import           Language.Haskell.TH         hiding (Dec)
 import           Language.Haskell.TH.Quote
 import           Text.Madlibs.Ana.Parse
+import           Text.Madlibs.Ana.Resolve
 import           Text.Madlibs.Internal.Utils
 import           Text.Megaparsec
 
@@ -47,6 +49,9 @@
 -- | Turn a parse error into an error that will be caught when Template Haskell compiles at runtime.
 errorgen :: Either (ParseError Char (ErrorFancy Void)) a -> a
 errorgen = either (error . T.unpack . show') id
+
+madEmbed :: FilePath -> FilePath -> Q Exp
+madEmbed folder filepath = [| errorgen <$> runIO (getInclusionCtx False [] folder filepath) |]
 
 -- | Splice for embedding a '.mad' file, e.g.
 --
diff --git a/src/Text/Madlibs/Internal/Types.hs b/src/Text/Madlibs/Internal/Types.hs
--- a/src/Text/Madlibs/Internal/Types.hs
+++ b/src/Text/Madlibs/Internal/Types.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE DeriveFoldable       #-}
 {-# LANGUAGE DeriveFunctor        #-}
+{-# LANGUAGE DeriveLift           #-}
 {-# LANGUAGE DeriveTraversable    #-}
 {-# LANGUAGE FlexibleInstances    #-}
 {-# LANGUAGE OverloadedStrings    #-}
@@ -10,12 +11,14 @@
 -- | Module with the type of a random token
 module Text.Madlibs.Internal.Types where
 
-import           Control.Arrow            (second)
+import           Control.Arrow              (second)
 import           Control.Monad.State
 import           Data.Function
-import           Data.Functor.Foldable.TH (makeBaseFunctor)
+import           Data.Functor.Foldable.TH   (makeBaseFunctor)
 import           Data.Monoid
-import qualified Data.Text                as T
+import qualified Data.Text                  as T
+import           Instances.TH.Lift          ()
+import           Language.Haskell.TH.Syntax (Lift (..))
 
 -- | datatype for a double representing a probability
 type Prob = Double
@@ -37,7 +40,7 @@
 
 -- | datatype for a token returning a random string
 data RandTok = List [(Prob, RandTok)] | Value T.Text
-    deriving (Show, Eq)
+    deriving (Show, Eq, Lift)
 
 apply :: (T.Text -> T.Text) -> RandTok -> RandTok -- TODO make a base functor so we can map f over stuff?
 apply f (Value str) = Value (f str)
diff --git a/test/Demo.hs b/test/Demo.hs
--- a/test/Demo.hs
+++ b/test/Demo.hs
@@ -11,13 +11,17 @@
 demo :: RandTok
 demo = $(madFile "test/templates/gambling.mad")
 
+-- demoDir :: [(Key, RandTok)]
+-- demoDir = $(madEmbed "test/templates" "gambling.mad")
+
 demoQQ :: RandTok
 demoQQ = [madlang|
 :define something
     1.0 "hello"
     1.0 "goodbye"
 :return
-    1.0 something|]
+    1.0 something
+|]
 
 runTest :: IO T.Text
 runTest = run demo
