diff --git a/hslogger.cabal b/hslogger.cabal
--- a/hslogger.cabal
+++ b/hslogger.cabal
@@ -1,5 +1,5 @@
 Name: hslogger
-Version: 1.2.9
+Version: 1.2.10
 License: BSD3
 Maintainer: John Goerzen <jgoerzen@complete.org>
 Author: John Goerzen
@@ -27,7 +27,10 @@
     testsrc/Tests.hs,
     testsrc/runtests.hs,
     winbuild.bat
-Cabal-Version: >= 1.6
+Cabal-Version: >= 1.8
+source-repository head
+  type: git
+  location: git@github.com:jgoerzen/hslogger.git
 
 flag small_base
   description: choose the new smaller, split-up base package.
@@ -53,13 +56,15 @@
     -- GHC-Options: -O2
     Hs-Source-Dirs: src
 
-Executable runtests
+test-suite runtests
+    type: exitcode-stdio-1.0
     if flag(buildtests)
       Buildable: True
     else
       Buildable: False
     Main-Is: runtests.hs
-    HS-Source-Dirs: testsrc, .
+    HS-Source-Dirs: testsrc, ., src
     Extensions: ExistentialQuantification, OverlappingInstances,
         UndecidableInstances, CPP
-
+    build-depends: base
+                 , HUnit
diff --git a/src/System/Log/Handler/Growl.hs b/src/System/Log/Handler/Growl.hs
--- a/src/System/Log/Handler/Growl.hs
+++ b/src/System/Log/Handler/Growl.hs
@@ -39,12 +39,12 @@
     getFormatter = formatter
 
     emit gh lr _ = let pkt = buildNotification gh nmGeneralMsg lr
-		   in mapM_ (sendNote (skt gh) pkt) (targets gh)
+                   in  mapM_ (sendNote (skt gh) pkt) (targets gh)
 
     close gh = let pkt = buildNotification gh nmClosingMsg
-			 (WARNING, "Connection closing.")
+                             (WARNING, "Connection closing.")
                    s   = skt gh
-	       in mapM_ (sendNote s pkt) (targets gh) >> sClose s
+               in  mapM_ (sendNote s pkt) (targets gh) >> sClose s
 
 sendNote :: Socket -> String -> HostAddress -> IO Int
 sendNote s pkt ha = sendTo s pkt (SockAddrInet 9887 ha)
@@ -94,7 +94,7 @@
                      foldl packIt [] appNotes,
                      ['\x0' .. (chr (length appNotes - 1))] ]
           packIt a b = a ++ (emitLen16 b) ++ b
-	  appNotes = [ nmGeneralMsg, nmClosingMsg ]
+          appNotes = [ nmGeneralMsg, nmClosingMsg ]
           emitLen8 v = [chr $ length v]
 
 {- | Adds a remote machine's address to the list of targets that will
@@ -125,9 +125,9 @@
 -- Creates a network packet containing a notification record.
 
 buildNotification :: GrowlHandler
-		  -> String
+                  -> String
                   -> LogRecord
-		  -> String
+                  -> String
 buildNotification gh nm (p, msg) = concat fields
     where fields = [ ['\x1', '\x5'],
                      emit16 (toFlags p),
diff --git a/src/System/Log/Handler/Syslog.hs b/src/System/Log/Handler/Syslog.hs
--- a/src/System/Log/Handler/Syslog.hs
+++ b/src/System/Log/Handler/Syslog.hs
@@ -29,6 +29,7 @@
 -}
 
 module System.Log.Handler.Syslog(
+                                       SyslogHandler, -- No constructors.
                                        -- * Handler Initialization
                                        openlog,
                                        -- * Advanced handler initialization
@@ -247,7 +248,7 @@
     getLevel sh = priority sh
     setFormatter sh f = sh{formatter = f}
     getFormatter sh = formatter sh
-    emit sh (_, msg) _ = do
+    emit sh (prio, msg) _ = do
       when (elem PERROR (options sh)) (hPutStrLn stderr msg)
       pidPart <- getPidPart
       void $ sendstr (toSyslogFormat msg pidPart)
@@ -261,7 +262,7 @@
           sendstr (genericDrop sent omsg)
         toSyslogFormat msg pidPart =
             "<" ++ code ++ ">" ++ identity' ++ pidPart ++ ": " ++ msg ++ "\0"
-        code = show (makeCode (facility sh) (priority sh))
+        code = show $ makeCode (facility sh) prio
         identity' = identity sh
         getPidPart = if elem PID (options sh)
                      then getPid >>= \pid -> return ("[" ++ pid ++ "]")
diff --git a/testsrc/Tests.hs b/testsrc/Tests.hs
--- a/testsrc/Tests.hs
+++ b/testsrc/Tests.hs
@@ -1,14 +1,22 @@
 {- arch-tag: Tests main file
 Copyright (C) 2004 John Goerzen <jgoerzen@complete.org>
 License: BSD3
-
 -}
-
 module Tests(tests) where
+
 import Test.HUnit
 
-test1 = TestCase ("x" @=? "x")
+import System.Log
 
-tests = TestList [TestLabel "test1" test1]
+tests = TestList [TestLabel "priority levels" priorityLevels]
 
+priorityLevels :: Test
+priorityLevels = TestList [
+  TestCase ( DEBUG <= DEBUG @=? True),
+  TestCase ( DEBUG <= INFO @=? True),
+  TestCase ( INFO <= WARNING @=? True),
+  TestCase ( WARNING <= ERROR @=? True),
+  TestCase ( INFO <= ERROR @=? True),
+  TestCase ( ERROR > INFO @=? True)
+  ]
 
