diff --git a/Data/Concurrent/Queue/MichaelScott.hs b/Data/Concurrent/Queue/MichaelScott.hs
--- a/Data/Concurrent/Queue/MichaelScott.hs
+++ b/Data/Concurrent/Queue/MichaelScott.hs
@@ -24,7 +24,6 @@
 import Data.ByteString.Char8 (hPutStrLn, pack)
 
 -- import GHC.Types (Word(W#))
-import GHC.Prim (sameMutVar#)
 import GHC.IORef(IORef(IORef))
 import GHC.STRef(STRef(STRef))
 
@@ -33,11 +32,14 @@
 
 -- GHC 7.8 changed some primops
 #if MIN_VERSION_base(4,7,0)
-import GHC.Base  hiding ((==#))
-import GHC.Prim hiding ((==#))
+import GHC.Base  hiding ((==#), sameMutVar#)
+import GHC.Prim hiding ((==#), sameMutVar#)
 import qualified GHC.PrimopWrappers as GPW
 (==#) :: Int# -> Int# -> Bool
 (==#) x y = case x GPW.==# y of { 0# -> False; _ -> True }
+
+sameMutVar# :: MutVar# s a -> MutVar# s a -> Bool
+sameMutVar# x y = case GPW.sameMutVar# x y of { 0# -> False; _ -> True }
 #else
 import GHC.Base
 import GHC.Prim
diff --git a/Test.hs b/Test.hs
deleted file mode 100644
--- a/Test.hs
+++ /dev/null
@@ -1,31 +0,0 @@
-{-# LANGUAGE BangPatterns, NamedFieldPuns #-}
-{- Example build:
-  ghc --make Test.hs -o Test.exe -rtsopts -fforce-recomp
--}
-module Main where
-import Test.Framework                     (defaultMain)
-import Test.Framework.Providers.HUnit     (hUnitTestToTests)
-import Data.Concurrent.Deque.Tests        (tests_fifo, numElems, getNumAgents)
-import System.Environment (getArgs, withArgs)
-import Test.HUnit 
-
--- import Data.Concurrent.Queue.MichaelScott (newQ)
-import Data.Concurrent.Queue.MichaelScott (LinkedQueue)
-import Data.Concurrent.Deque.Class        (newQ)
-import Data.Concurrent.Deque.Debugger
-
-main = do
-  numAgents <- getNumAgents
-  putStrLn$ "Running with numElems "++show numElems++" and numAgents "++ show numAgents
-  putStrLn "Use NUMELEMS and +RTS to control the size of this benchmark."
-  args <- getArgs
-  -- Don't allow concurent tests (the tests are concurrent!):
-  withArgs (args ++ ["-j1","--jxml=test-results.xml"]) $ 
-    defaultMain$ hUnitTestToTests$
-    TestList
-    [ TestLabel "MichaelScott" $ tests_fifo (newQ :: IO (LinkedQueue a))
-    , TestLabel "MichaelScott(DbgWrapper)" $
-        tests_fifo (newQ :: IO (DebugDeque LinkedQueue a))
-    ]
-
-  
diff --git a/lockfree-queue.cabal b/lockfree-queue.cabal
--- a/lockfree-queue.cabal
+++ b/lockfree-queue.cabal
@@ -1,5 +1,5 @@
 Name:                lockfree-queue
-Version:             0.2.3
+Version:             0.2.3.1
 License:             BSD3
 License-file:        LICENSE
 Author:              Ryan R. Newton
@@ -51,8 +51,11 @@
 
 Test-Suite test-lockfree-queue
     type:       exitcode-stdio-1.0
+    hs-source-dirs: ./tests/
     main-is:    Test.hs
-    build-depends: base >= 4.4.0.0 && < 5, bytestring, 
+    build-depends: lockfree-queue
+    build-depends: base >= 4.4.0.0 && < 5, 
+                   bytestring, 
                    abstract-deque >= 0.3, abstract-deque-tests >= 0.3, 
                    HUnit, test-framework, test-framework-hunit,
                    ghc-prim, atomic-primops >= 0.6
diff --git a/tests/Test.hs b/tests/Test.hs
new file mode 100644
--- /dev/null
+++ b/tests/Test.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE BangPatterns, NamedFieldPuns #-}
+{- Example build:
+  ghc --make Test.hs -o Test.exe -rtsopts -fforce-recomp
+-}
+module Main where
+import Test.Framework                     (defaultMain)
+import Test.Framework.Providers.HUnit     (hUnitTestToTests)
+import Data.Concurrent.Deque.Tests        (tests_fifo, numElems, getNumAgents)
+import System.Environment (getArgs, withArgs)
+import Test.HUnit 
+
+-- import Data.Concurrent.Queue.MichaelScott (newQ)
+import Data.Concurrent.Queue.MichaelScott (LinkedQueue)
+import Data.Concurrent.Deque.Class        (newQ)
+import Data.Concurrent.Deque.Debugger
+
+main = do
+  numAgents <- getNumAgents
+  putStrLn$ "Running with numElems "++show numElems++" and numAgents "++ show numAgents
+  putStrLn "Use NUMELEMS and +RTS to control the size of this benchmark."
+  args <- getArgs
+  -- Don't allow concurent tests (the tests are concurrent!):
+  withArgs (args ++ ["-j1","--jxml=test-results.xml"]) $ 
+    defaultMain$ hUnitTestToTests$
+    TestList
+    [ TestLabel "MichaelScott" $ tests_fifo (newQ :: IO (LinkedQueue a))
+    , TestLabel "MichaelScott(DbgWrapper)" $
+        tests_fifo (newQ :: IO (DebugDeque LinkedQueue a))
+    ]
+
+  
