diff --git a/UI/HSCurses/Curses.hsc b/UI/HSCurses/Curses.hsc
--- a/UI/HSCurses/Curses.hsc
+++ b/UI/HSCurses/Curses.hsc
@@ -50,9 +50,11 @@
 
     -- * Windows and Pads
     Window,             -- data Window deriving Eq
+    Border(..),         -- data Border
     touchWin,
-    newPad, pRefresh, delWin, newWin,
+    newPad, pRefresh, delWin, newWin, wRefresh, wBorder, defaultBorder,
 
+
     -- * Refresh Routines
     refresh,            -- :: IO ()
     update,
@@ -191,12 +193,13 @@
 import Data.List
 import Data.Ix                  ( Ix )
 
-import Control.Monad ( when, liftM )
+import System.IO.Unsafe ( unsafePerformIO )
+
+import Control.Monad ( when, liftM, void )
 import Control.Monad.Trans
 import Control.Concurrent
-import Control.Concurrent.Chan
 
-import Foreign
+import Foreign hiding ( unsafePerformIO, void )
 import Foreign.C.String
 import Foreign.C.Types
 import Foreign.C.Error
@@ -470,6 +473,16 @@
     refresh_c :: IO CInt
 
 --
+-- | wRefresh refreshes the specified window, copying the data
+-- | from the virtual screen to the physical screen.
+--
+wRefresh :: Window -> IO ()
+wRefresh w = throwIfErr_ "wrefresh" $ wrefresh_c w
+
+foreign import ccall unsafe "HSCurses.h wrefresh"
+    wrefresh_c :: Window -> IO CInt
+
+--
 -- | Do an actual update. Used after endWin on linux to restore the terminal
 --
 update :: IO ()
@@ -1005,6 +1018,35 @@
 delWin :: Window -> IO ()
 delWin w = throwIfErr_ "delwin" $ delwin w
 
+data Border = Border {
+      ls :: Char
+    , rs :: Char
+    , ts :: Char
+    , bs :: Char
+    , tl :: Char
+    , tr :: Char
+    , bl :: Char
+    , br :: Char
+}
+
+defaultBorder :: Border
+defaultBorder = Border '\0' '\0' '\0' '\0' '\0' '\0' '\0' '\0'
+
+--
+-- | >    Draw a border around the edges of a window. defaultBorder is
+--   >    a record  representing all 0 parameters to wrecord.
+--
+wBorder :: Window -> Border -> IO ()
+wBorder w (Border ls rs ts bs tl tr bl br) = throwIfErr_ "wborder" $
+                                             wborder w ls' rs' ts' bs' tl' tr' bl' br'
+    where ls' = castCharToCChar ls
+          rs' = castCharToCChar rs
+          ts' = castCharToCChar ts
+          bs' = castCharToCChar bs
+          tl' = castCharToCChar tl
+          tr' = castCharToCChar tr
+          bl' = castCharToCChar bl
+          br' = castCharToCChar br
 foreign import ccall unsafe
     prefresh :: Window -> CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt
 
@@ -1013,6 +1055,9 @@
 
 foreign import ccall unsafe
     delwin :: Window -> IO CInt
+
+foreign import ccall unsafe
+    wborder :: Window -> CChar -> CChar -> CChar -> CChar -> CChar -> CChar -> CChar -> CChar -> IO CInt
 
 newWin :: Int -> Int -> Int -> Int -> IO Window
 newWin nlines ncolumn begin_y begin_x = throwIfNull "newwin" $
diff --git a/UI/HSCurses/CursesHelper.hs b/UI/HSCurses/CursesHelper.hs
--- a/UI/HSCurses/CursesHelper.hs
+++ b/UI/HSCurses/CursesHelper.hs
@@ -1,5 +1,4 @@
 {-# LANGUAGE CPP #-}
-{-# OPTIONS -#include HSCursesUtils.h -#include <signal.h> #-}
 
 --
 -- Copyright (C) 2005-2011 Stefan Wehr
@@ -52,8 +51,8 @@
 
         -- * Style
         Style(..), CursesStyle, mkCursesStyle, changeCursesStyle,
-        setStyle, resetStyle, convertStyles,
-        defaultStyle, defaultCursesStyle, withStyle,
+        setStyle, wSetStyle, resetStyle, wResetStyle, convertStyles,
+        defaultStyle, defaultCursesStyle, withStyle, wWithStyle,
 
         -- * Keys
         displayKey,
@@ -69,7 +68,6 @@
 
 import Data.Char
 import Data.Maybe
-import Data.List
 import Control.Monad.Trans
 
 #ifndef mingw32_HOST_OS
@@ -382,25 +380,34 @@
 -- | Reset the screen to normal values
 --
 resetStyle :: IO ()
-resetStyle = setStyle defaultCursesStyle
+resetStyle = wResetStyle Curses.stdScr
 
+wResetStyle :: Curses.Window -> IO ()
+wResetStyle = flip wSetStyle defaultCursesStyle
+
 --
 -- | Manipulate the current style of the standard screen
 --
 setStyle :: CursesStyle -> IO ()
-setStyle (CursesStyle a p) = Curses.wAttrSet Curses.stdScr (a, p)
-setStyle (ColorlessCursesStyle a) =
-    do (_, p) <- Curses.wAttrGet Curses.stdScr
-       Curses.wAttrSet Curses.stdScr (a, p)
+setStyle = wSetStyle Curses.stdScr
 
+wSetStyle :: Curses.Window -> CursesStyle -> IO ()
+wSetStyle window (CursesStyle a p) = Curses.wAttrSet window (a, p)
+wSetStyle window (ColorlessCursesStyle a) =
+    do (_, p) <- Curses.wAttrGet window
+       Curses.wAttrSet window (a, p)
+
 withStyle :: MonadExcIO m => CursesStyle -> m a -> m a
-withStyle style action =
+withStyle = wWithStyle Curses.stdScr
+
+wWithStyle :: MonadExcIO m => Curses.Window -> CursesStyle -> m a -> m a
+wWithStyle window style action =
     bracketM
-        (liftIO $ do old <- Curses.wAttrGet Curses.stdScr    -- before
-                     setStyle style
+        (liftIO $ do old <- Curses.wAttrGet window    -- before
+                     wSetStyle window style
                      return old)
-        (\old -> liftIO $ Curses.wAttrSet Curses.stdScr old) -- after
-        (\_ -> action)                                       -- do this
+        (\old -> liftIO $ Curses.wAttrSet window old) -- after
+        (\_ -> action)                                -- do this
 
 --
 -- | Converts a list of human-readable styles into the corresponding
diff --git a/UI/HSCurses/IConv.hsc b/UI/HSCurses/IConv.hsc
--- a/UI/HSCurses/IConv.hsc
+++ b/UI/HSCurses/IConv.hsc
@@ -39,9 +39,10 @@
 
 import UI.HSCurses.CWString          ( peekUTF8StringLen, withUTF8StringLen )
 
-import Foreign
+import System.IO.Unsafe ( unsafePerformIO )
+
+import Foreign hiding ( unsafePerformIO )
 import Foreign.C
-import Foreign.C.String
 import Control.Exception    ( Exception, try, bracket )
 
 type IConv = Ptr () --(#type iconv_t)
diff --git a/UI/HSCurses/MonadException.hs b/UI/HSCurses/MonadException.hs
--- a/UI/HSCurses/MonadException.hs
+++ b/UI/HSCurses/MonadException.hs
@@ -17,10 +17,12 @@
 
 module UI.HSCurses.MonadException where
 
+#if !MIN_VERSION_base(4,6,0)
 import Prelude hiding (catch)
+#endif
+
 import Control.Exception
 import Control.Monad.State
-import Data.Dynamic
 
 class Monad m => MonadExc m where
     catchM      :: Exception e => m a -> (e -> m a) -> m a
diff --git a/hscurses.cabal b/hscurses.cabal
--- a/hscurses.cabal
+++ b/hscurses.cabal
@@ -1,5 +1,5 @@
 Name:           hscurses
-Version:        1.4.1.1
+Version:        1.4.1.2
 License:        LGPL
 License-file:   LICENSE
 Author:         John Meacham <john at repetae dot net>
@@ -22,7 +22,7 @@
 Homepage:       https://github.com/skogsbaer/hscurses
 Cabal-version: >= 1.6
 Build-Type:     Configure
-Tested-with:    GHC==6.12.1, GHC==7.0.1, GHC==7.2.1
+Tested-with:    GHC==7.0.4, GHC==7.2.1, GHC==7.4.2, GHC==7.6.1
 Data-files:
     README, TODO, ChangeLog,
     example/contacts2, example/Setup.hs, example/ContactManager.hs,
@@ -38,7 +38,7 @@
   Build-depends:  base == 4.*, mtl,
                   old-time < 1.2, old-locale == 1.0.*
   if !os(windows)
-    Build-depends: unix >= 2.4 && < 2.6
+    Build-depends: unix >= 2.4 && < 2.7
   Exposed-modules:
       UI.HSCurses.Curses, UI.HSCurses.CursesHelper, UI.HSCurses.Widgets,
       UI.HSCurses.MonadException, UI.HSCurses.Logging
@@ -52,4 +52,4 @@
       CPP, ForeignFunctionInterface, GeneralizedNewtypeDeriving,
       ScopedTypeVariables, ExistentialQuantification
   Include-dirs:     cbits .
-  Ghc-options:      -funbox-strict-fields -Wall
+  Ghc-options:      -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing
