diff --git a/helics-wai.cabal b/helics-wai.cabal
--- a/helics-wai.cabal
+++ b/helics-wai.cabal
@@ -1,5 +1,5 @@
 name:                helics-wai
-version:             0.1.0
+version:             0.2.0
 synopsis:            New Relic® agent SDK wrapper for wai.
 description:         
   New Relic® agent SDK wrapper for wai.
@@ -22,13 +22,12 @@
 
 library
   exposed-modules:     Network.Helics.Wai
+                       Network.Helics.Wai.Safe
   -- other-extensions:    
   build-depends:       base               >=4.6  && <4.8
-                     , data-default-class >=0.0  && <0.1
                      , wai                >=3.0  && <3.1
                      , vault              >=0.3  && <0.4
                      , helics             >=0.1  && <0.2
-                     , bytestring         >=0.10 && <0.11
   ghc-options:         -Wall -O2
   hs-source-dirs:      src
   default-language:    Haskell2010
diff --git a/src/Network/Helics/Wai.hs b/src/Network/Helics/Wai.hs
--- a/src/Network/Helics/Wai.hs
+++ b/src/Network/Helics/Wai.hs
@@ -1,22 +1,19 @@
 module Network.Helics.Wai (helics, transactionId) where
 
 import Network.Wai
-import Data.Vault.Lazy as V
 import Network.Helics
-import qualified Data.ByteString as S
+import qualified Network.Helics.Wai.Safe as Safe
+import qualified Data.Vault.Lazy as V
 import System.IO.Unsafe
 
-tidKey :: Key TransactionId
-tidKey = unsafePerformIO newKey
+tidKey :: V.Key TransactionId
+tidKey = unsafePerformIO V.newKey
 {-# NOINLINE tidKey #-}
 
 -- | helics middleware.
 helics :: Middleware
-helics app req send =
-   withTransaction (rawPathInfo req) def $ \tid -> do
-   setRequestUrl (rawPathInfo req) tid
-   app req { vault = insert tidKey tid (vault req) } send
+helics = Safe.helics tidKey
 
 -- | get TransactionId from request.
 transactionId :: Request -> TransactionId
-transactionId req = maybe (error "helics middleware is not installed.") id $ V.lookup tidKey (vault req)
+transactionId = Safe.transactionId tidKey
diff --git a/src/Network/Helics/Wai/Safe.hs b/src/Network/Helics/Wai/Safe.hs
new file mode 100644
--- /dev/null
+++ b/src/Network/Helics/Wai/Safe.hs
@@ -0,0 +1,16 @@
+module Network.Helics.Wai.Safe (helics, transactionId) where
+
+import Network.Wai
+import Network.Helics
+import Data.Vault.Lazy as V
+
+-- | helics middleware.
+helics :: Key TransactionId -> Middleware
+helics key app req send =
+   withTransaction (rawPathInfo req) def $ \tid -> do
+   setRequestUrl (rawPathInfo req) tid
+   app req { vault = insert key tid (vault req) } send
+
+-- | get TransactionId from request.
+transactionId :: Key TransactionId -> Request -> TransactionId
+transactionId key req = maybe (error "helics middleware is not installed.") id $ V.lookup key (vault req)
