diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -126,23 +126,22 @@
 hackish as it will generate facts from the local computer !
 -}
 
-initializedaemon :: String -> IO ([Char] -> IO FinalCatalog)
-initializedaemon puppetdir = do
+initializedaemonWithPuppet :: Maybe String -> String -> IO ([Char] -> IO FinalCatalog)
+initializedaemonWithPuppet purl puppetdir = do
     LOG.updateGlobalLogger "Puppet.Daemon" (LOG.setLevel LOG.INFO)
-    rawfacts <- allFacts
-    queryfunc <- initDaemon (genPrefs puppetdir)
+    let prefs = genPrefs puppetdir
+    queryfunc <- initDaemon (prefs { puppetDBurl = purl })
     return (\nodename -> do
-        let ofacts = genFacts rawfacts
-            (hostname, ddomainname) = break (== '.') nodename
-            domainname = tail $ ddomainname
-            nfacts = genFacts [("fqdn", nodename), ("hostname", hostname), ("domain", domainname), ("rootrsa", "xxx")]
-            allfacts = Map.union nfacts ofacts
-        o <- queryfunc nodename allfacts
+        o <- allFacts nodename >>= queryfunc nodename
         case o of
             Left err -> error err
             Right x -> return x
         )
 
+{-| A helper for when you don't want to use PuppetDB -}
+initializedaemon :: String -> IO ([Char] -> IO FinalCatalog)
+initializedaemon = initializedaemonWithPuppet Nothing
+
 showparam (k,v) = k ++ " => " ++ show v
 
 showtdiff :: (DI, String) -> String
@@ -257,9 +256,12 @@
 main :: IO ()
 main = do
     args <- getArgs
-    when (length args == 1) (doparse  (head args))
-    let (puppetdir, nodename) | (length args /= 2) && (length args /= 3) = usage
-                              | otherwise = (args !! 0, args !! 1)
+    let (rargs, puppeturl) = case args of
+                             ("-r":pu:xs) -> (xs,   Just pu)
+                             _            -> (args, Nothing)
+    when (length rargs == 1) (doparse  (head rargs))
+    let (puppetdir, nodename) | (length rargs /= 2) && (length rargs /= 3) = usage
+                              | otherwise = (rargs !! 0, rargs !! 1)
         getresname :: String -> Maybe (String, String)
         getresname r =
             let isresname = ((head $ reverse r) == ']') && ('[' `elem` r)
@@ -272,8 +274,8 @@
                 Just (t,n) -> printResource t n cat
                 Nothing    -> printContent resname cat
 
-    queryfunc <- initializedaemon puppetdir
+    queryfunc <- initializedaemonWithPuppet puppeturl puppetdir
     x <- queryfunc nodename
-    if length args == 3
-        then handlePrintResource (args !! 2) x
+    if length rargs == 3
+        then handlePrintResource (rargs !! 2) x
         else putStrLn $ showFCatalog x
diff --git a/puppetresources.cabal b/puppetresources.cabal
--- a/puppetresources.cabal
+++ b/puppetresources.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                puppetresources
-version:             0.1.3
+version:             0.3.0
 synopsis:            A program that displays the puppet resources associated to a node given .pp files.
 -- description:         
 license:             GPL-3
@@ -21,8 +21,8 @@
   ghc-options:         -rtsopts
   -- other-modules:       
   build-depends:       base >=3 && <5,
-                       language-puppet >= 0.1.7,
-                       hsfacter        >= 0.1.0.3,
+                       language-puppet >= 0.1.8.0,
+                       hsfacter        >= 0.2.0.0,
                        containers,
                        hslogger,
                        Diff,
