diff --git a/Readme.md b/Readme.md
--- a/Readme.md
+++ b/Readme.md
@@ -26,9 +26,10 @@
 
 Make sure `$HOME/.cabal/bin` is in your `PATH` then:
     
-	cabal update
-	cabal install Cabal cabal-install
-    cabal install alex happy 
+    cabal update
+    cabal install Cabal cabal-install
+    cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts
+    cabal install alex happy
     cabal install gtk2hs-buildtools
     cabal install leksah
     leksah
@@ -66,7 +67,8 @@
 
 Install `gtk2hs-buildtools` and `leksah`:
 
-    cabal install alex happy 
+    cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts
+    cabal install alex happy
     cabal install gtk2hs-buildtools
     cabal install leksah
     leksah
@@ -91,9 +93,10 @@
 
 Make sure `C:\Leksah\bin` and `%APPDATA%\cabal\bin` are in your `PATH` and build:
 
-	cabal update
-	cabal install Cabal
-    cabal install alex happy 
+    cabal update
+    cabal install Cabal
+    cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts
+    cabal install alex happy
     cabal install gtk2hs-buildtools
     cabal install leksah
     leksah
@@ -110,10 +113,16 @@
     cd leksah
     git submodule update --init
 
-Build it using the Dockerfile:
+Download wix39-binaries.zip from [wixtoolset.org](http://wixtoolset.org/) and
+put it in the same directory.
 
-    wget http://dl.fedoraproject.org/pub/fedora/linux/releases/test/22_Beta/Docker/x86_64/Fedora-Docker-Base-22_Beta-20150415.x86_64.tar.xz
-    docker load -i Fedora-Docker-Base-22_Beta-20150415.x86_64.tar.xz
+Get the Fedora 22 docker image and load it:
+
+    wget http://dl.fedoraproject.org/pub/fedora/linux/releases/22/Docker/x86_64/Fedora-Docker-Base-22-20150521.x86_64.tar.xz
+    sudo docker load -i Fedora-Docker-Base-22-20150521.x86_64.tar.xz
+
+Build Leksah using the Dockerfile:
+
     sudo docker build -t leksah/build .
 
 Copy the resulting msi file out of the container (version number in the file name will match the one in the leksah.cabal file):
diff --git a/bew/Main.hs b/bew/Main.hs
--- a/bew/Main.hs
+++ b/bew/Main.hs
@@ -3,13 +3,11 @@
 ) where
 
 import Graphics.UI.Gtk (postGUIAsync)
-import GHCJS.DOM.Document (documentGetBody)
 import GHCJS.DOM (runWebGUI, webViewGetDomDocument)
 
-main = do
+main =
   runWebGUI $ \ webView -> postGUIAsync $ do
     Just doc <- webViewGetDomDocument webView
-    Just body <- documentGetBody doc
     putStrLn "Bewleksah is a version of Leksah that can run in a web browser."
     putStrLn "Nothing working yet."
 
diff --git a/leksah.cabal b/leksah.cabal
--- a/leksah.cabal
+++ b/leksah.cabal
@@ -1,5 +1,5 @@
 name: leksah
-version: 0.15.1.1
+version: 0.15.1.2
 cabal-version: >=1.18
 build-type: Simple
 license: GPL
@@ -9,7 +9,7 @@
 stability: provisional
 homepage: http://www.leksah.org
 package-url: http://code.haskell.org/leksah
-bug-reports: http://code.google.com/p/leksah/issues/list
+bug-reports: https://github.com/leksah/leksah/issues
 synopsis: Haskell IDE written in Haskell
 description:
     An Integrated Development Environment for Haskell written in Haskell.
@@ -305,13 +305,12 @@
         IDE.TextEditor.GtkSourceView
         IDE.Utils.ExternalTool
     build-depends:
-        gtk3 >=0.13.9 && <0.14,
+        gtk3 >=0.13.9 && <0.15,
         gtksourceview3 >=0.13.1.5 && <0.14,
-        webkitgtk3 >=0.13 && <0.14,
+        webkitgtk3 >=0.13 && <0.15,
         webkitgtk3-javascriptcore -any,
         jsaddle -any,
         ghcjs-codemirror -any,
-        hamlet -any,
         blaze-html -any,
         lens -any,
         pretty-show >=1.6.3 && <1.7,
@@ -354,9 +353,10 @@
         shakespeare >=2.0.0.1 && <2.1,
         cpphs >=1.19 && <1.20,
         stm >=2.4.4 && <2.5
-    cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3 -DWEBKITGTK
+    cpp-options: -DWEBKITGTK
                  -DLEKSAH_WITH_CODE_MIRROR
-    default-language: Haskell98
+    default-language: Haskell2010
+    default-extensions: ViewPatterns
     hs-source-dirs: src
     other-modules:
         Paths_leksah
@@ -389,27 +389,26 @@
         ghc-options: -optl-headerpad_max_install_names
     main-is: Main.hs
     build-depends:
-        leksah ==0.15.1.1,
+        leksah ==0.15.1.2,
         base >=4.0.0.0 && <=4.9,
-        gtk3 >=0.13.9 && <0.14,
+        gtk3 >=0.13.9 && <0.15,
         stm >=2.4.4 && <2.5
-    default-language: Haskell98
+    default-language: Haskell2010
     hs-source-dirs: main
     ghc-options: -rtsopts -fwarn-missing-fields -fwarn-incomplete-patterns -ferror-spans
 
 executable bewleksah
     main-is: Main.hs
     build-depends:
-        leksah ==0.15.1.1,
+        leksah ==0.15.1.2,
         base >=4.0.0.0 && <=4.9,
         jsaddle -any,
         ghcjs-dom -any,
-        gtk3 >=0.13.9 && <0.14,
+        gtk3 >=0.13.9 && <0.15,
         gtksourceview3 >=0.13.1.5 && <0.14,
-        webkitgtk3 >=0.13 && <0.14,
+        webkitgtk3 >=0.13 && <0.15,
         webkitgtk3-javascriptcore -any,
         stm >=2.4.4 && <2.5
-    cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3
     default-language: Haskell2010
     hs-source-dirs: bew
 
@@ -424,7 +423,7 @@
         base >=4.0.0.0 && <4.9,
         Cabal >=1.10.2.0 && <1.23,
         QuickCheck >=2.4.2 && <2.9,
-        leksah ==0.15.1.1,
+        leksah ==0.15.1.2,
         containers -any,
         ltk -any,
         leksah-server -any,
@@ -433,11 +432,10 @@
         glib -any,
         monad-loops -any,
         text -any,
-        gtk3 >=0.13.9 && <0.14,
+        gtk3 >=0.13.9 && <0.15,
         gtksourceview3 >=0.13.1.5 && <0.14,
         webkitgtk3 -any,
         stm >=2.4.4 && <2.5
-    cpp-options: -DMIN_VERSION_gtk=MIN_VERSION_gtk3
     default-language: Haskell2010
     hs-source-dirs: tests
     other-modules:
diff --git a/osx/makedmg.sh b/osx/makedmg.sh
--- a/osx/makedmg.sh
+++ b/osx/makedmg.sh
@@ -73,3 +73,5 @@
 fi
 hdiutil create -size 500m -srcfolder "Leksah" "$LEKSAH_DMG" || exit
 
+scp "$LEKSAH_DMG" server:leksah/
+
diff --git a/osx/makedmgs.sh b/osx/makedmgs.sh
--- a/osx/makedmgs.sh
+++ b/osx/makedmgs.sh
@@ -3,10 +3,10 @@
 export GHCVERSION=-7.8.3
 scripts/clean.sh
 osx/makedmg.sh
+export GHCVERSION=-7.10.1
+scripts/clean.sh
+osx/makedmg.sh
 export GHCVERSION=
 scripts/clean.sh
 osx/makedmg.sh
-
-scp osx/leksah-0.15.1.1-ghc-7.8.3.dmg server:.
-scp osx/leksah-0.15.1.1-ghc-7.10.1.dmg server:.
 
diff --git a/src/IDE/Build.hs b/src/IDE/Build.hs
--- a/src/IDE/Build.hs
+++ b/src/IDE/Build.hs
@@ -25,8 +25,8 @@
 
 import Data.Map (Map)
 import IDE.Core.State
-       (postSyncIDE, triggerEventIDE, readIDE, IDEAction, Workspace(..),
-        ipdPackageId, ipdDepends, IDEPackage)
+       (postAsyncIDE, postSyncIDE, triggerEventIDE, readIDE, IDEAction,
+        Workspace(..), ipdPackageId, ipdDepends, IDEPackage)
 import qualified Data.Map as Map
        (insert, empty, lookup, toList, fromList)
 import Data.Graph
@@ -199,22 +199,22 @@
 doBuildChain :: MakeSettings -> Chain MakeOp IDEPackage -> IDEAction
 doBuildChain _ EmptyChain = return ()
 doBuildChain ms chain@Chain{mcAction = MoConfigure} =
-    packageConfig' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageConfig' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoBuild} =
-    buildPackage (msBackgroundBuild ms) (msJumpToWarnings ms) (not (msMakeMode ms) && msSingleBuildWithoutLinking ms)
+    postAsyncIDE $ buildPackage (msBackgroundBuild ms) (msJumpToWarnings ms) (not (msMakeMode ms) && msSingleBuildWithoutLinking ms)
         (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoDocu} =
-    packageDoc' (msBackgroundBuild ms) (msJumpToWarnings ms) (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageDoc' (msBackgroundBuild ms) (msJumpToWarnings ms) (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoTest} =
-    packageTest' (msBackgroundBuild ms) (msJumpToWarnings ms) (mcEle chain) False (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageTest' (msBackgroundBuild ms) (msJumpToWarnings ms) (mcEle chain) False (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoCopy} =
-    packageCopy' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageCopy' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoRegister} =
-    packageRegister' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageRegister' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoClean} =
-    packageClean' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
+    postAsyncIDE $ packageClean' (mcEle chain) (constrCont ms (mcPos chain) (mcNeg chain))
 doBuildChain ms chain@Chain{mcAction = MoMetaInfo} =
-    void (postSyncIDE (triggerEventIDE UpdateWorkspaceInfo))
+    postAsyncIDE . void $ triggerEventIDE UpdateWorkspaceInfo
 doBuildChain ms chain  = doBuildChain ms (mcPos chain)
 
 constrCont ms pos (Just neg) False = doBuildChain ms neg
diff --git a/src/IDE/Command.hs b/src/IDE/Command.hs
--- a/src/IDE/Command.hs
+++ b/src/IDE/Command.hs
@@ -919,6 +919,8 @@
         (\ e@VariablesChanged     -> fillVariablesListQuiet >> return e)
     registerEvent stRef "ErrorChanged"
         (\ e@(ErrorChanged show') -> postAsyncIDE (fillErrorList show') >> return e)
+    registerEvent stRef "ErrorAdded"
+        (\ e@(ErrorAdded show' i ref) -> postAsyncIDE (addErrorToList show' i ref) >> return e)
     registerEvent stRef "CurrentErrorChanged"
         (\ e@(CurrentErrorChanged mbLogRef) -> postAsyncIDE (do
             selectRef mbLogRef
diff --git a/src/IDE/Completion.hs b/src/IDE/Completion.hs
--- a/src/IDE/Completion.hs
+++ b/src/IDE/Completion.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, ScopedTypeVariables, OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-}
 -----------------------------------------------------------------------------
 --
 -- Module      :  IDE.Completion
@@ -242,11 +242,7 @@
             (x, y)     <- eventCoordinates
             time       <- eventTime
 
-#ifdef MIN_VERSION_gtk3
             mbDrawWindow <- Gtk.liftIO $ widgetGetWindow window
-#else
-            mbDrawWindow <- Gtk.liftIO $ Just <$> widgetGetDrawWindow window
-#endif
             case mbDrawWindow of
                 Just drawWindow -> do
                     status <- Gtk.liftIO $ pointerGrab
diff --git a/src/IDE/Core/State.hs b/src/IDE/Core/State.hs
--- a/src/IDE/Core/State.hs
+++ b/src/IDE/Core/State.hs
@@ -50,8 +50,12 @@
 ,   reflectIDE
 ,   reflectIDEI
 ,   catchIDE
+,   postSyncIDE'
+,   postAsyncIDE'
 ,   postSyncIDE
 ,   postAsyncIDE
+,   postSyncIDEIdle
+,   postAsyncIDEIdle
 ,   onIDE
 ,   forkIDE
 
@@ -112,6 +116,9 @@
 import Data.Text (Text)
 import qualified Data.Text as T (unpack)
 import Data.Monoid ((<>))
+import Control.Concurrent.MVar (takeMVar, putMVar, newEmptyMVar)
+import qualified Data.Sequence as Seq (filter)
+import Data.Sequence (Seq)
 
 instance PaneMonad IDEM where
     getFrameState   =   readIDE frameState
@@ -255,15 +262,15 @@
 -- Main window is always the first one in the list
 window = head . windows
 
-errorRefs :: IDE -> [LogRef]
-errorRefs = filter ((`elem` [ErrorRef, WarningRef, LintRef, TestFailureRef]) . logRefType) .
+errorRefs :: IDE -> Seq LogRef
+errorRefs = Seq.filter ((`elem` [ErrorRef, WarningRef, LintRef, TestFailureRef]) . logRefType) .
                allLogRefs
 
-breakpointRefs :: IDE -> [LogRef]
-breakpointRefs = filter ((== BreakpointRef) . logRefType) . allLogRefs
+breakpointRefs :: IDE -> Seq LogRef
+breakpointRefs = Seq.filter ((== BreakpointRef) . logRefType) . allLogRefs
 
-contextRefs :: IDE -> [LogRef]
-contextRefs = filter ((== ContextRef) . logRefType) . allLogRefs
+contextRefs :: IDE -> Seq LogRef
+contextRefs = Seq.filter ((== ContextRef) . logRefType) . allLogRefs
 
 currentError     = (\(e,_,_)-> e) . currentEBC
 currentBreak     = (\(_,b,_)-> b) . currentEBC
@@ -317,13 +324,29 @@
 catchIDE block handler = reifyIDE (\ideR -> catch (reflectIDE block ideR) handler)
 
 forkIDE :: MonadIDE m => IDEAction  -> m ()
-forkIDE block  = reifyIDE (void . forkIO . reflectIDE block)
+forkIDE block = reifyIDE (void . forkIO . reflectIDE block)
 
+postSyncIDE' :: MonadIDE m => Priority -> IDEM a -> m a
+postSyncIDE' priority f = reifyIDE $ \ideR -> do
+    resultVar <- newEmptyMVar
+    idleAdd (reflectIDE f ideR >>= putMVar resultVar >> return False) priority
+    takeMVar resultVar
+
 postSyncIDE :: MonadIDE m => IDEM a -> m a
-postSyncIDE f = reifyIDE (postGUISync . reflectIDE f)
+postSyncIDE = postSyncIDE' priorityDefault
 
+postSyncIDEIdle :: MonadIDE m => IDEM a -> m a
+postSyncIDEIdle = postSyncIDE' priorityDefaultIdle
+
+postAsyncIDE' :: MonadIDE m => Priority -> IDEM () -> m ()
+postAsyncIDE' priority f = reifyIDE $ \ideR ->
+    void $ idleAdd (reflectIDE f ideR >> return False) priority
+
 postAsyncIDE :: MonadIDE m => IDEM () -> m ()
-postAsyncIDE f = reifyIDE (postGUIAsync . reflectIDE f)
+postAsyncIDE = postAsyncIDE' priorityDefault
+
+postAsyncIDEIdle :: MonadIDE m => IDEM () -> m ()
+postAsyncIDEIdle = postAsyncIDE' priorityDefaultIdle
 
 onIDE obj signal callback = do
     ideRef <- ask
diff --git a/src/IDE/Core/Types.hs b/src/IDE/Core/Types.hs
--- a/src/IDE/Core/Types.hs
+++ b/src/IDE/Core/Types.hs
@@ -137,6 +137,7 @@
 import Language.Haskell.HLint3 (Idea(..))
 import Data.Function (on)
 import Control.Concurrent.STM.TVar (TVar)
+import Data.Sequence (Seq)
 
 -- ---------------------------------------------------------------------
 -- IDE State
@@ -156,7 +157,7 @@
 ,   activePack      ::   Maybe IDEPackage
 ,   activeExe       ::   Maybe Text
 ,   bufferProjCache ::   Map FilePath [IDEPackage]
-,   allLogRefs      ::   [LogRef]
+,   allLogRefs      ::   Seq LogRef
 ,   currentEBC      ::   (Maybe LogRef, Maybe LogRef, Maybe LogRef)
 ,   currentHist     ::   Int
 ,   systemInfo      ::   Maybe GenScope              -- ^ the system scope
@@ -289,6 +290,7 @@
     |   UpdateRecent
     |   VariablesChanged
     |   ErrorChanged Bool
+    |   ErrorAdded Bool Int LogRef
     |   CurrentErrorChanged (Maybe LogRef)
     |   BreakpointChanged
     |   CurrentBreakChanged (Maybe LogRef)
@@ -315,6 +317,7 @@
     getSelector UpdateRecent            =   "UpdateRecent"
     getSelector VariablesChanged        =   "VariablesChanged"
     getSelector (ErrorChanged _)        =   "ErrorChanged"
+    getSelector (ErrorAdded _ _ _)      =   "ErrorAdded"
     getSelector (CurrentErrorChanged _) =   "CurrentErrorChanged"
     getSelector BreakpointChanged       =   "BreakpointChanged"
     getSelector (CurrentBreakChanged _) =   "CurrentBreakChanged"
@@ -343,6 +346,7 @@
     canTriggerEvent _ "UpdateRecent"        = True
     canTriggerEvent _ "VariablesChanged"    = True
     canTriggerEvent _ "ErrorChanged"        = True
+    canTriggerEvent _ "ErrorAdded"          = True
     canTriggerEvent _ "CurrentErrorChanged" = True
     canTriggerEvent _ "BreakpointChanged"   = True
     canTriggerEvent _ "CurrentBreakChanged" = True
diff --git a/src/IDE/Debug.hs b/src/IDE/Debug.hs
--- a/src/IDE/Debug.hs
+++ b/src/IDE/Debug.hs
@@ -94,6 +94,7 @@
         isSuffixOf, unpack)
 import System.Exit (ExitCode(..))
 import IDE.Pane.WebKit.Output (loadOutputUri)
+import qualified Data.Sequence as Seq (filter, empty)
 
 -- | Get the last item
 sinkLast = CL.fold (\_ a -> Just a) Nothing
@@ -147,16 +148,16 @@
     case maybeText of
         Just text -> do
             let command = packageTry $ tryDebug $ do
-                debugSetLiberalScope
-                buffer <- liftIO $ newIORef mempty
-                debugCommand (stripComments text) $ do
-                    _ <- C.getZipSink $ const
-                        <$> C.ZipSink sinkLast
-                        <*> C.ZipSink (logOutputPane text buffer)
-                    mbURI <- lift $ readIDE autoURI
-                    case mbURI of
-                        Just uri -> lift . postSyncIDE . loadOutputUri $ T.unpack uri
-                        Nothing -> return ()
+                    debugSetLiberalScope
+                    buffer <- liftIO $ newIORef mempty
+                    debugCommand (stripComments text) $ do
+                        _ <- C.getZipSink $ const
+                            <$> C.ZipSink sinkLast
+                            <*> C.ZipSink (logOutputPane text buffer)
+                        mbURI <- lift $ readIDE autoURI
+                        case mbURI of
+                            Just uri -> lift . postSyncIDE . loadOutputUri $ T.unpack uri
+                            Nothing -> return ()
             modifyIDE_ $ \ide -> ide {autoCommand = command, autoURI = Nothing}
             command
         Nothing   -> ideMessage Normal "Please select some text in the editor to execute"
@@ -228,13 +229,13 @@
 debugDeleteAllBreakpoints :: IDEAction
 debugDeleteAllBreakpoints = do
     packageTry $ tryDebug $ debugCommand ":delete *" logOutputDefault
-    setBreakpointList []
+    setBreakpointList Seq.empty
 
 debugDeleteBreakpoint :: Text -> LogRef -> IDEAction
 debugDeleteBreakpoint indexString lr = do
     packageTry $ tryDebug $ debugCommand (":delete " <> indexString) logOutputDefault
     bl <- readIDE breakpointRefs
-    setBreakpointList $ filter (/= lr) bl
+    setBreakpointList $ Seq.filter (/= lr) bl
     ideR <- ask
     return ()
 
diff --git a/src/IDE/HLint.hs b/src/IDE/HLint.hs
--- a/src/IDE/HLint.hs
+++ b/src/IDE/HLint.hs
@@ -25,8 +25,9 @@
 import Control.Applicative
 import Prelude hiding(getChar, getLine)
 import IDE.Core.Types
-       (Prefs(..), LogRef(..), LogRefType(..), wsAllPackages, ipdBuildDir,
-        IDEM, IDEAction, IDE(..), IDEPackage(..), PackageAction)
+       (logRefFullFilePath, Prefs(..), LogRef(..), LogRefType(..),
+        wsAllPackages, ipdBuildDir, IDEM, IDEAction, IDE(..),
+        IDEPackage(..), PackageAction)
 import Control.Monad.Reader (asks, MonadReader(..))
 import IDE.Core.State
        (postSyncIDE, catchIDE, MessageLevel(..), ideMessage,
@@ -74,8 +75,9 @@
 import IDE.TextEditor (TextEditor(..))
 import IDE.SourceCandy
        (getCandylessPart, positionToCandy, stringToCandy)
-import IDE.BufferMode (editInsertCode)
+import IDE.BufferMode (IDEBuffer(..), editInsertCode)
 import Data.Ord (comparing)
+import qualified Data.Foldable as F (toList)
 
 packageHLint :: PackageAction
 packageHLint = asks ipdCabalFile >>= (lift . lift . scheduleHLint . Left)
@@ -109,7 +111,7 @@
 runHLint (Right sourceFile) = do
     liftIO . debugM "leksah" $ "runHLint"
     packages <- maybe [] wsAllPackages <$> readIDE workspace
-    case reverse . (sortBy $ comparing (length . ipdBuildDir)) $ filter (belongsToPackage sourceFile) packages of
+    case sortBy (flip (comparing (length . ipdBuildDir))) $ filter (belongsToPackage sourceFile) packages of
         (package:_) -> runHLint' package (Just sourceFile)
         _ -> liftIO . debugM "leksah" $ "runHLint package not found for " <> sourceFile
 runHLint (Left cabalFile) = do
@@ -236,7 +238,7 @@
                   use _ = True
 
 resolveActiveHLint :: IDEM Bool
-resolveActiveHLint = inActiveBufContext False  $ \_ _ ebuf _ _ -> do
+resolveActiveHLint = inActiveBufContext False  $ \_ _ ebuf ideBuf _ -> do
     liftIO $ debugM "leksah" "resolveActiveHLint"
     allLogRefs <- readIDE allLogRefs
     (iStart, iEnd) <- getSelectionBounds ebuf
@@ -244,8 +246,10 @@
     cStart <- getLineOffset iStart
     lEnd <- getLine iEnd
     cEnd <- getLineOffset iEnd
-    let selectedRefs = [ref | ref@LogRef{..} <- allLogRefs,
+    let fn = fileName ideBuf
+    let selectedRefs = [ref | ref@LogRef{..} <- F.toList allLogRefs,
                             logRefType == LintRef
+                         && fn == Just (logRefFullFilePath ref)
                          && maybe "" (ideaHint . snd) logRefIdea /= "Reduce duplication"
                          && (lStart+1, cStart) <= (srcSpanEndLine   logRefSrcSpan,
                                                    srcSpanEndColumn logRefSrcSpan)
diff --git a/src/IDE/ImportTool.hs b/src/IDE/ImportTool.hs
--- a/src/IDE/ImportTool.hs
+++ b/src/IDE/ImportTool.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE OverloadedStrings #-}
 -----------------------------------------------------------------------------
 --
@@ -77,6 +76,8 @@
 import Data.Text (Text)
 import Data.Monoid ((<>))
 import System.Log.Logger (debugM)
+import qualified Data.Traversable as Tr (forM)
+import qualified Data.Foldable as F (toList, foldr, or)
 
 readMaybe :: Read a => Text -> Maybe a
 readMaybe s = case reads $ T.unpack s of
@@ -92,14 +93,14 @@
     when buildInBackground $
         modifyIDE_ (\ide -> ide{prefs = prefs'{backgroundBuild = False}})
     errors <- readIDE errorRefs
-    addPackageResults <- forM errors addPackage
+    addPackageResults <- Tr.forM errors addPackage
     let notInScopes = [ y | (x,y) <-
             nubBy (\ (p1,_) (p2,_) -> p1 == p2)
-                  [(x,y) |  (x,y) <- [((parseNotInScope . refDescription) e, e) | e <- errors]],
+                  [(x,y) |  (x,y) <- [((parseNotInScope . refDescription) e, e) | e <- F.toList errors]],
                                 isJust x]
     let extensions = [ y | (x,y) <-
             nubBy (\ (p1,_) (p2,_) -> p1 == p2)
-                  [(x,y) |  (x,y) <- [((parsePerhapsYouIntendedToUse . refDescription) e, e) | e <- errors]],
+                  [(x,y) |  (x,y) <- [((parsePerhapsYouIntendedToUse . refDescription) e, e) | e <- F.toList errors]],
                                 length x == 1]
     addAll addPackageResults buildInBackground notInScopes extensions
   where
@@ -117,7 +118,7 @@
             when buildInBackground $ do
                 prefs' <- readIDE prefs
                 modifyIDE_ (\ide -> ide{prefs = prefs'{backgroundBuild = True}})
-            when (not (or addPackageResults) && null notInScopes && null extensions) $ do
+            when (not (F.or addPackageResults) && null notInScopes && null extensions) $ do
                 hlintResolved <- resolveActiveHLint
                 unless hlintResolved $ ideMessage Normal "No errors, warnings or selected hlints that can be auto resolved"
 
@@ -258,7 +259,7 @@
                          ServerHeader (Left imports) ->
                             case filter (qualifyAsImportStatement mod) imports of
                                 []     ->   let newLine  =  prettyPrint (newImpDecl mod) <> "\n"
-                                                lastLine = foldr (max . locationELine . importLoc) 0 imports
+                                                lastLine = F.foldr (max . locationELine . importLoc) 0 imports
                                             in do
                                                 i1 <- getIterAtLine gtkbuf lastLine
                                                 editInsertCode gtkbuf i1 newLine
@@ -442,11 +443,7 @@
                                             Just str -> str <> "." <> id
             dia               <- dialogNew
             set dia [ windowTransientFor := parentWindow ]
-#ifdef MIN_VERSION_gtk3
             upper             <- dialogGetContentArea dia
-#else
-            upper             <- dialogGetUpper dia
-#endif
             okButton <- dialogAddButton dia (__"Add Import") ResponseOk
             dialogAddButton dia (__"Cancel") ResponseCancel
             (widget,inj,ext,_) <- buildEditor (moduleFields selectionList qualId) realSelectionString
diff --git a/src/IDE/Leksah.hs b/src/IDE/Leksah.hs
--- a/src/IDE/Leksah.hs
+++ b/src/IDE/Leksah.hs
@@ -85,6 +85,7 @@
        (cssProviderLoadFromString, cssProviderNew)
 import Graphics.UI.Gtk.General.StyleContext
        (styleContextAddProviderForScreen)
+import qualified Data.Sequence as Seq (empty)
 
 -- --------------------------------------------------------------------
 -- Command line options
@@ -374,7 +375,7 @@
           ,   activePack        =   Nothing
           ,   activeExe         =   Nothing
           ,   bufferProjCache   =   Map.empty
-          ,   allLogRefs        =   []
+          ,   allLogRefs        =   Seq.empty
           ,   currentHist       =   0
           ,   currentEBC        =   (Nothing, Nothing, Nothing)
           ,   systemInfo        =   Nothing
@@ -521,11 +522,7 @@
         windowWindowPosition := WinPosCenter]
     dialogAddButton dialog ("gtk-ok"::Text) ResponseOk
     dialogAddButton dialog ("gtk-cancel"::Text) ResponseCancel
-#ifdef MIN_VERSION_gtk3
     vb          <- dialogGetContentArea dialog
-#else
-    vb          <- dialogGetUpper dialog
-#endif
     label       <- labelNew (Just (
         "Before you start using Leksah it will collect and download metadata about your installed Haskell packages.\n" <>
         "You can add folders under which you have sources for Haskell packages not available from Hackage."::Text))
@@ -579,11 +576,7 @@
         windowTitle := ("Leksah: Updating Metadata"::Text),
         windowWindowPosition := WinPosCenter,
         windowDeletable := False]
-#ifdef MIN_VERSION_gtk3
     vb          <- dialogGetContentArea dialog
-#else
-    vb          <- dialogGetUpper dialog
-#endif
     progressBar <- progressBarNew
     progressBarSetText progressBar ("Please wait while Leksah collects information about Haskell packages on your system"::Text)
     progressBarSetFraction progressBar 0.0
diff --git a/src/IDE/LogRef.hs b/src/IDE/LogRef.hs
--- a/src/IDE/LogRef.hs
+++ b/src/IDE/LogRef.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE RecordWildCards, ScopedTypeVariables, OverloadedStrings #-}
 -----------------------------------------------------------------------------
 --
@@ -75,6 +76,10 @@
 import qualified Data.Set as S (notMember, member, insert, empty)
 import Data.Set (Set)
 import System.FilePath.Windows ((</>))
+import Data.Sequence (ViewR(..), Seq)
+import qualified Data.Foldable as F (toList, forM_)
+import qualified Data.Sequence as Seq
+       (null, singleton, viewr, reverse, fromList)
 
 showSourceSpan :: LogRef -> Text
 showSourceSpan = T.pack . displaySrcSpan . logRefSrcSpan
@@ -93,7 +98,7 @@
 forOpenLogRefs f = do
     logRefs <- readIDE allLogRefs
     allBufs <- allBuffers
-    forM_ logRefs $ \ref -> do
+    F.forM_ logRefs $ \ref -> do
         let fp = logRefFullFilePath ref
         fpc <- liftIO $ myCanonicalizePath fp
         forM_ (filter (\buf -> case fileName buf of
@@ -110,23 +115,23 @@
             buf     <-  getBuffer sv
             removeTagByName buf (T.pack $ show (logRefType logRef))
 
-setBreakpointList :: [LogRef] -> IDEAction
+setBreakpointList :: Seq LogRef -> IDEAction
 setBreakpointList breaks = do
     ideR <- ask
     unmarkLogRefs
     errs <- readIDE errorRefs
     contexts <- readIDE contextRefs
-    modifyIDE_ (\ide -> ide{allLogRefs = errs ++ breaks ++ contexts})
+    modifyIDE_ (\ide -> ide{allLogRefs = errs <> breaks <> contexts})
     setCurrentBreak Nothing
     markLogRefs
     triggerEventIDE BreakpointChanged
     return ()
 
-addLogRefs :: [LogRef] -> IDEAction
+addLogRefs :: Seq LogRef -> IDEAction
 addLogRefs refs = do
     ideR <- ask
     unmarkLogRefs
-    modifyIDE_ (\ide -> ide{allLogRefs = allLogRefs ide ++ refs})
+    modifyIDE_ (\ide -> ide{allLogRefs = allLogRefs ide <> refs})
     setCurrentError Nothing
     markLogRefs
     triggerEventIDE (ErrorChanged False)
@@ -134,12 +139,12 @@
     triggerEventIDE TraceChanged
     return ()
 
-next :: (IDE -> [LogRef])
+next :: (IDE -> Seq LogRef)
      -> (IDE -> Maybe LogRef)
      -> (Maybe LogRef -> IDEAction)
      -> IDEAction
 next all current set = do
-    all <- readIDE all
+    all <- F.toList <$> readIDE all
     current <- readIDE current
     let isCurrent = (== current) . Just
     case dropWhile isCurrent (dropWhile (not . isCurrent) all) <> all of
@@ -152,26 +157,26 @@
 nextError = next errorRefs currentError setCurrentError
 
 previousError :: IDEAction
-previousError = next (reverse . errorRefs) currentError setCurrentError
+previousError = next (Seq.reverse . errorRefs) currentError setCurrentError
 
 nextBreakpoint :: IDEAction
 nextBreakpoint = next breakpointRefs currentBreak setCurrentBreak
 
 previousBreakpoint :: IDEAction
-previousBreakpoint = next (reverse . breakpointRefs) currentBreak setCurrentBreak
+previousBreakpoint = next (Seq.reverse . breakpointRefs) currentBreak setCurrentBreak
 
 nextContext :: IDEAction
 nextContext = next contextRefs currentContext setCurrentContext
 
 previousContext :: IDEAction
-previousContext = next (reverse . contextRefs) currentContext setCurrentContext
+previousContext = next (Seq.reverse . contextRefs) currentContext setCurrentContext
 
 lastContext :: IDEAction
 lastContext = do
     contexts <- readIDE contextRefs
     currentContext <- readIDE currentContext
-    case reverse contexts of
-        (l:_) -> do
+    case contexts of
+        (Seq.viewr -> _ :> l) -> do
             setCurrentContext $ Just l
             selectRef $ Just l
         _ -> return ()
@@ -438,7 +443,7 @@
     ideR <- lift ask
     liftIO $ postGUISync $ reflectIDE (do
         allErrorLikeRefs <- readIDE errorRefs
-        triggerEventIDE (Sensitivity [(SensitivityError,not (null allErrorLikeRefs))])
+        triggerEventIDE (Sensitivity [(SensitivityError,not (Seq.null allErrorLikeRefs))])
         let errorNum    =   length (filter isError errs)
         let warnNum     =   length errs - errorNum
         triggerEventIDE (StatusbarChanged [CompartmentState
@@ -511,8 +516,7 @@
                             (T.pack $ "Compiling " ++ show n ++ " of " ++ show total), CompartmentBuild False])) ideR
                         let root = ipdBuildDir package
                             fullFilePath = root </> file
-                        unless (fullFilePath `S.member` filesCompiled) $
-                            reflectIDE (removeBuildLogRefs root file) ideR
+                        reflectIDE (removeBuildLogRefs root file) ideR
                         when inDocTest $ logPrevious testFails
                         return state { inDocTest = False }
                     (Right (DocTestFailure span exp), _, _) -> do
@@ -581,7 +585,7 @@
             _ -> do
                 defaultLineLogger log logLaunch out
                 return Nothing)
-    lift $ setBreakpointList $ catMaybes breaks
+    lift . setBreakpointList . Seq.fromList $ catMaybes breaks
 
 logOutputForSetBreakpoint :: IDEPackage
                         -> LogLaunch           -- ^ loglaunch
@@ -598,7 +602,7 @@
             _ -> do
                 defaultLineLogger log logLaunch out
                 return Nothing)
-    lift $ addLogRefs $ catMaybes breaks
+    lift . addLogRefs . Seq.fromList $ catMaybes breaks
 
 logOutputForSetBreakpointDefault :: IDEPackage
                                  -> C.Sink ToolOutput IDEM ()
@@ -623,7 +627,7 @@
                 defaultLineLogger log logLaunch out
                 return Nothing)
     lift $ unless (null refs) $ do
-        addLogRefs [last refs]
+        addLogRefs . Seq.singleton $ last refs
         lastContext
 
 contextParser :: CharParser () SrcSpan
diff --git a/src/IDE/Package.hs b/src/IDE/Package.hs
--- a/src/IDE/Package.hs
+++ b/src/IDE/Package.hs
@@ -178,7 +178,7 @@
                 reflectIDE (do
                     interruptSaveAndRun action
                     return False) ideR
-                return False) priorityDefaultIdle 200
+                return False) priorityDefault 200
             return ()
         else liftIDE run
   where
@@ -266,7 +266,7 @@
                                 buildPackage backgroundBuild jumpToWarnings withoutLinking
                                                 package continuation
                                 return False) ideR
-                            return False) priorityDefaultIdle 100
+                            return False) priorityDefault 100
                         return ()
                 else do
                     when (saveAllBeforeBuild prefs) . liftIDE . void $ fileSaveAll belongsToWorkspace
diff --git a/src/IDE/Pane/Breakpoints.hs b/src/IDE/Pane/Breakpoints.hs
--- a/src/IDE/Pane/Breakpoints.hs
+++ b/src/IDE/Pane/Breakpoints.hs
@@ -40,6 +40,8 @@
 import Control.Monad.IO.Class (MonadIO(..))
 import IDE.Utils.GUIUtils (treeViewContextMenu, __)
 import qualified Data.Text as T (words, unpack)
+import qualified Data.Foldable as F (toList)
+import qualified Data.Sequence as Seq (elemIndexL)
 
 
 -- | A breakpoints pane description
@@ -126,7 +128,7 @@
             liftIO $ do
                 treeStoreClear (breakpoints b)
                 mapM_ (\ (lr,index) -> treeStoreInsert (breakpoints b) [] index lr)
-                    (zip refs [0..length refs])
+                    (zip (F.toList refs) [0..])
 
 getSelectedBreakpoint ::  TreeView
     -> TreeStore LogRef
@@ -148,7 +150,7 @@
         selection <- treeViewGetSelection (treeView breaks)
         case mbLogRef of
             Nothing -> treeSelectionUnselectAll selection
-            Just lr -> case lr `elemIndex` breakRefs' of
+            Just lr -> case lr `Seq.elemIndexL` breakRefs' of
                         Nothing  -> return ()
                         Just ind -> treeSelectionSelectPath selection [ind]
 
diff --git a/src/IDE/Pane/Errors.hs b/src/IDE/Pane/Errors.hs
--- a/src/IDE/Pane/Errors.hs
+++ b/src/IDE/Pane/Errors.hs
@@ -20,6 +20,7 @@
     IDEErrors
 ,   ErrorsState
 ,   fillErrorList
+,   addErrorToList
 ,   selectError
 ,   getErrors
 ,   selectMatchingErrors
@@ -40,6 +41,8 @@
        (intercalate, lines, takeWhile, length, drop)
 import Data.IORef (writeIORef, readIORef, newIORef, IORef)
 import Data.Maybe (isNothing)
+import qualified Data.Foldable as F (toList)
+import qualified Data.Sequence as Seq (null, elemIndexL)
 
 -- | A breakpoints pane description
 --
@@ -134,12 +137,12 @@
 fillErrorList' pane = do
     refs <- readIDE errorRefs
     ac   <- liftIO $ readIORef (autoClose pane)
-    when (null refs && ac) . void $ closePane pane
+    when (Seq.null refs && ac) . void $ closePane pane
     isDark <- getDarkState
     liftIO $ do
         let store = errorStore pane
         listStoreClear store
-        forM_ (zip refs [0..]) $ \ (lr, index) ->
+        forM_ (zip (F.toList refs) [0..]) $ \ (lr, index) ->
             listStoreInsert store index $ ErrColumn lr (
                 (if even index then fst else snd) $
                 (if isDark then fst else snd) $
@@ -148,6 +151,28 @@
                         LintRef    -> (("#003000", "#002800"), ("#DBFFDB", "#EDFFED"))
                         _          -> (("#380000", "#280000"), ("#FFDEDE", "#FFEBEB")))
 
+addErrorToList :: Bool -> Int -> LogRef -> IDEAction
+addErrorToList False index lr = getPane >>= maybe (return ()) (addErrorToList' index lr)
+addErrorToList True  index lr = getErrors Nothing  >>= \ p -> addErrorToList' index lr p >> displayPane p False
+
+addErrorToList' :: Int -> LogRef -> IDEErrors -> IDEAction
+addErrorToList' index lr pane = do
+--    refs <- readIDE errorRefs
+    ac   <- liftIO $ readIORef (autoClose pane)
+--    when (null refs && ac) . void $ closePane pane
+    isDark <- getDarkState
+    liftIO $ do
+        let store = errorStore pane
+--        listStoreClear store
+--        forM_ (zip (toList refs) [0..]) $ \ (lr, index) ->
+        listStoreInsert store index $ ErrColumn lr (
+                (if even index then fst else snd) $
+                (if isDark then fst else snd) $
+                    case logRefType lr of
+                        WarningRef -> (("#282000", "#201900"), ("#FFF1DE", "#FFF5E8"))
+                        LintRef    -> (("#003000", "#002800"), ("#DBFFDB", "#EDFFED"))
+                        _          -> (("#380000", "#280000"), ("#FFDEDE", "#FFEBEB")))
+
 getSelectedError ::  TreeView
     -> ListStore ErrColumn
     -> IO (Maybe LogRef)
@@ -176,7 +201,7 @@
                 unless (size == 0) $
                     treeViewScrollToCell (treeView errors) (Just [0]) Nothing Nothing
                 treeSelectionUnselectAll selection
-            Just lr -> case lr `elemIndex` errorRefs' of
+            Just lr -> case lr `Seq.elemIndexL` errorRefs' of
                         Nothing  -> return ()
                         Just ind -> do
                             treeViewScrollToCell (treeView errors) (Just [ind]) Nothing Nothing
diff --git a/src/IDE/Pane/Log.hs b/src/IDE/Pane/Log.hs
--- a/src/IDE/Pane/Log.hs
+++ b/src/IDE/Pane/Log.hs
@@ -73,7 +73,7 @@
         TextWindowType(..), ShadowType(..), PolicyType(..), hBoxNew, buttonNewWithLabel,
         vBoxNew, comboBoxNewText, menuItemActivate,
         comboBoxAppendText, comboBoxSetActive, comboBoxGetActiveText,
-        priorityDefaultIdle, idleAdd,Frame, frameNew,buttonActivated,
+        priorityDefault, idleAdd,Frame, frameNew,buttonActivated,
         boxPackStart, boxPackEnd, Packing(..), comboBoxGetActive, comboBoxRemoveText,
         comboBoxGetModelText, listStoreToList, after) --TODO remove import for logging only
 import qualified Data.Map as Map
@@ -88,7 +88,8 @@
         isPrefixOf, pack, length, unpack)
 import Data.Monoid (Monoid(..), (<>))
 import Data.List (elemIndex, isPrefixOf, isSuffixOf, findIndex)
-import Data.Foldable (forM_)
+import qualified Data.Foldable as F (toList, forM_)
+import qualified Data.Sequence as Seq (empty)
 
 -------------------------------------------------------------------------------
 --
@@ -408,7 +409,7 @@
         (_,y')      <-  textViewWindowToBufferCoords tv TextWindowWidget (x,y)
         (iter,_)    <-  textViewGetLineAtY tv y'
         textIterGetLine iter
-    case [(s,e,es) | es@LogRef{logLines = Just (s, e)} <- logRefs', s <= (line'+1) && e >= (line'+1)] of
+    case [(s,e,es) | es@LogRef{logLines = Just (s, e)} <- F.toList logRefs', s <= (line'+1) && e >= (line'+1)] of
         [(s,e,thisRef)] -> do
             mbBuf <- selectSourceBuf (logRefFullFilePath thisRef)
             case mbBuf of
@@ -438,7 +439,7 @@
             (_,y')      <-  textViewWindowToBufferCoords tv TextWindowWidget (x,y)
             (iter,_)    <-  textViewGetLineAtY tv y'
             textIterGetLine iter
-        return [es | es@LogRef{logLines = Just (s, e)} <- logRefs', s <= (line'+1) && e >= (line'+1)]) ideR
+        return [es | es@LogRef{logLines = Just (s, e)} <- F.toList logRefs', s <= (line'+1) && e >= (line'+1)]) ideR
     case res of
         [thisRef] -> do
             addResolveMenuItems ideR menu thisRef
@@ -488,7 +489,7 @@
     textBufferMoveMarkByName buf "end" iter2
     mbMark <- textBufferGetMark buf "end"
     line   <- textIterGetLine iter2
-    forM_ mbMark (textViewScrollMarkOnscreen tv)
+    F.forM_ mbMark (textViewScrollMarkOnscreen tv)
     return line
 
 markErrorInLog :: IDELog -> (Int,Int) -> IDEAction
@@ -506,7 +507,7 @@
             Just mark ->  do
                     textViewScrollToMark tv  mark 0.0 (Just (0.3,0.3))
                     return ()
-        return False) priorityDefaultIdle
+        return False) priorityDefault
     return ()
 
 
@@ -515,7 +516,7 @@
     log <- getLog
     buf <- liftIO $ textViewGetBuffer $ logLaunchTextView log
     liftIO $ textBufferSetText buf ("" :: Text)
-    modifyIDE_ (\ide -> ide{allLogRefs = []})
+    modifyIDE_ (\ide -> ide{allLogRefs = Seq.empty})
     setCurrentError Nothing
     setCurrentBreak Nothing
 
diff --git a/src/IDE/Pane/Modules.hs b/src/IDE/Pane/Modules.hs
--- a/src/IDE/Pane/Modules.hs
+++ b/src/IDE/Pane/Modules.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE FlexibleInstances #-}
@@ -1221,11 +1220,7 @@
     set dia [ windowTransientFor := parent
             , windowTitle := __ "Construct new module" ]
     windowSetDefaultSize dia 400 100
-#ifdef MIN_VERSION_gtk3
     upper                      <-   dialogGetContentArea dia
-#else
-    upper                      <-   dialogGetUpper dia
-#endif
     lower                      <-   dialogGetActionArea dia
     (widget,inj,ext,_)  <-   buildEditor (moduleFields sourceRoots hasLib exesTests)
                                         (AddModule modString (head sourceRoots) (Just False) Set.empty)
diff --git a/src/IDE/Pane/PackageEditor.hs b/src/IDE/Pane/PackageEditor.hs
--- a/src/IDE/Pane/PackageEditor.hs
+++ b/src/IDE/Pane/PackageEditor.hs
@@ -267,11 +267,7 @@
     dia                        <-   dialogNew
     set dia [ windowTransientFor := parent
             , windowTitle := __ "Create New Package" ]
-#ifdef MIN_VERSION_gtk3
     upper                      <-   dialogGetContentArea dia
-#else
-    upper                      <-   dialogGetUpper dia
-#endif
     lower                      <-   dialogGetActionArea dia
     (widget,inj,ext,_)         <-   buildEditor (packageFields workspaceDir)
                                         (NewPackage "" workspaceDir Nothing)
@@ -393,11 +389,7 @@
     dia                        <-   dialogNew
     set dia [ windowTransientFor := parent
             , windowTitle := __ "Clone Package" ]
-#ifdef MIN_VERSION_gtk3
     upper                      <-   dialogGetContentArea dia
-#else
-    upper                      <-   dialogGetUpper dia
-#endif
     lower                      <-   dialogGetActionArea dia
     (widget,inj,ext,_)         <-   buildEditor (cloneFields packages workspaceDir)
                                         (ClonePackageSourceRepo "" workspaceDir)
@@ -1271,13 +1263,13 @@
                 $ para) noti
     let pinj (PackageIdentifier (PackageName n) v) = inj (n,v)
     let pext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (n,v) -> return $
-                if null n
-                    then Nothing
-                    else Just $ PackageIdentifier (PackageName n) v
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (n,v) -> return $
+                    if null n
+                        then Nothing
+                        else Just $ PackageIdentifier (PackageName n) v
     return (wid,pinj,pext)
 
 testedWithEditor :: Editor [(CompilerFlavor, VersionRange)]
@@ -1306,11 +1298,11 @@
                         (OtherCompiler str) -> inj (Right $ T.pack str)
                         other               -> inj (Left other)
     let cfext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (Right s) -> return (Just . OtherCompiler $ T.unpack s)
-            Just (Left other) -> return (Just other)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (Right s) -> return (Just . OtherCompiler $ T.unpack s)
+                Just (Left other) -> return (Just other)
     return (wid,cfinj,cfext)
         where
         flavors = [GHC, NHC, Hugs, HBC, Helium, JHC]
@@ -1327,11 +1319,11 @@
                         (UnknownBuildType str) -> inj (Right $ T.pack str)
                         other               -> inj (Left other)
     let cfext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (Right s) -> return (Just . UnknownBuildType $ T.unpack s)
-            Just (Left other) -> return (Just other)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (Right s) -> return (Just . UnknownBuildType $ T.unpack s)
+                Just (Left other) -> return (Just other)
     return (wid,cfinj,cfext)
         where
         flavors = [Simple, Configure, Make, Custom]
@@ -1558,11 +1550,11 @@
             noti
     let pinj (Library' em exp bi) = inj (exp, map (T.pack . display) em,bi)
     let pext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (exp,em,bi) -> return (Just $ Library' (map (\s -> forceJust (simpleParse $ T.unpack s)
-                "SpecialEditor >> libraryEditor: no parse for moduile name") em) exp bi)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (exp,em,bi) -> return (Just $ Library' (map (\s -> forceJust (simpleParse $ T.unpack s)
+                    "SpecialEditor >> libraryEditor: no parse for moduile name") em) exp bi)
     return (wid,pinj,pext)
 #endif
 
@@ -1601,10 +1593,10 @@
         noti
     let pinj (Executable' s f bi) = inj (s,f,bi)
     let pext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (s,f,bi) -> return (Just $Executable' s f bi)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (s,f,bi) -> return (Just $Executable' s f bi)
     return (wid,pinj,pext)
 
 testsEditor :: Maybe FilePath -> [ModuleName] -> Int -> Editor [Test']
@@ -1643,10 +1635,10 @@
     let pinj (Test' s (TestSuiteExeV10 (Version [1,0] []) f) bi) = inj (s,f,bi)
         pinj _ = error "Unexpected Test Interface"
     let pext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (s,f,bi) -> return (Just $Test' s (TestSuiteExeV10 (Version [1,0] []) f) bi)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (s,f,bi) -> return (Just $Test' s (TestSuiteExeV10 (Version [1,0] []) f) bi)
     return (wid,pinj,pext)
 
 benchmarksEditor :: Maybe FilePath -> [ModuleName] -> Int -> Editor [Benchmark']
@@ -1685,10 +1677,10 @@
     let pinj (Benchmark' s (BenchmarkExeV10 (Version [1,0] []) f) bi) = inj (s,f,bi)
         pinj _ = error "Unexpected Benchmark Interface"
     let pext = do
-        mbp <- ext
-        case mbp of
-            Nothing -> return Nothing
-            Just (s,f,bi) -> return (Just $Benchmark' s (BenchmarkExeV10 (Version [1,0] []) f) bi)
+            mbp <- ext
+            case mbp of
+                Nothing -> return Nothing
+                Just (s,f,bi) -> return (Just $Benchmark' s (BenchmarkExeV10 (Version [1,0] []) f) bi)
     return (wid,pinj,pext)
 
 buildInfoEditorP :: Int -> Editor Int
@@ -1696,11 +1688,11 @@
     (wid,inj,ext) <- intEditor (1.0,fromIntegral numberOfBuildInfos,1.0)
         (paraName <<<- ParaName (__ "Build Info") $para) noti
     let pinj i = inj (i + 1)
-    let pext =   do
-        mbV <- ext
-        case mbV of
-            Nothing -> return Nothing
-            Just i  -> return (Just (i - 1))
+    let pext = do
+            mbV <- ext
+            case mbV of
+                Nothing -> return Nothing
+                Just i  -> return (Just (i - 1))
     return (wid,pinj,pext)
 
 -- ------------------------------------------------------------
diff --git a/src/IDE/Pane/Preferences.hs b/src/IDE/Pane/Preferences.hs
--- a/src/IDE/Pane/Preferences.hs
+++ b/src/IDE/Pane/Preferences.hs
@@ -144,10 +144,10 @@
             let prefsPane = IDEPrefs vb
 
             let applyPrefs newPrefs = do
-                lastAppliedPrefs    <- readIORef lastAppliedPrefsRef
-                reflectIDE (modifyIDE_ (\ide -> ide{prefs = newPrefs})) ideR
-                mapM_ (\f -> reflectIDE (applicator f newPrefs lastAppliedPrefs) ideR) flatPrefsDesc
-                writeIORef lastAppliedPrefsRef newPrefs
+                    lastAppliedPrefs    <- readIORef lastAppliedPrefsRef
+                    reflectIDE (modifyIDE_ (\ide -> ide{prefs = newPrefs})) ideR
+                    mapM_ (\f -> reflectIDE (applicator f newPrefs lastAppliedPrefs) ideR) flatPrefsDesc
+                    writeIORef lastAppliedPrefsRef newPrefs
 
             on preview buttonActivated $ do
                 mbNewPrefs <- extract initialPrefs [ext]
diff --git a/src/IDE/Pane/SourceBuffer.hs b/src/IDE/Pane/SourceBuffer.hs
--- a/src/IDE/Pane/SourceBuffer.hs
+++ b/src/IDE/Pane/SourceBuffer.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE CPP #-}
+{-# LANGUAGE ViewPatterns #-}
 {-# LANGUAGE MultiParamTypeClasses #-}
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE TypeSynonymInstances #-}
@@ -122,7 +123,6 @@
         scrolledWindowSetPolicy, dialogSetDefaultResponse,
         fileChooserSetCurrentFolder, fileChooserSelectFilename,
         TextSearchFlags(..))
-import System.Glib.MainLoop (priorityDefaultIdle, idleAdd)
 import qualified Graphics.UI.Gtk as Gtk hiding (eventKeyName)
 import Graphics.UI.Gtk.Windows.Window
 import Graphics.UI.Gtk.General.Enums
@@ -152,10 +152,22 @@
 import Data.Time (UTCTime(..))
 import Graphics.UI.Gtk.Gdk.EventM
        (eventModifier, eventKeyName, eventKeyVal)
-import Data.Foldable (forM_)
+import qualified Data.Foldable as F (Foldable(..), forM_, toList)
 import Data.Traversable (forM)
 import Language.Haskell.HLint3 (Idea(..))
+-- import Data.Time.Clock.POSIX (getPOSIXTime)
+import qualified Data.Sequence as Seq
+import Data.Sequence (ViewR(..), (|>))
 
+--time :: MonadIO m => String -> m a -> m a
+--time name action = do
+--  liftIO . debugM "leksah" $ name <> " start"
+--  start <- liftIO $ realToFrac <$> getPOSIXTime
+--  result <- action
+--  end <- liftIO $ realToFrac <$> getPOSIXTime
+--  liftIO . debugM "leksah" $ name <> " took " <> show ((end - start) * 1000000) <> "us"
+--  return result
+
 allBuffers :: MonadIDE m => m [IDEBuffer]
 allBuffers = liftIDE getPanes
 
@@ -175,8 +187,7 @@
         mbbuf    <-  newTextBuffer pp (T.pack $ takeFileName n) (Just n)
         case mbbuf of
             Just (IDEBuffer {sourceView=v}) -> do
-                ideR    <- ask
-                liftIO . (`idleAdd` priorityDefaultIdle) . (`reflectIDE` ideR) $ do
+                postAsyncIDEIdle $ do
                     liftIO $ debugM "leksah" "SourceBuffer recoverState idle callback"
                     gtkBuf  <- getBuffer v
                     iter    <- getIterAtOffset gtkBuf i
@@ -184,15 +195,13 @@
                     mark    <- getInsertMark gtkBuf
                     scrollToMark v mark 0.0 (Just (0.3,0.3))
                     liftIO $ debugM "leksah" "SourceBuffer recoverState done"
-                    return False
                 return mbbuf
             Nothing -> return Nothing
     recoverState pp (BufferStateTrans bn text i) =   do
         mbbuf    <-  newTextBuffer pp bn Nothing
         case mbbuf of
             Just (buf@IDEBuffer {sourceView=v}) -> do
-                ideR    <- ask
-                liftIO . (`idleAdd` priorityDefaultIdle) . (`reflectIDE` ideR) $ do
+                postAsyncIDEIdle $ do
                     liftIO $ debugM "leksah" "SourceBuffer recoverState idle callback"
                     useCandy <- useCandyFor buf
                     gtkBuf   <-  getBuffer v
@@ -204,7 +213,6 @@
                     mark     <-  getInsertMark gtkBuf
                     scrollToMark v mark 0.0 (Just (0.3,0.3))
                     liftIO $ debugM "leksah" "SourceBuffer recoverState done"
-                    return False
                 return (Just buf)
             Nothing -> return Nothing
     makeActive (actbuf@IDEBuffer {sourceView=sv}) = do
@@ -315,14 +323,12 @@
                 iter2Temp       <-  getIterAtLine ebuf (max 0 (min (lines-1) (locationELine -1)))
                 chars2          <-  getCharsInLine iter2Temp
                 iter2 <- atLineOffset iter2Temp (max 0 (min (chars2-1) locationECol))
-                -- ### we had a problem before using this idleAdd thing
-                ideR <- ask
-                liftIO . (`idleAdd` priorityDefaultIdle) . (`reflectIDE` ideR) $ do
+                -- ### we had a problem before using postAsyncIDEIdle
+                postAsyncIDEIdle $ do
                     liftIO $ debugM "lekash" "goToSourceDefinition triggered selectRange"
                     selectRange ebuf iter iter2
                     liftIO $ debugM "lekash" "goToSourceDefinition triggered scrollToIter"
                     scrollToIter sv iter 0.0 (Just (0.3,0.3))
-                    return False
                 return ()
         Nothing -> return ()
     return mbBuf
@@ -348,17 +354,17 @@
 
 removeLogRefs :: (FilePath -> FilePath -> Bool) -> [LogRefType] -> IDEAction
 removeLogRefs toRemove' types = do
-    (remove, keep) <- partition toRemove <$> readIDE allLogRefs
+    (remove, keep) <- Seq.partition toRemove <$> readIDE allLogRefs
     let removeDetails = Map.fromListWith (<>) . nub $ map (\ref ->
                             (logRefRootPath ref </> logRefFilePath ref,
-                            [logRefType ref])) remove
+                            [logRefType ref])) $ F.toList remove
     modifyIDE_ (\ide -> ide{allLogRefs = keep})
 
     buffers <- allBuffers
     let matchingBufs = filter (maybe False (`Map.member` removeDetails) . fileName) buffers
-    forM_ matchingBufs $ \ (IDEBuffer {..}) -> do
+    F.forM_ matchingBufs $ \ (IDEBuffer {..}) -> do
         buf <- getBuffer sourceView
-        forM_ (maybe [] (fromMaybe [] . (`Map.lookup` removeDetails)) fileName) $
+        F.forM_ (maybe [] (fromMaybe [] . (`Map.lookup` removeDetails)) fileName) $
             removeTagByName buf . T.pack . show
 
     triggerEventIDE (ErrorChanged False)
@@ -400,7 +406,7 @@
     allLogRefs   <- readIDE allLogRefs
     currentError <- readIDE currentError
     let (moreImportant, rest) =
-            span (\old ->
+           Seq.spanl (\old ->
                 let samePackage = logRefRootPath old     == logRefRootPath ref
                     sameFile    = logRefFullFilePath old == logRefFullFilePath ref in
                 -- Work out when the old ref is more important than the new
@@ -419,19 +425,20 @@
                     (LintRef       , _             ) -> samePackage
                     (ContextRef    , _             ) -> False
                     (BreakpointRef , _             ) -> False) allLogRefs
-        currErr = if currentError `elem` map Just moreImportant
+        currErr = if currentError `elem` map Just (F.toList moreImportant)
                         then currentError
                         else Nothing
     modifyIDE_ $ \ ide ->
-        ide{ allLogRefs = moreImportant <> [ref] <> rest
+        ide{ allLogRefs = (moreImportant |> ref) <> rest
            , currentEBC = (currErr, currentBreak ide, currentContext ide)
            }
 
     buffers <- allBuffers
     let matchingBufs = filter (maybe False (equalFilePath (logRefFullFilePath ref)) . fileName) buffers
-    forM_ matchingBufs $ \ buf -> markRefInSourceBuf buf ref False
+    F.forM_ matchingBufs $ \ buf -> markRefInSourceBuf buf ref False
 
-    triggerEventIDE . ErrorChanged $ not backgroundBuild && null moreImportant
+    triggerEventIDE $ ErrorAdded
+        (not backgroundBuild && Seq.null moreImportant) (Seq.length moreImportant) ref
     return ()
 
 markRefInSourceBuf :: IDEBuffer -> LogRef -> Bool -> IDEAction
@@ -472,8 +479,11 @@
                 new     <- atLineOffset newTmp (max 0 (min (chars-1) (snd end)))
                 forwardCharC new
 
-        let latest = if null contextRefs then Nothing else Just $ last contextRefs
-        let isOldContext = case (logRefType logRef, latest) of
+        let last (Seq.viewr -> EmptyR)  = Nothing
+            last (Seq.viewr -> xs :> x) = Just x
+            last _                      = Nothing
+            latest = last contextRefs
+            isOldContext = case (logRefType logRef, latest) of
                                 (ContextRef, Just ctx) | ctx /= logRef -> True
                                 _ -> False
         unless isOldContext $ do
@@ -481,17 +491,13 @@
             lineStart <- backwardToLineStartC iter
             createMark sv (logRefType logRef) lineStart $ refDescription logRef
             applyTagByName ebuf tagName iter iter2
-        when scrollTo $ do
-            ideR    <- ask
-            liftIO . (`idleAdd` priorityDefaultIdle) . (`reflectIDE` ideR) $ do
-                liftIO $ debugM "lekash" "markRefInSourceBuf triggered placeCursor"
-                placeCursor ebuf iter
-                mark <- getInsertMark ebuf
-                liftIO $ debugM "lekash" "markRefInSourceBuf trigged scrollToMark"
-                scrollToMark sv mark 0.3 Nothing
-                when isOldContext $ selectRange ebuf iter iter2
-                return False
-            return ()
+        when scrollTo . postAsyncIDE $ do
+            liftIO $ debugM "lekash" "markRefInSourceBuf triggered placeCursor"
+            placeCursor ebuf iter
+            mark <- getInsertMark ebuf
+            liftIO $ debugM "lekash" "markRefInSourceBuf trigged scrollToMark"
+            scrollToMark sv mark 0.3 Nothing
+            when isOldContext $ selectRange ebuf iter iter2
 
 -- | Tries to create a new text buffer, fails when the given filepath
 -- does not exist or when it is not a text file.
@@ -648,9 +654,9 @@
             modifier    <- lift eventModifier
             liftIDE $ do
                 let moveToNextWord iterOp sel  = do
-                    sel' <- iterOp sel
-                    rs <- isRangeStart sel'
-                    if rs then return sel' else moveToNextWord iterOp sel'
+                        sel' <- iterOp sel
+                        rs <- isRangeStart sel'
+                        if rs then return sel' else moveToNextWord iterOp sel'
                 let calculateNewPosition iterOp = getInsertIter buffer >>= moveToNextWord iterOp
                 let continueSelection keepSelBound nsel = do
                         if keepSelBound
@@ -899,7 +905,7 @@
         Just path -> do
           nb <- getNotebook path
           mbBS <- maybeActiveBuf
-          forM_ mbBS (markLabelAsChanged nb)
+          F.forM_ mbBS (markLabelAsChanged nb)
 
 markLabelAsChanged :: Notebook -> IDEBuffer -> IDEAction
 markLabelAsChanged nb (buf@IDEBuffer{sourceView = sv}) = do
@@ -1065,7 +1071,7 @@
         then return False
         else do
             closeThisPane currentBuffer
-            forM_ (fileName currentBuffer) addRecentlyUsedFile
+            F.forM_ (fileName currentBuffer) addRecentlyUsedFile
             return True
 
 fileCloseAll :: (IDEBuffer -> IDEM Bool)  -> IDEM Bool
@@ -1157,7 +1163,7 @@
                 widgetDestroy dialog
                 return Nothing
             _ -> return Nothing
-    forM_ mbFileName fileOpenThis
+    F.forM_ mbFileName fileOpenThis
 
 
 fileOpenThis :: FilePath -> IDEAction
@@ -1312,7 +1318,7 @@
             sol2 <- forwardCharsC sol (tabWidth prefs)
             str1 <- getText ebuf sol sol2 True
             return (str1 == str)
-        return (foldl' (&&) True boolList)
+        return (F.foldl' (&&) True boolList)
 
 
 editShiftRight :: IDEAction
@@ -1327,7 +1333,7 @@
 alignChar :: Char -> IDEAction
 alignChar char = do
     positions     <- positionsOfChar
-    let alignTo = foldl' max 0 (mapMaybe snd positions)
+    let alignTo = F.foldl' max 0 (mapMaybe snd positions)
     when (alignTo > 0) $ alignChar (Map.fromList positions) alignTo
     where
     positionsOfChar :: IDEM [(Int, Maybe Int)]
diff --git a/src/IDE/Pane/WebKit/Output.hs b/src/IDE/Pane/WebKit/Output.hs
--- a/src/IDE/Pane/WebKit/Output.hs
+++ b/src/IDE/Pane/WebKit/Output.hs
@@ -208,12 +208,15 @@
 
 getValueUri :: IO Text
 getValueUri = do
-    dataDir <- leksahOrPackageDir "pretty-show" getDataDir
+    dataDir <- map fixSep <$> leksahOrPackageDir "pretty-show" getDataDir
     return . T.pack $ "file://"
         ++ (case dataDir of
                 ('/':_) -> dataDir
                 _       -> '/':dataDir)
         ++ "/value.html"
+  where
+    fixSep '\\' = '/'
+    fixSep x = x
 
 setOutput :: Text -> Text -> IDEAction
 setOutput command str =
diff --git a/src/IDE/Session.hs b/src/IDE/Session.hs
--- a/src/IDE/Session.hs
+++ b/src/IDE/Session.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE OverloadedStrings #-}
 -----------------------------------------------------------------------------
@@ -30,11 +29,9 @@
 
 import Prelude hiding (catch)
 import Graphics.UI.Gtk hiding (showLayout)
-#ifdef MIN_VERSION_gtk3
 import Graphics.UI.Gtk.General.CssProvider (cssProviderNew, cssProviderLoadFromString)
 import Graphics.UI.Gtk.General.StyleContext (styleContextAddProvider)
 import Control.Applicative ((<$>))
-#endif
 import System.FilePath
 import qualified Data.Map as Map
 import Data.Maybe
@@ -661,14 +658,12 @@
 viewDark :: IDEAction
 viewDark = getDarkState >>= setDark
 
-#ifdef MIN_VERSION_gtk3
 getActiveSettings :: PaneMonad alpha => alpha (Maybe Settings)
 getActiveSettings = do
     mbScreen <- getActiveScreen
     case mbScreen of
         Nothing -> return Nothing
         Just screen -> liftIO $ Just <$> settingsGetForScreen screen
-#endif
 
 setDark :: Bool -> IDEM ()
 setDark dark = do
@@ -677,7 +672,6 @@
     prefs <- readIDE prefs
     buffers <- allBuffers
     mapM_ updateStyle' buffers
-#ifdef MIN_VERSION_gtk3
     mbSettings <- getActiveSettings
     case mbSettings of
         Just settings -> liftIO $ settingsSetLongProperty
@@ -686,9 +680,5 @@
                             (if dark then 1 else 0)
                             "Leksah"
         Nothing -> return ()
-#else
-    return ()
-#endif
-
 
 
diff --git a/src/IDE/SymbolNavigation.hs b/src/IDE/SymbolNavigation.hs
--- a/src/IDE/SymbolNavigation.hs
+++ b/src/IDE/SymbolNavigation.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE CPP #-}
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE OverloadedStrings #-}
 -----------------------------------------------------------------------------
@@ -29,11 +28,7 @@
         adjustmentGetValue, scrolledWindowGetHAdjustment, pointerUngrab,
         eventTime, leaveNotifyEvent, ScrolledWindow, Modifier(..),
         Rectangle(..), EventMask(..), Underline(..),
-#ifdef MIN_VERSION_gtk3
         widgetGetWindow
-#else
-        widgetGetDrawWindow
-#endif
         )
 import System.Glib.Signals (on)
 import IDE.TextEditor (TextEditor(..), EditorView(..), EditorIter(..))
@@ -75,46 +70,42 @@
         return True)
 
     let moveOrClick eventX eventY mods eventTime click = do
-        sx <- liftIO $ scrolledWindowGetHAdjustment sw >>= adjustmentGetValue
-        sy <- liftIO $ scrolledWindowGetVAdjustment sw >>= adjustmentGetValue
+            sx <- liftIO $ scrolledWindowGetHAdjustment sw >>= adjustmentGetValue
+            sy <- liftIO $ scrolledWindowGetVAdjustment sw >>= adjustmentGetValue
 
-        let ex = eventX + sx
-            ey = eventY + sy
-            ctrlPressed = mapControlCommand Control `elem` mods
-            shiftPressed = Shift `elem` mods
-        iter <- getIterAtLocation sv (round ex) (round ey)
-        (Rectangle _ _ szx szy) <- liftIO $ widgetGetAllocation sw
-        if eventX < 0 || eventY < 0
-            || round eventX > szx || round eventY > szy then do
-                liftIO $ pointerUngrab eventTime
-                return True
-          else do
-            (beg, en) <- identifierMapper ctrlPressed shiftPressed iter
-            slice <- getSlice tvb beg en True
-            removeTagByName tvb "link"
-            offs <- getLineOffset beg
-            offsc <- getLineOffset iter
-            if T.length slice > 1 then
-                if click then do
-                        liftIO $ pointerUngrab eventTime
-                        clickHandler ctrlPressed shiftPressed slice
-                    else do
-                        applyTagByName tvb "link" beg en
-                        Just screen <- liftIO screenGetDefault
-#ifdef MIN_VERSION_gtk3
-                        mbDW <- liftIO $ widgetGetWindow tv
-#else
-                        mbDW <- liftIO $ Just <$> widgetGetDrawWindow tv
-#endif
-                        case mbDW of
-                            Nothing -> return ()
-                            Just dw -> do
-                                liftIO $ pointerGrab dw False [PointerMotionMask,ButtonPressMask,LeaveNotifyMask] (Nothing  :: Maybe DrawWindow) (Just cursor) eventTime
-                                return ()
+            let ex = eventX + sx
+                ey = eventY + sy
+                ctrlPressed = mapControlCommand Control `elem` mods
+                shiftPressed = Shift `elem` mods
+            iter <- getIterAtLocation sv (round ex) (round ey)
+            (Rectangle _ _ szx szy) <- liftIO $ widgetGetAllocation sw
+            if eventX < 0 || eventY < 0
+                || round eventX > szx || round eventY > szy then do
+                    liftIO $ pointerUngrab eventTime
+                    return True
               else do
-                liftIO $ pointerUngrab eventTime
-                return ()
-            return True
+                (beg, en) <- identifierMapper ctrlPressed shiftPressed iter
+                slice <- getSlice tvb beg en True
+                removeTagByName tvb "link"
+                offs <- getLineOffset beg
+                offsc <- getLineOffset iter
+                if T.length slice > 1 then
+                    if click then do
+                            liftIO $ pointerUngrab eventTime
+                            clickHandler ctrlPressed shiftPressed slice
+                        else do
+                            applyTagByName tvb "link" beg en
+                            Just screen <- liftIO screenGetDefault
+                            mbDW <- liftIO $ widgetGetWindow tv
+                            case mbDW of
+                                Nothing -> return ()
+                                Just dw -> do
+                                    liftIO $ pointerGrab dw False [PointerMotionMask,ButtonPressMask,LeaveNotifyMask] (Nothing  :: Maybe DrawWindow) (Just cursor) eventTime
+                                    return ()
+                  else do
+                    liftIO $ pointerUngrab eventTime
+                    return ()
+                return True
     lineNumberBugFix <- liftIO $ newIORef Nothing
     let fixBugWithX mods isHint (eventX, eventY) ptrx = do
             let hasNoControlModifier = mapControlCommand Control `notElem` mods
diff --git a/src/IDE/TextEditor/CodeMirror.hs b/src/IDE/TextEditor/CodeMirror.hs
--- a/src/IDE/TextEditor/CodeMirror.hs
+++ b/src/IDE/TextEditor/CodeMirror.hs
@@ -90,11 +90,7 @@
         containerAdd, scrolledWindowNew, Rectangle(..),
         EventMask(..), Modifier(..), ContainerClass, mainIteration,
         castToWidget,
-#ifdef MIN_VERSION_gtk3
         widgetGetWindow
-#else
-        widgetGetDrawWindow
-#endif
         )
 import Data.Maybe (fromJust)
 import IDE.Core.State (onIDE, reflectIDE, leksahOrPackageDir)
@@ -366,11 +362,7 @@
     getBuffer (CMView cm) = return $ CMBuffer cm
     getWindow (CMView cm) = runCM cm $ do
         v <- webView
-#ifdef MIN_VERSION_gtk3
         liftIO $ widgetGetWindow v
-#else
-        liftIO $ Just <$> widgetGetDrawWindow v
-#endif
     getIterAtLocation (CMView cm) x y = runCM cm $ do
         m <- codeMirror
         lift $ do
diff --git a/src/IDE/TextEditor/GtkSourceView.hs b/src/IDE/TextEditor/GtkSourceView.hs
--- a/src/IDE/TextEditor/GtkSourceView.hs
+++ b/src/IDE/TextEditor/GtkSourceView.hs
@@ -76,11 +76,7 @@
         FontDescription, fontDescriptionFromString, fontDescriptionNew,
         fontDescriptionSetFamily, EventMask(..), after, Underline(..),
         Color(..),
-#ifdef MIN_VERSION_gtk3
         widgetGetWindow
-#else
-        widgetGetDrawWindow
-#endif
         )
 import Data.Typeable (Typeable)
 import Control.Applicative ((<$>))
@@ -103,7 +99,7 @@
         sourceBufferBeginNotUndoableAction, sourceBufferSetMaxUndoLevels,
         sourceBufferNew, sourceBufferNewWithLanguage,
         sourceLanguageManagerGuessLanguage,
-        sourceLanguageManagerSetSearchPath,
+        sourceLanguageManagerSetSearchPath, gTypeSourceBuffer,
         sourceLanguageManagerGetSearchPath, sourceLanguageManagerNew)
 import System.FilePath ((</>))
 import System.GIO (contentTypeGuess)
@@ -119,7 +115,8 @@
 import Data.IORef (writeIORef, readIORef, newIORef)
 import System.Glib.MainLoop (priorityDefault, idleRemove)
 import Data.Char (isDigit, isSymbol, isAlphaNum)
-import System.Glib.Signals (after, on)
+import System.Glib.Signals
+       (GSignalMatchType(..), signalBlockMatched, after, on)
 import Control.Monad.Trans.Class (MonadTrans(..))
 import System.Glib.Attributes (get, AttrOp(..), set)
 import qualified Graphics.UI.Gtk as Gtk (endUserAction)
@@ -140,6 +137,9 @@
        (textMarkGetName, toTextMark)
 import Control.Arrow (Arrow(..))
 import System.Log.Logger (debugM)
+import Foreign.ForeignPtr (withForeignPtr)
+import System.Glib.GObject (GObjectClass(..), unGObject)
+import Foreign.Ptr (castPtr)
 
 transformGtkIter :: EditorIter GtkSourceView -> (TextIter -> IO a) -> IDEM (EditorIter GtkSourceView)
 transformGtkIter (GtkIter i) f = do
@@ -246,6 +246,13 @@
         fd <- fontDescription mbFontString
         liftIO $ GtkView <$> do
             sv <- sourceViewNewWithBuffer sb
+
+            -- Disable source_mark_updated handler in sv because it schedules a full redraw
+            -- that turns out to be unnecessary and very costly in Leksah
+            withForeignPtr (unGObject $ toGObject sv) $ \svPtr -> void $
+                signalBlockMatched sb [SignalMatchId, SignalMatchData]
+                    "source_mark_updated" gTypeSourceBuffer 0 Nothing Nothing (Just (castPtr svPtr))
+
             sourceViewSetHighlightCurrentLine sv True
             sourceViewSetInsertSpacesInsteadOfTabs sv True
             sourceViewSetIndentOnTab sv True
@@ -323,11 +330,7 @@
     bufferToWindowCoords (GtkView sv) point = liftIO $ textViewBufferToWindowCoords sv TextWindowWidget point
     drawTabs (GtkView sv) = liftIO $ sourceViewSetDrawSpaces sv [SourceDrawSpacesTab, SourceDrawSpacesSpace, SourceDrawSpacesTrailing]
     getBuffer (GtkView sv) = liftIO $ (GtkBuffer . castToSourceBuffer) <$> sv `get` textViewBuffer
-#ifdef MIN_VERSION_gtk3
     getWindow (GtkView sv) = liftIO $ widgetGetWindow sv
-#else
-    getWindow (GtkView sv) = liftIO $ Just <$> widgetGetDrawWindow sv
-#endif
     getIterAtLocation (GtkView sv) x y = liftIO $ GtkIter <$> textViewGetIterAtLocation sv x y
     getIterLocation (GtkView sv) (GtkIter i) = liftIO $ textViewGetIterLocation sv i
     getOverwrite (GtkView sv) = liftIO $ textViewGetOverwrite sv
diff --git a/src/IDE/TextEditor/Yi.hs b/src/IDE/TextEditor/Yi.hs
--- a/src/IDE/TextEditor/Yi.hs
+++ b/src/IDE/TextEditor/Yi.hs
@@ -74,11 +74,7 @@
         leaveNotifyEvent, motionNotifyEvent, keyPressEvent,
         buttonReleaseEvent, buttonPressEvent, widgetGrabFocus,
         Rectangle(..), layoutSetFontDescription, EventMask(..),
-#ifdef MIN_VERSION_gtk3
         widgetGetWindow
-#else
-        widgetGetDrawWindow
-#endif
         )
 import Control.Monad.Reader.Class (MonadReader(..))
 import Graphics.UI.Editor.Basics (Connection(..))
@@ -208,11 +204,7 @@
     bufferToWindowCoords (YiView v) point = return point -- TODO
     drawTabs (YiView _) = return () -- TODO
     getBuffer (YiView v) = return $ YiBuffer $ Yi.getBuffer v
-#ifdef MIN_VERSION_gtk3
     getWindow (YiView v) = liftIO $ widgetGetWindow (drawArea v)
-#else
-    getWindow (YiView v) = liftIO $ Just <$> widgetGetDrawWindow (drawArea v)
-#endif
     getIterAtLocation (YiView View{viewFBufRef = b}) x y = return $ mkYiIter' b $ Point 0 -- TODO
     getIterLocation (YiView v) (YiIter i) = return $ Rectangle 0 0 0 0 -- TODO
     getOverwrite (YiView View{viewFBufRef = b}) = withYiBuffer' b $ not <$> use insertingA
diff --git a/src/IDE/Utils/ExternalTool.hs b/src/IDE/Utils/ExternalTool.hs
--- a/src/IDE/Utils/ExternalTool.hs
+++ b/src/IDE/Utils/ExternalTool.hs
@@ -50,6 +50,7 @@
 import Control.Concurrent.MVar (withMVar, MVar)
 import Unsafe.Coerce (unsafeCoerce)
 import System.Posix.Process (getProcessGroupIDOf)
+import System.Posix.Signals (inSignalSet, sigINT, getSignalMask)
 #endif
 
 #if !defined(mingw32_HOST_OS) && !defined(__MINGW32__)
@@ -69,9 +70,12 @@
             CPid gid <- getProcessGroupIDOf (CPid pid)
             return $ "pid " <> show pid <> " gid " <> show gid
         (ClosedHandle _)        -> return "closed handle"
+
+showSignalMask = ("mask INT "<>) . show . (sigINT `inSignalSet`) <$> getSignalMask
 #else
 showProcessHandle :: ProcessHandle -> IO String
 showProcessHandle _ = return ""
+showSignalMask = return ""
 #endif
 
 runExternalTool' :: MonadIDE m
@@ -125,7 +129,8 @@
                     pidHandler pid
                     liftIO $ do
                         s <- showProcessHandle pid
-                        debugM "leksah" $ "runExternalTool " <> s <> " " <>
+                        m <- showSignalMask
+                        debugM "leksah" $ "runExternalTool " <> m <> " " <> s <> " " <>
                                             unwords (executable' : map T.unpack args')
                     output $$ handleOutput) ideR
             return ()
diff --git a/win32/makeinstaller.sh b/win32/makeinstaller.sh
--- a/win32/makeinstaller.sh
+++ b/win32/makeinstaller.sh
@@ -129,17 +129,17 @@
 
 # mkdir -p SourceDir/fonts
 # cp -ru /c/Windows/Fonts/DejaVuS*.ttf SourceDir
-export WINEPREFIX=~/.wine32
-export WINEARCH=win32
 if ["$WINE" -eq ""]
 then
   heat dir SourceDir -srd -gg -sfrag -template fragment -out heat.wxs -cg Leksah -dr INSTALLDIR -sreg suppress registry harvesting || exit
-  LIGHT=light
+  xsltproc heat.xslt heat.wxs > heatfixed.wxs
+  candle heatfixed.wxs || exit
+  candle leksah.wxs || exit
+  light -ext WixUIExtension heatfixed.wixobj leksah.wixobj -out $LEKSAH_X_X_X_X_GHC_X_X_X.msi || exit
 else
   find SourceDir -follow | wixl-heat -p SourceDir/ --component-group Leksah --directory-ref INSTALLDIR > heat.wxs || exit
-  LIGHT='light -sval'
+  xsltproc heat.xslt heat.wxs > heatfixed.wxs
+  mono ~/.wine32/drive_c/bin/candle.exe heatfixed.wxs || exit
+  mono ~/.wine32/drive_c/bin/candle.exe leksah.wxs || exit
+  mono ~/.wine32/drive_c/bin/light.exe -sval -ext WixUIExtension heatfixed.wixobj leksah.wixobj -out $LEKSAH_X_X_X_X_GHC_X_X_X.msi || exit
 fi
-xsltproc heat.xslt heat.wxs > heatfixed.wxs
-$WINE candle heatfixed.wxs || exit
-$WINE candle leksah.wxs || exit
-$WINE $LIGHT -ext WixUIExtension heatfixed.wixobj leksah.wixobj -out $LEKSAH_X_X_X_X_GHC_X_X_X.msi || exit
