diff --git a/Network/Gitit/Authentication.hs b/Network/Gitit/Authentication.hs
--- a/Network/Gitit/Authentication.hs
+++ b/Network/Gitit/Authentication.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
 {-
 Copyright (C) 2009 John MacFarlane <jgm@berkeley.edu>,
                    Henry Laxen <nadine.and.henry@pobox.com>
diff --git a/Network/Gitit/Authentication/Github.hs b/Network/Gitit/Authentication/Github.hs
--- a/Network/Gitit/Authentication/Github.hs
+++ b/Network/Gitit/Authentication/Github.hs
@@ -25,6 +25,7 @@
 import Data.UUID (toString)
 import Data.UUID.V4 (nextRandom)
 import qualified Control.Exception as E
+import Prelude
 
 loginGithubUser :: OAuth2 -> Handler
 loginGithubUser githubKey = do
diff --git a/Network/Gitit/Feed.hs b/Network/Gitit/Feed.hs
--- a/Network/Gitit/Feed.hs
+++ b/Network/Gitit/Feed.hs
@@ -22,7 +22,11 @@
 module Network.Gitit.Feed (FeedConfig(..), filestoreToXmlFeed) where
 
 import Data.Time (UTCTime, formatTime, getCurrentTime, addUTCTime)
+#if MIN_VERSION_time(1,5,0)
+import Data.Time (defaultTimeLocale)
+#else
 import System.Locale (defaultTimeLocale)
+#endif
 import Data.Foldable as F (concatMap)
 import Data.List (intercalate, sortBy, nub)
 import Data.Maybe (fromMaybe)
diff --git a/Network/Gitit/Types.hs b/Network/Gitit/Types.hs
--- a/Network/Gitit/Types.hs
+++ b/Network/Gitit/Types.hs
@@ -72,14 +72,18 @@
 import Data.Text (Text)
 import Data.List (intersect)
 import Data.Time (parseTime)
+#if MIN_VERSION_time(1,5,0)
+import Data.Time (defaultTimeLocale)
+#else
 import System.Locale (defaultTimeLocale)
+#endif
 import Data.FileStore.Types
 import Network.Gitit.Server
 import Text.HTML.TagSoup.Entity (lookupEntity)
 import Data.Char (isSpace)
 import Network.OAuth.OAuth2
 
-data PageType = Markdown | RST | LaTeX | HTML | Textile | Org | DocBook 
+data PageType = Markdown | RST | LaTeX | HTML | Textile | Org | DocBook
               | MediaWiki
                 deriving (Read, Show, Eq)
 
diff --git a/README.markdown b/README.markdown
--- a/README.markdown
+++ b/README.markdown
@@ -1,16 +1,16 @@
 Gitit
 =====
 
-Gitit is a wiki program written in Haskell. It uses [Happstack][] for
-the web server and [pandoc][] for markup processing. Pages and uploaded
-files are stored in a [git][], [darcs][], or [mercurial][] repository
+Gitit is a wiki program written in Haskell. It uses [Happstack] for
+the web server and [pandoc] for markup processing. Pages and uploaded
+files are stored in a [git], [darcs], or [mercurial] repository
 and may be modified either by using the VCS's command-line tools or
 through the wiki's web interface. By default, pandoc's extended version
 of markdown is used as a markup language, but reStructuredText, LaTeX, HTML,
 DocBook, or Emacs Org-mode markup can also be used. Pages can be exported in a
 number of different formats, including LaTeX, RTF, OpenOffice ODT, and
 MediaWiki markup.  Gitit can be configured to display TeX math (using
-[texmath][]) and highlighted source code (using [highlighting-kate][]).
+[texmath]) and highlighted source code (using [highlighting-kate]).
 
 Other features include
 
@@ -47,10 +47,10 @@
 Compiling and installing gitit
 ------------------------------
 
-You'll need the [GHC][] compiler and the [cabal-install][] tool. GHC can
-be downloaded [here][]. Note that, starting with release 0.5, GHC 6.10
-or higher is required. For [cabal-install][] on *nix, follow the [quick
-install][] instructions.
+You'll need the [GHC] compiler and the [cabal-install] tool. GHC can
+be downloaded [here]. Note that, starting with release 0.5, GHC 6.10
+or higher is required. For [cabal-install] on *nix, follow the [quick
+install] instructions.
 
 [GHC]: http://www.haskell.org/ghc/
 [here]: http://www.haskell.org/ghc/
@@ -86,7 +86,7 @@
 this will be available in gitit too.  This feature is recommended
 if you plan to display source code on your wiki.
 
-Highlighting support requires the [pcre][] library, so make sure that
+Highlighting support requires the [pcre] library, so make sure that
 is installed before continuing.
 
 [pcre]:  http://www.pcre.org/ 
@@ -197,7 +197,7 @@
 
 If gitit was compiled against a version of pandoc that has highlighting
 support (see above), you can get highlighted source code by using
-[delimited code blocks][]:
+[delimited code blocks]:
 
     ~~~ {.haskell .numberLines}
     qsort []     = []
@@ -326,12 +326,12 @@
 setting of `math` in the configuration file:
 
 1.  `mathml` (default): Math will be converted to MathML using
-    [texmath][]. This method works with IE+mathplayer, Firefox, and
+    [texmath]. This method works with IE+mathplayer, Firefox, and
     Opera, but not Safari.
 
-2.  `jsMath`: Math will be rendered using the [jsMath][] javascript.
+2.  `jsMath`: Math will be rendered using the [jsMath] javascript.
     If you want to use this method, download `jsMath` and `jsMath
-    Image Fonts` from the [jsMath download page][]. You'll have two
+    Image Fonts` from the [jsMath download page]. You'll have two
     `.zip` archives. Unzip them both in the `static/js` directory (a new
     subdirectory, `jsMath`, will be created).  This works with all
     browsers, but is slower and not as nice looking as MathML.
diff --git a/gitit.cabal b/gitit.cabal
--- a/gitit.cabal
+++ b/gitit.cabal
@@ -1,5 +1,5 @@
 name:                gitit
-version:             0.10.6.2
+version:             0.10.6.3
 Cabal-version:       >= 1.6
 build-type:          Simple
 synopsis:            Wiki using happstack, git or darcs, and pandoc.
@@ -137,7 +137,7 @@
     ghc-options:     -Wall -fno-warn-unused-do-bind
   else
     ghc-options:     -Wall
-  ghc-prof-options:  -auto-all -caf-all
+  ghc-prof-options:  -fprof-auto-exported -rtsopts
 
 Executable           gitit
   hs-source-dirs:    .
@@ -199,7 +199,7 @@
     ghc-options:     -Wall -threaded -fno-warn-unused-do-bind
   else
     ghc-options:     -Wall -threaded
-  ghc-prof-options:  -auto-all -caf-all
+  ghc-prof-options:  -fprof-auto-exported -rtsopts
 
 Executable           expireGititCache
   hs-source-dirs:    .
