diff --git a/XMonad/Core.hs b/XMonad/Core.hs
--- a/XMonad/Core.hs
+++ b/XMonad/Core.hs
@@ -473,5 +473,6 @@
 
 uninstallSignalHandlers :: MonadIO m => m ()
 uninstallSignalHandlers = io $ do
+    installHandler openEndedPipe Default Nothing
     installHandler sigCHLD Default Nothing
     return ()
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -329,7 +329,7 @@
          kc <- io $ keysymToKeycode dpy sym
          -- "If the specified KeySym is not defined for any KeyCode,
          -- XKeysymToKeycode() returns zero."
-         when (kc /= '\0') $ mapM_ (grab kc . (mask .|.)) =<< extraModifiers
+         when (kc /= 0) $ mapM_ (grab kc . (mask .|.)) =<< extraModifiers
 
 -- | XXX comment me
 grabButtons :: X ()
diff --git a/man/xmonad.1 b/man/xmonad.1
--- a/man/xmonad.1
+++ b/man/xmonad.1
@@ -1,147 +1,267 @@
-./" man page created by David Lazar on April 24, 2007
-./" uses ``tmac.an'' macro set
-.TH xmonad 1 "8 September 09"\
- xmonad-0.9 \
-"xmonad manual"
-.SH NAME
-xmonad \- a tiling window manager
-.SH DESCRIPTION
+.TH xmonad 1 "25 October 09" xmonad-0.9.1 "xmonad manual".SH Name
 .PP
-\fBxmonad\fR is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximize the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. \fBxmonad\fR is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of \fBxmonad\fR is predictability: the user should know in advance precisely the window arrangement that will result from any action.
+xmonad - a tiling window manager
+.SH Description
 .PP
-By default, \fBxmonad\fR provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximize screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens.
+\f[I]xmonad\f[] is a minimalist tiling window manager for X,
+written in Haskell.
+Windows are managed using automatic layout algorithms, which can be
+dynamically reconfigured.
+At any time windows are arranged so as to maximize the use of
+screen real estate.
+All features of the window manager are accessible purely from the
+keyboard: a mouse is entirely optional.
+\f[I]xmonad\f[] is configured in Haskell, and custom layout
+algorithms may be implemented by the user in config files.
+A principle of \f[I]xmonad\f[] is predictability: the user should
+know in advance precisely the window arrangement that will result
+from any action.
 .PP
-By utilizing the expressivity of a modern functional language with a rich static type system, \fBxmonad\fR provides a complete, featureful window manager in less than 1200 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.
-.SH USAGE
+By default, \f[I]xmonad\f[] provides three layout algorithms: tall,
+wide and fullscreen.
+In tall or wide mode, windows are tiled and arranged to prevent
+overlap and maximize screen use.
+Sets of windows are grouped together on virtual screens, and each
+screen retains its own layout, which may be reconfigured
+dynamically.
+Multiple physical monitors are supported via Xinerama, allowing
+simultaneous display of a number of screens.
 .PP
-\fBxmonad\fR places each window into a "workspace". Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.
+By utilizing the expressivity of a modern functional language with
+a rich static type system, \f[I]xmonad\f[] provides a complete,
+featureful window manager in less than 1200 lines of code, with an
+emphasis on correctness and robustness.
+Internal properties of the window manager are checked using a
+combination of static guarantees provided by the type system, and
+type-based automated testing.
+A benefit of this is that the code is simple to understand, and
+easy to modify.
+.SH Usage
 .PP
-You can switch to workspace N with mod-N. For example, to switch to workspace 5, you would press mod-5. Similarly, you can move the current window to another workspace with mod-shift-N.
+\f[I]xmonad\f[] places each window into a "workspace".
+Each workspace can have any number of windows, which you can cycle
+though with mod-j and mod-k.
+Windows are either displayed full screen, tiled horizontally, or
+tiled vertically.
+You can toggle the layout mode with mod-space, which will cycle
+through the available modes.
 .PP
-When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible. mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r} move the current window to that screen. When \fBxmonad\fR starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped.
+You can switch to workspace N with mod-N.
+For example, to switch to workspace 5, you would press mod-5.
+Similarly, you can move the current window to another workspace
+with mod-shift-N.
 .PP
+When running with multiple monitors (Xinerama), each screen has
+exactly 1 workspace visible.
+mod-{w,e,r} switch the focus between screens, while
+shift-mod-{w,e,r} move the current window to that screen.
+When \f[I]xmonad\f[] starts, workspace 1 is on screen 1, workspace
+2 is on screen 2, etc.
+When switching workspaces to one that is already visible, the
+current and visible workspaces are swapped.
 .SS Flags
-\fBxmonad\fR has several flags which you may pass to the executable. These flags are:
+.PP
+xmonad has several flags which you may pass to the executable.
+These flags are:
 .TP
-\fB--recompile
-Recompiles your configuration in ~/.xmonad/xmonad.hs
-\fB--restart
-Causes the currently running xmonad process to restart
+.B --recompile
+Recompiles your configuration in \f[I]~/.xmonad/xmonad.hs\f[]
+.RS
+.RE
 .TP
-\fB--version
-Display version of \fBxmonad\fR.
+.B --restart
+Causes the currently running \f[I]xmonad\f[] process to restart
+.RS
+.RE
+.TP
+.B --version
+Display version of \f[I]xmonad\f[]
+.RS
+.RE
 .SS Default keyboard bindings
-.IP
- \fBmod-shift-return\fR
+.TP
+.B mod-shift-return
 Launch terminal
-.IP
- \fBmod-p\fR
+.RS
+.RE
+.TP
+.B mod-p
 Launch dmenu
-.IP
- \fBmod-shift-p\fR
+.RS
+.RE
+.TP
+.B mod-shift-p
 Launch gmrun
-.IP
- \fBmod-shift-c\fR
+.RS
+.RE
+.TP
+.B mod-shift-c
 Close the focused window
-.IP
- \fBmod-space\fR
+.RS
+.RE
+.TP
+.B mod-space
 Rotate through the available layout algorithms
-.IP
- \fBmod-shift-space\fR
+.RS
+.RE
+.TP
+.B mod-shift-space
 Reset the layouts on the current workspace to default
-.IP
- \fBmod-n\fR
+.RS
+.RE
+.TP
+.B mod-n
 Resize viewed windows to the correct size
-.IP
- \fBmod-tab\fR
+.RS
+.RE
+.TP
+.B mod-tab
 Move focus to the next window
-.IP
- \fBmod-shift-tab\fR
+.RS
+.RE
+.TP
+.B mod-shift-tab
 Move focus to the previous window
-.IP
- \fBmod-j\fR
+.RS
+.RE
+.TP
+.B mod-j
 Move focus to the next window
-.IP
- \fBmod-k\fR
+.RS
+.RE
+.TP
+.B mod-k
 Move focus to the previous window
-.IP
- \fBmod-m\fR
+.RS
+.RE
+.TP
+.B mod-m
 Move focus to the master window
-.IP
- \fBmod-return\fR
+.RS
+.RE
+.TP
+.B mod-return
 Swap the focused window and the master window
-.IP
- \fBmod-shift-j\fR
+.RS
+.RE
+.TP
+.B mod-shift-j
 Swap the focused window with the next window
-.IP
- \fBmod-shift-k\fR
+.RS
+.RE
+.TP
+.B mod-shift-k
 Swap the focused window with the previous window
-.IP
- \fBmod-h\fR
+.RS
+.RE
+.TP
+.B mod-h
 Shrink the master area
-.IP
- \fBmod-l\fR
+.RS
+.RE
+.TP
+.B mod-l
 Expand the master area
-.IP
- \fBmod-t\fR
+.RS
+.RE
+.TP
+.B mod-t
 Push window back into tiling
-.IP
- \fBmod-comma\fR
+.RS
+.RE
+.TP
+.B mod-comma
 Increment the number of windows in the master area
-.IP
- \fBmod-period\fR
+.RS
+.RE
+.TP
+.B mod-period
 Deincrement the number of windows in the master area
-.IP
- \fBmod-b\fR
+.RS
+.RE
+.TP
+.B mod-b
 Toggle the status bar gap
-.IP
- \fBmod-shift-q\fR
+.RS
+.RE
+.TP
+.B mod-shift-q
 Quit xmonad
-.IP
- \fBmod-q\fR
+.RS
+.RE
+.TP
+.B mod-q
 Restart xmonad
-.IP
- \fBmod-[1..9]\fR
+.RS
+.RE
+.TP
+.B mod-[1..9]
 Switch to workspace N
-.IP
- \fBmod-shift-[1..9]\fR
+.RS
+.RE
+.TP
+.B mod-shift-[1..9]
 Move client to workspace N
-.IP
- \fBmod-{w,e,r}\fR
+.RS
+.RE
+.TP
+.B mod-{w,e,r}
 Switch to physical/Xinerama screens 1, 2, or 3
-.IP
- \fBmod-shift-{w,e,r}\fR
+.RS
+.RE
+.TP
+.B mod-shift-{w,e,r}
 Move client to screen 1, 2, or 3
-.IP
- \fBmod-button1\fR
+.RS
+.RE
+.TP
+.B mod-button1
 Set the window to floating mode and move by dragging
-.IP
- \fBmod-button2\fR
+.RS
+.RE
+.TP
+.B mod-button2
 Raise the window to the top of the stack
-.IP
- \fBmod-button3\fR
-Set the window to floating mode and resize by dragging
-
-.SH EXAMPLES
-To use \fBxmonad\fR as your window manager add:
 .RS
-exec xmonad
 .RE
-to your \fI~/.xinitrc\fR file
-.SH CUSTOMIZATION
-\fBxmonad\fR is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.
-.PP
-You can find many extensions to the core feature set in the xmonad-contrib package, available through your package manager or from http://xmonad.org/.
-.SS "Modular Configuration"
-As of \fBxmonad-0.9\fR, any additional Haskell modules may be placed in \fI~/.xmonad/lib/\fR are available in GHC's searchpath. Hierarchical modules are supported: for example, the file \fI~/.xmonad/lib/XMonad/Stack/MyAdditions.hs\fR could contain:
+.TP
+.B mod-button3
+Set the window to floating mode and resize by dragging
 .RS
-.nf
-
-module XMonad.Stack.MyAdditions (function1) where
-function1 = error "function1: Not implemented yet!"
-.fi
 .RE
+.SH Examples
 .PP
-Your xmonad.hs may then \fBimport XMonad.Stack.MyAdditions\fR as if that module was contained within \fBxmonad\fR or \fBxmonad-contrib\fR.
-.SH BUGS
-Probably. If you find any, please report them: http://code.google.com/p/xmonad/issues/list
+To use xmonad as your window manager add to your
+\f[I]~/.xinitrc\f[] file:
+.PP
+\f[CR]
+      exec\ xmonad
+\f[]
+.SH Customization
+.PP
+xmonad is customized in ~/.xmonad/xmonad.hs, and then restarting
+with mod-q.
+.PP
+You can find many extensions to the core feature set in the xmonad-
+contrib package, available through your package manager or from
+xmonad.org (http://xmonad.org).
+.SS Modular Configuration
+.PP
+As of \f[I]xmonad-0.9\f[], any additional Haskell modules may be
+placed in \f[I]~/.xmonad/lib/\f[] are available in GHC\[aq]s
+searchpath.
+Hierarchical modules are supported: for example, the file
+\f[I]~/.xmonad/lib/XMonad/Stack/MyAdditions.hs\f[] could contain:
+.PP
+\f[CR]
+      module\ XMonad.Stack.MyAdditions\ (function1)\ where
+      \ \ \ \ function1\ =\ error\ "function1:\ Not\ implemented\ yet!"
+\f[]
+.PP
+Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that
+module was contained within xmonad or xmonad-contrib.
+.SH Bugs
+.PP
+Probably.
+If you find any, please report them to the
+bugtracker (http://code.google.com/p/xmonad/issues/list)
diff --git a/man/xmonad.1.html b/man/xmonad.1.html
new file mode 100644
--- /dev/null
+++ b/man/xmonad.1.html
@@ -0,0 +1,383 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+><head
+  ><title
+    ></title
+    ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
+     /><meta name="generator" content="pandoc"
+     /><h1>xmonad-0.9.1</h1><p>Section: xmonad manual (1)<br>Updated: 25 October 09</p><hr></head
+  ><body
+  ><div id="TOC"
+    ><ul
+      ><li
+	><a href="#name"
+	  >Name</a
+	  ></li
+	><li
+	><a href="#description"
+	  >Description</a
+	  ></li
+	><li
+	><a href="#usage"
+	  >Usage</a
+	  ><ul
+	  ><li
+	    ><a href="#flags"
+	      >Flags</a
+	      ></li
+	    ><li
+	    ><a href="#default-keyboard-bindings"
+	      >Default keyboard bindings</a
+	      ></li
+	    ></ul
+	  ></li
+	><li
+	><a href="#examples"
+	  >Examples</a
+	  ></li
+	><li
+	><a href="#customization"
+	  >Customization</a
+	  ><ul
+	  ><li
+	    ><a href="#modular-configuration"
+	      >Modular Configuration</a
+	      ></li
+	    ></ul
+	  ></li
+	><li
+	><a href="#bugs"
+	  >Bugs</a
+	  ></li
+	></ul
+      ></div
+    ><div id="name"
+    ><h1
+      ><a href="#TOC"
+	>Name</a
+	></h1
+      ><p
+      >xmonad - a tiling window manager</p
+      ></div
+    ><div id="description"
+    ><h1
+      ><a href="#TOC"
+	>Description</a
+	></h1
+      ><p
+      ><em
+	>xmonad</em
+	> is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximize the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. <em
+	>xmonad</em
+	> is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of <em
+	>xmonad</em
+	> is predictability: the user should know in advance precisely the window arrangement that will result from any action.</p
+      ><p
+      >By default, <em
+	>xmonad</em
+	> provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximize screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens.</p
+      ><p
+      >By utilizing the expressivity of a modern functional language with a rich static type system, <em
+	>xmonad</em
+	> provides a complete, featureful window manager in less than 1200 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.</p
+      ></div
+    ><div id="usage"
+    ><h1
+      ><a href="#TOC"
+	>Usage</a
+	></h1
+      ><p
+      ><em
+	>xmonad</em
+	> places each window into a &quot;workspace&quot;. Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.</p
+      ><p
+      >You can switch to workspace N with mod-N. For example, to switch to workspace 5, you would press mod-5. Similarly, you can move the current window to another workspace with mod-shift-N.</p
+      ><p
+      >When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible. mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r} move the current window to that screen. When <em
+	>xmonad</em
+	> starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped.</p
+      ><div id="flags"
+      ><h2
+	><a href="#TOC"
+	  >Flags</a
+	  ></h2
+	><p
+	>xmonad has several flags which you may pass to the executable. These flags are:</p
+	><dl
+	><dt
+	  >--recompile</dt
+	  ><dd
+	  ><p
+	    >Recompiles your configuration in <em
+	      >~/.xmonad/xmonad.hs</em
+	      ></p
+	    ></dd
+	  ><dt
+	  >--restart</dt
+	  ><dd
+	  ><p
+	    >Causes the currently running <em
+	      >xmonad</em
+	      > process to restart</p
+	    ></dd
+	  ><dt
+	  >--version</dt
+	  ><dd
+	  ><p
+	    >Display version of <em
+	      >xmonad</em
+	      ></p
+	    ></dd
+	  ></dl
+	></div
+      ><div id="default-keyboard-bindings"
+      ><h2
+	><a href="#TOC"
+	  >Default keyboard bindings</a
+	  ></h2
+	><dl
+	><dt
+	  >mod-shift-return</dt
+	  ><dd
+	  ><p
+	    >Launch terminal</p
+	    ></dd
+	  ><dt
+	  >mod-p</dt
+	  ><dd
+	  ><p
+	    >Launch dmenu</p
+	    ></dd
+	  ><dt
+	  >mod-shift-p</dt
+	  ><dd
+	  ><p
+	    >Launch gmrun</p
+	    ></dd
+	  ><dt
+	  >mod-shift-c</dt
+	  ><dd
+	  ><p
+	    >Close the focused window</p
+	    ></dd
+	  ><dt
+	  >mod-space</dt
+	  ><dd
+	  ><p
+	    >Rotate through the available layout algorithms</p
+	    ></dd
+	  ><dt
+	  >mod-shift-space</dt
+	  ><dd
+	  ><p
+	    >Reset the layouts on the current workspace to default</p
+	    ></dd
+	  ><dt
+	  >mod-n</dt
+	  ><dd
+	  ><p
+	    >Resize viewed windows to the correct size</p
+	    ></dd
+	  ><dt
+	  >mod-tab</dt
+	  ><dd
+	  ><p
+	    >Move focus to the next window</p
+	    ></dd
+	  ><dt
+	  >mod-shift-tab</dt
+	  ><dd
+	  ><p
+	    >Move focus to the previous window</p
+	    ></dd
+	  ><dt
+	  >mod-j</dt
+	  ><dd
+	  ><p
+	    >Move focus to the next window</p
+	    ></dd
+	  ><dt
+	  >mod-k</dt
+	  ><dd
+	  ><p
+	    >Move focus to the previous window</p
+	    ></dd
+	  ><dt
+	  >mod-m</dt
+	  ><dd
+	  ><p
+	    >Move focus to the master window</p
+	    ></dd
+	  ><dt
+	  >mod-return</dt
+	  ><dd
+	  ><p
+	    >Swap the focused window and the master window</p
+	    ></dd
+	  ><dt
+	  >mod-shift-j</dt
+	  ><dd
+	  ><p
+	    >Swap the focused window with the next window</p
+	    ></dd
+	  ><dt
+	  >mod-shift-k</dt
+	  ><dd
+	  ><p
+	    >Swap the focused window with the previous window</p
+	    ></dd
+	  ><dt
+	  >mod-h</dt
+	  ><dd
+	  ><p
+	    >Shrink the master area</p
+	    ></dd
+	  ><dt
+	  >mod-l</dt
+	  ><dd
+	  ><p
+	    >Expand the master area</p
+	    ></dd
+	  ><dt
+	  >mod-t</dt
+	  ><dd
+	  ><p
+	    >Push window back into tiling</p
+	    ></dd
+	  ><dt
+	  >mod-comma</dt
+	  ><dd
+	  ><p
+	    >Increment the number of windows in the master area</p
+	    ></dd
+	  ><dt
+	  >mod-period</dt
+	  ><dd
+	  ><p
+	    >Deincrement the number of windows in the master area</p
+	    ></dd
+	  ><dt
+	  >mod-b</dt
+	  ><dd
+	  ><p
+	    >Toggle the status bar gap</p
+	    ></dd
+	  ><dt
+	  >mod-shift-q</dt
+	  ><dd
+	  ><p
+	    >Quit xmonad</p
+	    ></dd
+	  ><dt
+	  >mod-q</dt
+	  ><dd
+	  ><p
+	    >Restart xmonad</p
+	    ></dd
+	  ><dt
+	  >mod-[1..9]</dt
+	  ><dd
+	  ><p
+	    >Switch to workspace N</p
+	    ></dd
+	  ><dt
+	  >mod-shift-[1..9]</dt
+	  ><dd
+	  ><p
+	    >Move client to workspace N</p
+	    ></dd
+	  ><dt
+	  >mod-{w,e,r}</dt
+	  ><dd
+	  ><p
+	    >Switch to physical/Xinerama screens 1, 2, or 3</p
+	    ></dd
+	  ><dt
+	  >mod-shift-{w,e,r}</dt
+	  ><dd
+	  ><p
+	    >Move client to screen 1, 2, or 3</p
+	    ></dd
+	  ><dt
+	  >mod-button1</dt
+	  ><dd
+	  ><p
+	    >Set the window to floating mode and move by dragging</p
+	    ></dd
+	  ><dt
+	  >mod-button2</dt
+	  ><dd
+	  ><p
+	    >Raise the window to the top of the stack</p
+	    ></dd
+	  ><dt
+	  >mod-button3</dt
+	  ><dd
+	  ><p
+	    >Set the window to floating mode and resize by dragging</p
+	    ></dd
+	  ></dl
+	></div
+      ></div
+    ><div id="examples"
+    ><h1
+      ><a href="#TOC"
+	>Examples</a
+	></h1
+      ><p
+      >To use xmonad as your window manager add to your <em
+	>~/.xinitrc</em
+	> file:</p
+      ><pre class="sourceCode haskell"
+      ><code
+	>exec xmonad
+</code
+	></pre
+      ></div
+    ><div id="customization"
+    ><h1
+      ><a href="#TOC"
+	>Customization</a
+	></h1
+      ><p
+      >xmonad is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.</p
+      ><p
+      >You can find many extensions to the core feature set in the xmonad- contrib package, available through your package manager or from <a href="http://xmonad.org"
+	>xmonad.org</a
+	>.</p
+      ><div id="modular-configuration"
+      ><h2
+	><a href="#TOC"
+	  >Modular Configuration</a
+	  ></h2
+	><p
+	>As of <em
+	  >xmonad-0.9</em
+	  >, any additional Haskell modules may be placed in <em
+	  >~/.xmonad/lib/</em
+	  > are available in GHC's searchpath. Hierarchical modules are supported: for example, the file <em
+	  >~/.xmonad/lib/XMonad/Stack/MyAdditions.hs</em
+	  > could contain:</p
+	><pre class="sourceCode haskell"
+	><code
+	  >module XMonad.Stack.MyAdditions (function1) where
+    function1 = error &quot;function1: Not implemented yet!&quot;
+</code
+	  ></pre
+	><p
+	>Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that module was contained within xmonad or xmonad-contrib.</p
+	></div
+      ></div
+    ><div id="bugs"
+    ><h1
+      ><a href="#TOC"
+	>Bugs</a
+	></h1
+      ><p
+      >Probably. If you find any, please report them to the <a href="http://code.google.com/p/xmonad/issues/list"
+	>bugtracker</a
+	></p
+      ></div
+    ></body
+  ></html
+>
diff --git a/man/xmonad.1.in b/man/xmonad.1.in
deleted file mode 100644
--- a/man/xmonad.1.in
+++ /dev/null
@@ -1,57 +0,0 @@
-./" man page created by David Lazar on April 24, 2007
-./" uses ``tmac.an'' macro set
-.TH xmonad 1 "8 September 09"\
-___RELEASE___\
-"xmonad manual"
-.SH NAME
-xmonad \- a tiling window manager
-.SH DESCRIPTION
-.PP
-\fBxmonad\fR is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximize the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. \fBxmonad\fR is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of \fBxmonad\fR is predictability: the user should know in advance precisely the window arrangement that will result from any action.
-.PP
-By default, \fBxmonad\fR provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximize screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens.
-.PP
-By utilizing the expressivity of a modern functional language with a rich static type system, \fBxmonad\fR provides a complete, featureful window manager in less than 1200 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.
-.SH USAGE
-.PP
-\fBxmonad\fR places each window into a "workspace". Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.
-.PP
-You can switch to workspace N with mod-N. For example, to switch to workspace 5, you would press mod-5. Similarly, you can move the current window to another workspace with mod-shift-N.
-.PP
-When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible. mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r} move the current window to that screen. When \fBxmonad\fR starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped.
-.PP
-.SS Flags
-\fBxmonad\fR has several flags which you may pass to the executable. These flags are:
-.TP
-\fB--recompile
-Recompiles your configuration in ~/.xmonad/xmonad.hs
-\fB--restart
-Causes the currently running xmonad process to restart
-.TP
-\fB--version
-Display version of \fBxmonad\fR.
-.SS Default keyboard bindings
-___KEYBINDINGS___
-.SH EXAMPLES
-To use \fBxmonad\fR as your window manager add:
-.RS
-exec xmonad
-.RE
-to your \fI~/.xinitrc\fR file
-.SH CUSTOMIZATION
-\fBxmonad\fR is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.
-.PP
-You can find many extensions to the core feature set in the xmonad-contrib package, available through your package manager or from http://xmonad.org/.
-.SS "Modular Configuration"
-As of \fBxmonad-0.9\fR, any additional Haskell modules may be placed in \fI~/.xmonad/lib/\fR are available in GHC's searchpath. Hierarchical modules are supported: for example, the file \fI~/.xmonad/lib/XMonad/Stack/MyAdditions.hs\fR could contain:
-.RS
-.nf
-
-module XMonad.Stack.MyAdditions (function1) where
-function1 = error "function1: Not implemented yet!"
-.fi
-.RE
-.PP
-Your xmonad.hs may then \fBimport XMonad.Stack.MyAdditions\fR as if that module was contained within \fBxmonad\fR or \fBxmonad-contrib\fR.
-.SH BUGS
-Probably. If you find any, please report them: http://code.google.com/p/xmonad/issues/list
diff --git a/man/xmonad.1.markdown b/man/xmonad.1.markdown
new file mode 100644
--- /dev/null
+++ b/man/xmonad.1.markdown
@@ -0,0 +1,96 @@
+#Name
+xmonad - a tiling window manager
+
+#Description
+
+_xmonad_ is a minimalist tiling window manager for X, written in Haskell.
+Windows are managed using automatic layout algorithms, which can be
+dynamically reconfigured. At any time windows are arranged so as to
+maximize the use of screen real estate. All features of the window manager
+are accessible purely from the keyboard: a mouse is entirely optional.
+_xmonad_ is configured in Haskell, and custom layout algorithms may be
+implemented by the user in config files. A principle of _xmonad_ is
+predictability: the user should know in advance precisely the window
+arrangement that will result from any action.
+
+By default, _xmonad_ provides three layout algorithms: tall, wide and
+fullscreen. In tall or wide mode, windows are tiled and arranged to prevent
+overlap and maximize screen use. Sets of windows are grouped together on
+virtual screens, and each screen retains its own layout, which may be
+reconfigured dynamically. Multiple physical monitors are supported via
+Xinerama, allowing simultaneous display of a number of screens.
+
+By utilizing the expressivity of a modern functional language with a rich
+static type system, _xmonad_ provides a complete, featureful window manager
+in less than 1200 lines of code, with an emphasis on correctness and
+robustness. Internal properties of the window manager are checked using a
+combination of static guarantees provided by the type system, and
+type-based automated testing. A benefit of this is that the code is simple
+to understand, and easy to modify.
+
+#Usage
+
+_xmonad_ places each window into a "workspace". Each workspace can have
+any number of windows, which you can cycle though with mod-j and mod-k.
+Windows are either displayed full screen, tiled horizontally, or tiled
+vertically. You can toggle the layout mode with mod-space, which will cycle
+through the available modes.
+
+You can switch to workspace N with mod-N. For example, to switch to
+workspace 5, you would press mod-5. Similarly, you can move the current
+window to another workspace with mod-shift-N.
+
+When running with multiple monitors (Xinerama), each screen has exactly 1
+workspace visible. mod-{w,e,r} switch the focus between screens, while
+shift-mod-{w,e,r} move the current window to that screen. When _xmonad_
+starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When
+switching workspaces to one that is already visible, the current and
+visible workspaces are swapped.
+
+##Flags
+xmonad  has  several flags which  you may pass to the executable.
+These flags are:
+
+--recompile
+:   Recompiles your configuration in _~/.xmonad/xmonad.hs_
+
+--restart
+:   Causes the currently running _xmonad_ process to restart
+
+--version
+:   Display version of _xmonad_
+
+##Default keyboard bindings
+
+___KEYBINDINGS___
+
+#Examples
+To use xmonad as your window manager add to your _~/.xinitrc_ file:
+
+> exec xmonad
+
+#Customization
+xmonad is customized in ~/.xmonad/xmonad.hs,  and  then  restarting
+with mod-q.
+
+You can find many extensions to the core feature set in the xmonad-
+contrib package, available through your  package  manager  or  from
+[xmonad.org].
+
+##Modular Configuration
+As of _xmonad-0.9_, any additional Haskell modules may be placed in
+_~/.xmonad/lib/_ are available in GHC's searchpath. Hierarchical modules
+are supported: for example, the file
+_~/.xmonad/lib/XMonad/Stack/MyAdditions.hs_ could contain:
+
+> module XMonad.Stack.MyAdditions (function1) where
+>     function1 = error "function1: Not implemented yet!"
+
+Your xmonad.hs may then import XMonad.Stack.MyAdditions as if that
+module was contained within xmonad or xmonad-contrib.
+
+#Bugs
+Probably. If you find any, please report them to the [bugtracker]
+
+[xmonad.org]: http://xmonad.org
+[bugtracker]: http://code.google.com/p/xmonad/issues/list
diff --git a/man/xmonad.hs b/man/xmonad.hs
--- a/man/xmonad.hs
+++ b/man/xmonad.hs
@@ -239,11 +239,7 @@
 -- Status bars and logging
 
 -- Perform an arbitrary action on each internal state change or X event.
--- See the 'DynamicLog' extension for examples.
---
--- To emulate dwm's status bar
---
--- > logHook = dynamicLogDzen
+-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
 --
 myLogHook = return ()
 
diff --git a/man/xmonad.html b/man/xmonad.html
deleted file mode 100644
--- a/man/xmonad.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML><HEAD><TITLE>Man page of xmonad</TITLE>
-</HEAD><BODY>
-<H1>xmonad</H1>
-Section: xmonad manual (1)<BR>Updated: 8 September 09<BR><A HREF="#index">Index</A>
-<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
-
-<A NAME="lbAB">&nbsp;</A>
-<H2>NAME</H2>
-
-xmonad - a tiling window manager
-<A NAME="lbAC">&nbsp;</A>
-<H2>DESCRIPTION</H2>
-
-<P>
-
-<B>xmonad</B> is a minimalist tiling window manager for X, written in Haskell. Windows are managed using automatic layout algorithms, which can be dynamically reconfigured. At any time windows are arranged so as to maximize the use of screen real estate. All features of the window manager are accessible purely from the keyboard: a mouse is entirely optional. <B>xmonad</B> is configured in Haskell, and custom layout algorithms may be implemented by the user in config files. A principle of <B>xmonad</B> is predictability: the user should know in advance precisely the window arrangement that will result from any action.
-<P>
-
-By default, <B>xmonad</B> provides three layout algorithms: tall, wide and fullscreen. In tall or wide mode, windows are tiled and arranged to prevent overlap and maximize screen use. Sets of windows are grouped together on virtual screens, and each screen retains its own layout, which may be reconfigured dynamically. Multiple physical monitors are supported via Xinerama, allowing simultaneous display of a number of screens.
-<P>
-
-By utilizing the expressivity of a modern functional language with a rich static type system, <B>xmonad</B> provides a complete, featureful window manager in less than 1200 lines of code, with an emphasis on correctness and robustness. Internal properties of the window manager are checked using a combination of static guarantees provided by the type system, and type-based automated testing. A benefit of this is that the code is simple to understand, and easy to modify.
-<A NAME="lbAD">&nbsp;</A>
-<H2>USAGE</H2>
-
-<P>
-
-<B>xmonad</B> places each window into a &quot;workspace&quot;. Each workspace can have any number of windows, which you can cycle though with mod-j and mod-k. Windows are either displayed full screen, tiled horizontally, or tiled vertically. You can toggle the layout mode with mod-space, which will cycle through the available modes.
-<P>
-
-You can switch to workspace N with mod-N. For example, to switch to workspace 5, you would press mod-5. Similarly, you can move the current window to another workspace with mod-shift-N.
-<P>
-
-When running with multiple monitors (Xinerama), each screen has exactly 1 workspace visible. mod-{w,e,r} switch the focus between screens, while shift-mod-{w,e,r} move the current window to that screen. When <B>xmonad</B> starts, workspace 1 is on screen 1, workspace 2 is on screen 2, etc. When switching workspaces to one that is already visible, the current and visible workspaces are swapped.
-<P>
-
-<A NAME="lbAE">&nbsp;</A>
-<H3>Flags</H3>
-
-<B>xmonad</B> has several flags which you may pass to the executable. These flags are:
-<DL COMPACT>
-<DT><B>--recompile<DD>
-Recompiles your configuration in ~/.xmonad/xmonad.hs
---restart
-Causes the currently running xmonad process to restart
-<DT>--version<DD>
-Display version of xmonad</B>.
-</DL>
-<A NAME="lbAF">&nbsp;</A>
-<H3>Default keyboard bindings</H3>
-
-<DL COMPACT>
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-return</B>
-Launch terminal
-<DT><DD>
-<BR>&nbsp;<B>mod-p</B>
-Launch dmenu
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-p</B>
-Launch gmrun
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-c</B>
-Close the focused window
-<DT><DD>
-<BR>&nbsp;<B>mod-space</B>
-Rotate through the available layout algorithms
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-space</B>
-Reset the layouts on the current workspace to default
-<DT><DD>
-<BR>&nbsp;<B>mod-n</B>
-Resize viewed windows to the correct size
-<DT><DD>
-<BR>&nbsp;<B>mod-tab</B>
-Move focus to the next window
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-tab</B>
-Move focus to the previous window
-<DT><DD>
-<BR>&nbsp;<B>mod-j</B>
-Move focus to the next window
-<DT><DD>
-<BR>&nbsp;<B>mod-k</B>
-Move focus to the previous window
-<DT><DD>
-<BR>&nbsp;<B>mod-m</B>
-Move focus to the master window
-<DT><DD>
-<BR>&nbsp;<B>mod-return</B>
-Swap the focused window and the master window
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-j</B>
-Swap the focused window with the next window
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-k</B>
-Swap the focused window with the previous window
-<DT><DD>
-<BR>&nbsp;<B>mod-h</B>
-Shrink the master area
-<DT><DD>
-<BR>&nbsp;<B>mod-l</B>
-Expand the master area
-<DT><DD>
-<BR>&nbsp;<B>mod-t</B>
-Push window back into tiling
-<DT><DD>
-<BR>&nbsp;<B>mod-comma</B>
-Increment the number of windows in the master area
-<DT><DD>
-<BR>&nbsp;<B>mod-period</B>
-Deincrement the number of windows in the master area
-<DT><DD>
-<BR>&nbsp;<B>mod-b</B>
-Toggle the status bar gap
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-q</B>
-Quit xmonad
-<DT><DD>
-<BR>&nbsp;<B>mod-q</B>
-Restart xmonad
-<DT><DD>
-<BR>&nbsp;<B>mod-[1..9]</B>
-Switch to workspace N
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-[1..9]</B>
-Move client to workspace N
-<DT><DD>
-<BR>&nbsp;<B>mod-{w,e,r}</B>
-Switch to physical/Xinerama screens 1, 2, or 3
-<DT><DD>
-<BR>&nbsp;<B>mod-shift-{w,e,r}</B>
-Move client to screen 1, 2, or 3
-<DT><DD>
-<BR>&nbsp;<B>mod-button1</B>
-Set the window to floating mode and move by dragging
-<DT><DD>
-<BR>&nbsp;<B>mod-button2</B>
-Raise the window to the top of the stack
-<DT><DD>
-<BR>&nbsp;<B>mod-button3</B>
-Set the window to floating mode and resize by dragging
-<P>
-</DL>
-<A NAME="lbAG">&nbsp;</A>
-<H2>EXAMPLES</H2>
-
-To use <B>xmonad</B> as your window manager add:
-<DL COMPACT><DT><DD>
-exec xmonad
-</DL>
-
-to your <I>~/.xinitrc</I> file
-<A NAME="lbAH">&nbsp;</A>
-<H2>CUSTOMIZATION</H2>
-
-<B>xmonad</B> is customized in ~/.xmonad/xmonad.hs, and then restarting with mod-q.
-<P>
-
-You can find many extensions to the core feature set in the xmonad-contrib package, available through your package manager or from <A HREF="http://xmonad.org/.">http://xmonad.org/.</A>
-<A NAME="lbAI">&nbsp;</A>
-<H3>Modular Configuration</H3>
-
-As of <B>xmonad-0.9</B>, any additional Haskell modules may be placed in <I>~/.xmonad/lib/</I> are available in GHC's searchpath. Hierarchical modules are supported: for example, the file <I>~/.xmonad/lib/XMonad/Stack/MyAdditions.hs</I> could contain:
-<DL COMPACT><DT><DD>
-<PRE>
-
-module XMonad.Stack.MyAdditions (function1) where
-function1 = error &quot;function1: Not implemented yet!&quot;
-</PRE>
-
-</DL>
-
-<P>
-
-Your xmonad.hs may then <B>import XMonad.Stack.MyAdditions</B> as if that module was contained within <B>xmonad</B> or <B>xmonad-contrib</B>.
-<A NAME="lbAJ">&nbsp;</A>
-<H2>BUGS</H2>
-
-Probably. If you find any, please report them: <A HREF="http://code.google.com/p/xmonad/issues/list">http://code.google.com/p/xmonad/issues/list</A>
-<P>
-
-<HR>
-<A NAME="index">&nbsp;</A><H2>Index</H2>
-<DL>
-<DT><A HREF="#lbAB">NAME</A><DD>
-<DT><A HREF="#lbAC">DESCRIPTION</A><DD>
-<DT><A HREF="#lbAD">USAGE</A><DD>
-<DL>
-<DT><A HREF="#lbAE">Flags</A><DD>
-<DT><A HREF="#lbAF">Default keyboard bindings</A><DD>
-</DL>
-<DT><A HREF="#lbAG">EXAMPLES</A><DD>
-<DT><A HREF="#lbAH">CUSTOMIZATION</A><DD>
-<DL>
-<DT><A HREF="#lbAI">Modular Configuration</A><DD>
-</DL>
-<DT><A HREF="#lbAJ">BUGS</A><DD>
-</DL>
-<HR>
-This document was created by
-<A HREF="/cgi-bin/man/man2html">man2html</A>,
-using the manual pages.<BR>
-Time: 00:37:30 GMT, October 26, 2009
-</BODY>
-</HTML>
diff --git a/util/GenerateManpage.hs b/util/GenerateManpage.hs
--- a/util/GenerateManpage.hs
+++ b/util/GenerateManpage.hs
@@ -1,7 +1,14 @@
+-- Unlike the rest of xmonad, this file is copyright under the terms of the
+-- GPL.
+
 --
 -- Generates man/xmonad.1 from man/xmonad.1.in by filling the list of
 -- keybindings with values scraped from Config.hs
 --
+-- Uses cabal to grab the xmonad version from xmonad.cabal
+--
+-- Uses pandoc to convert the "xmonad.1.markdown" to "xmonad.1"
+--
 -- Format for the docstrings in Config.hs takes the following form:
 --
 -- -- mod-x %! Frob the whatsit
@@ -14,8 +21,8 @@
 -- [ ((modMask .|. shiftMask, xK_Return), spawn "xterm") -- %! Launch an xterm
 --
 -- Here, mod-shift-return will be used as the keybinding name.
---
 import Control.Monad
+import Control.Applicative
 import Text.Regex.Posix
 import Data.Char
 import Data.List
@@ -27,6 +34,10 @@
 import Text.PrettyPrint.HughesPJ
 import Distribution.Text
 
+import Text.Pandoc
+
+releaseDate = "25 October 09"
+
 trim :: String -> String
 trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace
 
@@ -42,16 +53,42 @@
 allBindings xs = map (binding . map trim) (xs =~ "(.*)--(.*)%!(.*)")
 
 -- FIXME: What escaping should we be doing on these strings?
-troff :: (String, String) -> String
-troff (key, desc) = ".IP\n \\fB" ++ key ++ "\\fR\n" ++ desc ++ "\n"
+markdownDefn :: (String, String) -> String
+markdownDefn (key, desc) = key ++ "\n:     " ++ desc
 
 replace :: Eq a => a -> a -> [a] -> [a]
 replace x y = map (\a -> if a == x then y else a)
 
+-- rawSystem "pandoc" ["--read=markdown","--write=man","man/xmonad.1.markdown"]
+
 main = do
-    releaseName <- ((' ':) . (++" \\") . show . disp . package . packageDescription) `liftM` readPackageDescription normal "xmonad.cabal"
+    releaseName <- (show . disp . package . packageDescription)
+                    `liftM`readPackageDescription normal "xmonad.cabal"
+    keybindings <- (intercalate "\n\n" . map markdownDefn . allBindings)
+                    `liftM` readFile "./XMonad/Config.hs"
 
-    troffBindings <- (concatMap troff . allBindings) `liftM` readFile "./XMonad/Config.hs"
+    let manHeader = unwords [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""]
+        writeOpts = defaultWriterOptions -- { writerLiterateHaskell = True }
 
-    let sed = unlines . replace "___RELEASE___\\" releaseName . replace "___KEYBINDINGS___" troffBindings . lines
-    readFile "./man/xmonad.1.in" >>= return . sed >>= writeFile "./man/xmonad.1"
+    parsed <- readMarkdown defaultParserState { stateLiterateHaskell = True }
+        . unlines
+        . replace "___KEYBINDINGS___" keybindings
+        . lines
+        <$> readFile "./man/xmonad.1.markdown"
+
+    writeFile "./man/xmonad.1"
+        . (manHeader ++)
+        . writeMan writeOpts
+        $ parsed
+    putStrLn "Documentation created: man/xmonad.1"
+
+    writeFile "./man/xmonad.1.html"
+        . writeHtmlString writeOpts
+            { writerHeader = "<h1>"++releaseName++"</h1>"++
+                             "<p>Section: xmonad manual (1)<br>"++
+                             "Updated: "++releaseDate++"</p>"++
+                             "<hr>"
+            , writerStandalone = True
+            , writerTableOfContents = True }
+        $ parsed
+    putStrLn "Documentation created: man/xmonad.1.html"
diff --git a/xmonad.cabal b/xmonad.cabal
--- a/xmonad.cabal
+++ b/xmonad.cabal
@@ -1,5 +1,5 @@
 name:               xmonad
-version:            0.9
+version:            0.9.1
 homepage:           http://xmonad.org
 synopsis:           A tiling window manager
 description:
@@ -18,7 +18,7 @@
 author:             Spencer Janssen
 maintainer:         xmonad@haskell.org
 extra-source-files: README TODO CONFIG STYLE tests/loc.hs tests/Properties.hs
-                    man/xmonad.1.in man/xmonad.1 man/xmonad.html
+                    man/xmonad.1.markdown man/xmonad.1 man/xmonad.1.html
                     util/GenerateManpage.hs
 cabal-version:      >= 1.2
 build-type:         Simple
@@ -46,7 +46,7 @@
         build-depends: base < 4 && >=3, containers, directory, process, filepath
     else
         build-depends: base < 3
-    build-depends: X11>=1.4.6.1, mtl, unix
+    build-depends: X11>=1.5.0.0 && < 1.6, mtl, unix
 
     ghc-options:        -funbox-strict-fields -Wall
     ghc-prof-options:   -prof -auto-all
