diff --git a/Examples/dbus-monitor.hs b/Examples/dbus-monitor.hs
deleted file mode 100644
--- a/Examples/dbus-monitor.hs
+++ /dev/null
@@ -1,280 +0,0 @@
-{-
-  Copyright (C) 2009 John Millikin <jmillikin@gmail.com>
-  
-  This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  any later version.
-  
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-  
-  You should have received a copy of the GNU General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
--}
-
-{-# LANGUAGE OverloadedStrings #-}
-
-import DBus.Address
-import DBus.Authentication
-import DBus.Bus
-import DBus.Connection
-import DBus.Constants
-import DBus.Message
-import DBus.Types
-import DBus.Wire
-
-import Control.Monad
-import qualified Data.Set as Set
-import Data.List
-import Data.Maybe
-import Data.Int
-import Data.Word
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-import System
-import System.IO
-import System.Console.GetOpt
-
-data Bus = Session | System
-	deriving (Show)
-
-data Option = BusOption Bus | AddressOption String
-	deriving (Show)
-
-optionInfo :: [OptDescr Option]
-optionInfo = [
-	  Option [] ["session"] (NoArg (BusOption Session))
-	         "Monitor the session message bus. (default)"
-	, Option [] ["system"] (NoArg (BusOption System))
-	         "Monitor the system message bus."
-	, Option [] ["address"] (ReqArg AddressOption "ADDRESS")
-	         "Connect to a particular bus address."
-	]
-
-usage :: String -> String
-usage name = "Usage: " ++ name ++ " [OPTION...]"
-
-findBus :: [Option] -> IO (Connection, BusName)
-findBus []    = getSessionBus
-findBus (o:_) = case o of
-	BusOption Session -> getSessionBus
-	BusOption System  -> getSystemBus
-	AddressOption addr -> case mkAddresses (TL.pack addr) of
-			Just [x] -> getBus realUserID x
-			Just  xs -> getFirstBus [(realUserID, addr) | addr <- xs]
-			_        -> error $ "Invalid address: " ++ show addr
-
-addMatchMsg :: String -> MethodCall
-addMatchMsg match = MethodCall
-	{ methodCallPath = dbusPath
-	, methodCallMember = "AddMatch"
-	, methodCallInterface = Just dbusInterface
-	, methodCallDestination = Just dbusName
-	, methodCallFlags = Set.empty
-	, methodCallBody = [toVariant match]
-	}
-
-addMatch :: Connection -> String -> IO ()
-addMatch c s = send c return (addMatchMsg s) >> return ()
-
-defaultFilters :: [String]
-defaultFilters =
-	[ "type='signal'"
-	, "type='method_call'"
-	, "type='method_return'"
-	, "type='error'"
-	]
-
-onMessage :: Either UnmarshalError ReceivedMessage -> IO ()
-onMessage (Right msg) = putStrLn $ (TL.unpack $ formatMessage msg) ++ "\n"
-onMessage (Left err) = error $ show err
-
-main :: IO ()
-main = do
-	args <- getArgs
-	let (options, userFilters, errors) = getOpt Permute optionInfo args
-	unless (null errors) $ do
-		name <- getProgName
-		hPutStrLn stderr $ concat errors
-		hPutStrLn stderr $ usageInfo (usage name) optionInfo
-		exitFailure
-	
-	(bus, _) <- findBus options
-	
-	let filters = if null userFilters
-		then defaultFilters
-		else userFilters
-	
-	mapM_ (addMatch bus) filters
-	
-	forever (receive bus >>= onMessage)
-
--- Message formatting is verbose and mostly uninteresting, except as an
--- excersise in string manipulation.
-
-formatMessage :: ReceivedMessage -> Text
-
--- Method call
-formatMessage (ReceivedMethodCall serial sender msg) = TL.concat
-	[ "method call"
-	, " sender="
-	, fromMaybe "(null)" . fmap strBusName $ sender
-	, " -> dest="
-	, fromMaybe "(null)" . fmap strBusName . methodCallDestination $ msg
-	, " serial="
-	, TL.pack . show $ serial
-	, " path="
-	, strObjectPath . methodCallPath $ msg
-	, "; interface="
-	, fromMaybe "(null)" . fmap strInterfaceName . methodCallInterface $ msg
-	, "; member="
-	, strMemberName . methodCallMember $ msg
-	, formatBody msg
-	]
-
--- Method return
-formatMessage (ReceivedMethodReturn _ sender msg) = TL.concat
-	[ "method return"
-	, " sender="
-	, fromMaybe "(null)" . fmap strBusName $ sender
-	, " -> dest="
-	, fromMaybe "(null)" . fmap strBusName . methodReturnDestination $ msg
-	, " reply_serial="
-	, TL.pack . show . methodReturnSerial $ msg
-	, formatBody msg
-	]
-
--- Error
-formatMessage (ReceivedError _ sender msg) = TL.concat
-	[ "error"
-	, " sender="
-	, fromMaybe "(null)" . fmap strBusName $ sender
-	, " -> dest="
-	, fromMaybe "(null)" . fmap strBusName . errorDestination $ msg
-	, " error_name="
-	, strErrorName . errorName $ msg
-	, " reply_serial="
-	, TL.pack . show . errorSerial $ msg
-	, formatBody msg
-	]
-
--- Signal
-formatMessage (ReceivedSignal serial sender msg) = TL.concat
-	[ "signal"
-	, " sender="
-	, fromMaybe "(null)" . fmap strBusName $ sender
-	, " -> dest="
-	, fromMaybe "(null)" . fmap strBusName . signalDestination $ msg
-	, " serial="
-	, TL.pack . show $ serial
-	, " path="
-	, strObjectPath . signalPath $ msg
-	, "; interface="
-	, strInterfaceName . signalInterface $ msg
-	, "; member="
-	, strMemberName . signalMember $ msg
-	, formatBody msg
-	]
-
-formatMessage (ReceivedUnknown serial sender _) = TL.concat
-	[ "unknown"
-	, " sender="
-	, fromMaybe "(null)" . fmap strBusName $ sender
-	, " serial="
-	, TL.pack .  show $ serial
-	]
-
-formatBody :: Message a => a -> Text
-formatBody msg = formatted where
-	tree = Children $ map formatVariant body
-	body = messageBody msg
-	formatted = TL.intercalate "\n" (TL.empty : collapseTree 1 tree)
-
--- A string tree allows easy indentation of nested structures
-data StringTree = Line Text | MultiLine [StringTree] | Children [StringTree]
-	deriving (Show)
-
-collapseTree :: Int64 -> StringTree -> [Text]
-collapseTree d (Line x)       = [TL.append (TL.replicate d "   ") x]
-collapseTree d (MultiLine xs) = concatMap (collapseTree d) xs
-collapseTree d (Children xs)  = concatMap (collapseTree (d + 1)) xs
-
--- Formatting for various kinds of variants, keyed to their signature type.
-formatVariant :: Variant -> StringTree
-formatVariant v = formatVariant' (variantType v) v where
-
-showT :: Show a => a -> Text
-showT = TL.pack . show
-
-formatVariant' :: Type -> Variant -> StringTree
-
-formatVariant' DBusBoolean x = Line $ TL.append "boolean " strX where
-	x' = fromJust . fromVariant $ x :: Bool
-	strX = if x' then "true" else "false"
-
-formatVariant' DBusByte x = Line $ TL.append "byte " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Word8
-
-formatVariant' DBusInt16 x = Line $ TL.append "int16 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Int16
-
-formatVariant' DBusInt32 x = Line $ TL.append "int32 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Int32
-
-formatVariant' DBusInt64 x = Line $ TL.append "int64 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Int64
-
-formatVariant' DBusWord16 x = Line $ TL.append "uint16 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Word16
-
-formatVariant' DBusWord32 x = Line $ TL.append "uint32 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Word32
-
-formatVariant' DBusWord64 x = Line $ TL.append "uint64 " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Word64
-
-formatVariant' DBusDouble x = Line $ TL.append "double " $ showT x' where
-	x' = fromJust . fromVariant $ x :: Double
-
-formatVariant' DBusString x = Line $ TL.append "string " $ showT x' where
-	x' = fromJust . fromVariant $ x :: String
-
-formatVariant' DBusObjectPath x = Line $ TL.append "object path " $ showT x' where
-	x' = strObjectPath . fromJust . fromVariant $ x
-
-formatVariant' DBusSignature x = Line $ TL.append "signature " $ showT x' where
-	x' = strSignature . fromJust . fromVariant $ x
-
-formatVariant' (DBusArray _) x = MultiLine lines' where
-	items = arrayItems . fromJust . fromVariant $ x
-	lines' =
-		[ Line "array ["
-		, Children . map formatVariant $ items
-		, Line "]"
-		]
-
-formatVariant' (DBusDictionary _ _) x = MultiLine lines' where
-	items = dictionaryItems . fromJust . fromVariant $ x
-	lines' = [ Line "dictionary {"
-		, Children . map formatItem $ items
-		, Line "}"
-		]
-	formatItem (k, v) = MultiLine $ firstLine : vTail where
-		Line k' = formatVariant k
-		v' = collapseTree 0 (formatVariant v)
-		vHead = head v'
-		vTail = map Line $ tail v'
-		firstLine = Line $ TL.concat [k', " -> ", vHead]
-
-formatVariant' (DBusStructure _) x = MultiLine lines' where
-	Structure items = fromJust . fromVariant $ x
-	lines' =
-		[ Line "struct ("
-		, Children . map formatVariant $ items
-		, Line ")"
-		]
-
-formatVariant' DBusVariant x = formatVariant . fromJust . fromVariant $ x
diff --git a/Examples/simple.hs b/Examples/simple.hs
deleted file mode 100644
--- a/Examples/simple.hs
+++ /dev/null
@@ -1,64 +0,0 @@
--- Copyright (C) 2009 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-{-# LANGUAGE OverloadedStrings #-}
-module Main (main) where
-
-import DBus.Bus
-import DBus.Connection
-import DBus.Message
-import DBus.Types
-import qualified Data.Set as Set
-import Data.List (sort)
-
-main :: IO ()
-main = do
-	-- Connect to the bus, and print which name was assigned to this
-	-- connection.
-	(bus, name) <- getSessionBus
-	putStrLn $ "Connected as: " ++ show name
-	
-	-- Request a list of connected clients from the bus
-	Right serial <- send bus return $ MethodCall
-		{ methodCallPath = "/org/freedesktop/DBus"
-		, methodCallMember = "ListNames"
-		, methodCallInterface = Just "org.freedesktop.DBus"
-		, methodCallDestination = Just "org.freedesktop.DBus"
-		, methodCallFlags = Set.empty
-		, methodCallBody = []
-		}
-	
-	-- Wait for the reply
-	reply <- waitForReply bus serial
-	
-	-- Pull out the body, and convert it to [String]
-	let Just names = fromArray =<< fromVariant (messageBody reply !! 0)
-	
-	-- Print each name on a line, sorted so reserved names are below
-	-- temporary names.
-	mapM_ putStrLn $ sort names
-
-waitForReply :: Connection -> Serial -> IO MethodReturn
-waitForReply bus serial = wait where
-	wait = do
-		received <- receive bus
-		case received of
-			Right (ReceivedMethodReturn _ _ ret) ->
-				if methodReturnSerial ret == serial
-					then return ret
-					else wait
-			Right _ -> wait
-			Left err -> error $ show err
-
diff --git a/License.txt b/License.txt
deleted file mode 100644
--- a/License.txt
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/benchmarks/Benchmarks.hs b/benchmarks/Benchmarks.hs
new file mode 100644
--- /dev/null
+++ b/benchmarks/Benchmarks.hs
@@ -0,0 +1,125 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2010-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (benchmarks, main) where
+
+import           Control.DeepSeq
+import           Criterion.Types
+import           Criterion.Config
+import qualified Criterion.Main
+import qualified Data.Set
+import           Data.Word (Word32)
+import           Unsafe.Coerce (unsafeCoerce)
+
+import           DBus.Message
+import           DBus.Wire
+import           DBus.Types
+
+config :: Config
+config = defaultConfig { cfgPerformGC = ljust True }
+
+serial :: Word32 -> Serial
+serial = unsafeCoerce -- FIXME: should the Serial constructor be exposed to
+                      -- clients?
+
+instance NFData Type
+
+instance NFData Signature where
+	rnf = rnf . signatureTypes
+
+instance NFData ObjectPath
+
+instance NFData InterfaceName
+
+instance NFData MemberName
+
+instance NFData ErrorName
+
+instance NFData BusName
+
+empty_MethodCall :: MethodCall
+empty_MethodCall = MethodCall
+	{ methodCallPath = "/"
+	, methodCallMember = "m"
+	, methodCallInterface = Nothing
+	, methodCallDestination = Nothing
+	, methodCallFlags = Data.Set.empty
+	, methodCallBody = []
+	}
+
+empty_MethodReturn :: MethodReturn
+empty_MethodReturn = MethodReturn
+	{ methodReturnSerial = serial 0
+	, methodReturnDestination = Nothing
+	, methodReturnBody =  []
+	}
+
+benchMarshal :: Message msg => String -> msg -> Benchmark
+benchMarshal name msg = bench name (whnf marshal msg) where
+	marshal = marshalMessage LittleEndian (serial 0)
+
+benchUnmarshal :: Message msg => String -> msg -> Benchmark
+benchUnmarshal name msg = bench name (whnf unmarshalMessage bytes) where
+	Right bytes = marshalMessage LittleEndian (serial 0) msg
+
+benchmarks :: [Benchmark]
+benchmarks = 
+	[  bgroup "Types"
+		[ bgroup "Signature"
+			[ bench "signature_/small" (nf signature_ "y")
+			, bench "signature_/medium" (nf signature_ "yyyyuua(yv)")
+			, bench "signature_/large" (nf signature_ "a{s(asiiiiasa(siiia{s(iiiiv)}))}")
+			, bench "signatureText" (nf signatureText "a{s(asiiiiasa(siiia{s(iiiiv)}))}")
+			]
+		, bgroup "ObjectPath"
+			[ bench "objectPath_/small" (nf objectPath "/")
+			, bench "objectPath_/medium" (nf objectPath "/foo/bar")
+			, bench "objectPath_/large" (nf objectPath "/f0OO/b4R/baz_qux/blahblahblah")
+			]
+		, bgroup "InterfaceName"
+			[ bench "interfaceName_/small" (nf interfaceName_ "f.b")
+			, bench "interfaceName_/medium" (nf interfaceName_ "foo.bar.baz")
+			, bench "interfaceName_/large" (nf interfaceName_ "f0OOO.b4R.baz_qux.blahblahblah")
+			]
+		, bgroup "MemberName"
+			[ bench "memberName_/small" (nf memberName_ "f")
+			, bench "memberName_/medium" (nf memberName_ "FooBar")
+			, bench "memberName_/large" (nf memberName_ "f0OOOb4RBazQuxBlahBlahBlah")
+			]
+		, bgroup "ErrorName"
+			[ bench "errorName_/small" (nf errorName_ "f.b")
+			, bench "errorName_/medium" (nf errorName_ "foo.bar.baz")
+			, bench "errorName_/large" (nf errorName_ "f0OOO.b4R.baz_qux.blahblahblah")
+			]
+		, bgroup "BusName"
+			[ bench "busName_/small" (nf busName_ "f.b")
+			, bench "busName_/medium" (nf busName_ "foo.bar.baz")
+			, bench "busName_/large" (nf busName_ "f0OOO.b4R.baz-qux.blahblahblah")
+			]
+		]
+	,  bgroup "Marshal"
+		[ benchMarshal "MethodCall/empty" empty_MethodCall
+		, benchMarshal "MethodReturn/empty" empty_MethodReturn
+		]
+	, bgroup "Unmarshal"
+		[ benchUnmarshal "MethodCall/empty" empty_MethodCall
+		, benchUnmarshal "MethodReturn/empty" empty_MethodReturn
+		]
+	]
+
+main :: IO ()
+main = Criterion.Main.defaultMainWith config (return ()) benchmarks
diff --git a/benchmarks/dbus-core-benchmarks.cabal b/benchmarks/dbus-core-benchmarks.cabal
new file mode 100644
--- /dev/null
+++ b/benchmarks/dbus-core-benchmarks.cabal
@@ -0,0 +1,16 @@
+name: dbus-core-benchmarks
+version: 0
+build-type: Simple
+cabal-version: >= 1.6
+
+executable dbus-core_benchmarks
+  main-is: Benchmarks.hs
+  ghc-options: -Wall -O2 -fno-warn-orphans
+
+  build-depends:
+      base > 3 && < 5
+    , binary
+    , containers
+    , criterion
+    , deepseq
+    , dbus-core
diff --git a/dbus-core.cabal b/dbus-core.cabal
--- a/dbus-core.cabal
+++ b/dbus-core.cabal
@@ -1,8 +1,8 @@
 name: dbus-core
-version: 0.8.5.4
+version: 0.9
 synopsis: Low-level D-Bus protocol implementation
 license: GPL-3
-license-file: License.txt
+license-file: license.txt
 author: John Millikin
 maintainer: jmillikin@gmail.com
 build-type: Simple
@@ -10,23 +10,52 @@
 category: Network, Desktop
 stability: experimental
 bug-reports: mailto:jmillikin@gmail.com
-homepage: http://john-millikin.com/software/haskell-dbus/
+homepage: https://john-millikin.com/software/dbus-core/
 tested-with: GHC==6.12.1
 
 extra-source-files:
-  src/*.anansi
-  Examples/*.hs
   readme.txt
+  --
+  examples/dbus-monitor.hs
+  examples/export.hs
+  examples/introspect.hs
+  examples/simple.hs
+  --
+  latex/figure_1.svg
+  latex/geometry.sty
+  latex/noweb.sty
+  --
+  scripts/common.bash
+  scripts/dist
+  scripts/haddock
+  scripts/latex
+  scripts/run-benchmarks
+  scripts/run-coverage
+  scripts/run-tests
+  --
+  src/api-docs.anansi
+  src/client.anansi
+  src/connections.anansi
+  src/constants.anansi
+  src/dbus-core.anansi
+  src/introduction.anansi
+  src/introspection.anansi
+  src/messages.anansi
+  src/module-headers.anansi
+  src/summary.anansi
+  src/types.anansi
+  src/utilities.anansi
+  src/wire.anansi
+  --
+  benchmarks/Benchmarks.hs
+  benchmarks/dbus-core-benchmarks.cabal
+  --
+  tests/Tests.hs
+  tests/dbus-core-tests.cabal
 
 source-repository head
   type: bazaar
-  location: http://john-millikin.com/software/haskell-dbus/
-
-flag test
-  default: False
-
-flag hpc
-  default: False
+  location: https://john-millikin.com/software/dbus-core/
 
 library
   ghc-options: -Wall
@@ -39,53 +68,32 @@
     , binary >= 0.4 && < 0.6
     , bytestring >= 0.9 && < 0.10
     , data-binary-ieee754 >= 0.3 && < 0.5
-    , text >= 0.8 && < 0.12
+    , text >= 0.11.1.5 && < 0.12
     , containers >= 0.1 && < 0.5
     , unix >= 2.2 && < 2.5
     , network >= 2.2 && < 2.4
-    , libxml-sax >= 0.6 && < 0.7
-    , xml-types >= 0.1 && < 0.2
+    , libxml-sax >= 0.7 && < 0.8
+    , xml-types >= 0.3 && < 0.4
+    , vector >= 0.7 && < 0.8
 
   exposed-modules:
     DBus.Address
-    DBus.Authentication
-    DBus.Bus
+    DBus.Client
+    DBus.Client.Simple
     DBus.Connection
     DBus.Constants
     DBus.Introspection
-    DBus.MatchRule
     DBus.Message
-    DBus.NameReservation
     DBus.Types
-    DBus.UUID
     DBus.Wire
 
   other-modules:
+    DBus.Client.Internal
+    DBus.Connection.Error
+    DBus.Connection.Authentication
+    DBus.Connection.Transport
     DBus.Message.Internal
     DBus.Types.Internal
-    DBus.Wire.Internal
-    DBus.Wire.Marshal
-    DBus.Wire.Unmarshal
-    DBus.Wire.Unicode
     DBus.Util
     DBus.Util.MonadError
-
-executable dbus-core-tests
-  main-is: Tests.hs
-  hs-source-dirs: hs
-
-  if flag(test)
-    build-depends:
-        QuickCheck >= 2.2 && < 2.3
-      , test-framework >= 0.2 && < 0.4
-      , test-framework-quickcheck2 >= 0.2 && < 0.3
-  else
-    buildable: False
-
-  if flag(hpc)
-    ghc-options: -fhpc
-
-  other-modules:
-    DBus.Types.Internal
-    DBus.Util
-
+    DBus.Wire.Internal
diff --git a/examples/dbus-monitor.hs b/examples/dbus-monitor.hs
new file mode 100644
--- /dev/null
+++ b/examples/dbus-monitor.hs
@@ -0,0 +1,294 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (main) where
+
+import           Control.Concurrent (threadDelay)
+import           Control.Monad
+import           Data.Maybe
+import           Data.Int
+import           Data.Word
+import           Data.Text (Text)
+import qualified Data.Text
+import           System
+import           System.IO
+import           System.Console.GetOpt
+
+import           DBus.Address
+import           DBus.Client (connect, setMessageProcessor)
+import           DBus.Client.Simple
+import           DBus.Message
+
+data Bus = Session | System
+	deriving (Show)
+
+data Option = BusOption Bus | AddressOption String
+	deriving (Show)
+
+optionInfo :: [OptDescr Option]
+optionInfo = [
+	  Option [] ["session"] (NoArg (BusOption Session))
+	         "Monitor the session message bus. (default)"
+	, Option [] ["system"] (NoArg (BusOption System))
+	         "Monitor the system message bus."
+	, Option [] ["address"] (ReqArg AddressOption "ADDRESS")
+	         "Connect to a particular bus address."
+	]
+
+usage :: String -> String
+usage name = "Usage: " ++ name ++ " [OPTION...]"
+
+findClient :: [Option] -> IO Client
+findClient []    = connectSession
+findClient (o:_) = case o of
+	BusOption Session -> connectSession
+	BusOption System  -> connectSystem
+	AddressOption addr -> case address (Data.Text.pack addr) of
+			Just addr' -> connect addr'
+			_ -> error ("Invalid address: " ++ show addr)
+
+addMatch :: Proxy -> Text -> IO ()
+addMatch bus match = do
+	_ <- call bus "org.freedesktop.DBus" "AddMatch" [toVariant match]
+	return ()
+
+defaultFilters :: [Text]
+defaultFilters =
+	[ "type='signal'"
+	, "type='method_call'"
+	, "type='method_return'"
+	, "type='error'"
+	]
+
+main :: IO ()
+main = do
+	args <- getArgs
+	let (options, userFilters, errors) = getOpt Permute optionInfo args
+	unless (null errors) $ do
+		name <- getProgName
+		hPutStrLn stderr (concat errors)
+		hPutStrLn stderr (usageInfo (usage name) optionInfo)
+		exitFailure
+	
+	client <- findClient options
+	setMessageProcessor client (\msg -> do
+		putStrLn (Data.Text.unpack (formatMessage msg) ++ "\n")
+		return False)
+	
+	let filters = if null userFilters
+		then defaultFilters
+		else map Data.Text.pack userFilters
+	
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	mapM_ (addMatch bus) filters
+	
+	-- wait forever
+	forever (threadDelay 50000)
+
+-- Message formatting is verbose and mostly uninteresting, except as an
+-- excersise in string manipulation.
+
+showT :: Show a => a -> Text
+showT = Data.Text.pack . show
+
+formatMessage :: ReceivedMessage -> Text
+
+-- Method call
+formatMessage (ReceivedMethodCall serial sender msg) = Data.Text.concat
+	[ "method call"
+	, " sender="
+	, fromMaybe "(null)" (fmap busNameText sender)
+	, " -> dest="
+	, fromMaybe "(null)" (fmap busNameText (methodCallDestination msg))
+	, " serial="
+	, showT (serialValue serial)
+	, " path="
+	, objectPathText (methodCallPath msg)
+	, "; interface="
+	, fromMaybe "(null)" (fmap interfaceNameText (methodCallInterface msg))
+	, "; member="
+	, memberNameText (methodCallMember msg)
+	, formatBody msg
+	]
+
+-- Method return
+formatMessage (ReceivedMethodReturn _ sender msg) = Data.Text.concat
+	[ "method return"
+	, " sender="
+	, fromMaybe "(null)" (fmap busNameText sender)
+	, " -> dest="
+	, fromMaybe "(null)" (fmap busNameText (methodReturnDestination msg))
+	, " reply_serial="
+	, showT (serialValue (methodReturnSerial msg))
+	, formatBody msg
+	]
+
+-- Error
+formatMessage (ReceivedError _ sender msg) = Data.Text.concat
+	[ "error"
+	, " sender="
+	, fromMaybe "(null)" (fmap busNameText sender)
+	, " -> dest="
+	, fromMaybe "(null)" (fmap busNameText (errorDestination msg))
+	, " error_name="
+	, errorNameText (DBus.Message.errorName msg)
+	, " reply_serial="
+	, showT (serialValue (errorSerial msg))
+	, formatBody msg
+	]
+
+-- Signal
+formatMessage (ReceivedSignal serial sender msg) = Data.Text.concat
+	[ "signal"
+	, " sender="
+	, fromMaybe "(null)" (fmap busNameText sender)
+	, " -> dest="
+	, fromMaybe "(null)" (fmap busNameText (signalDestination msg))
+	, " serial="
+	, showT (serialValue serial)
+	, " path="
+	, objectPathText (signalPath msg)
+	, "; interface="
+	, interfaceNameText (signalInterface msg)
+	, "; member="
+	, memberNameText (signalMember msg)
+	, formatBody msg
+	]
+
+formatMessage (ReceivedUnknown serial sender _) = Data.Text.concat
+	[ "unknown"
+	, " sender="
+	, fromMaybe "(null)" (fmap busNameText sender)
+	, " serial="
+	, showT (serialValue serial)
+	]
+
+formatBody :: Message a => a -> Text
+formatBody msg = formatted where
+	tree = Children (map formatVariant body)
+	body = messageBody msg
+	formatted = Data.Text.intercalate "\n" ("" : collapseTree 1 tree)
+
+-- A string tree allows easy indentation of nested structures
+data StringTree = Line Text | MultiLine [StringTree] | Children [StringTree]
+	deriving (Show)
+
+collapseTree :: Int -> StringTree -> [Text]
+collapseTree d (Line x)       = [Data.Text.append (Data.Text.replicate d "   ") x]
+collapseTree d (MultiLine xs) = concatMap (collapseTree d) xs
+collapseTree d (Children xs)  = concatMap (collapseTree (d + 1)) xs
+
+-- Formatting for various kinds of variants, keyed to their signature type.
+formatVariant :: Variant -> StringTree
+formatVariant x = case variantType x of
+	
+	TypeBoolean -> Line $ let
+		Just x' = fromVariant x
+		strX = if x' then "true" else "false"
+		in Data.Text.append "boolean " strX
+	
+	TypeWord8 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Word8)
+		in Data.Text.append "byte " strX
+	
+	TypeWord16 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Word16)
+		in Data.Text.append "uint16 " strX
+	
+	TypeWord32 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Word32)
+		in Data.Text.append "uint32 " strX
+	
+	TypeWord64 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Word64)
+		in Data.Text.append "uint64 " strX
+	
+	TypeInt16 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Int16)
+		in Data.Text.append "int16 " strX
+	
+	TypeInt32 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Int32)
+		in Data.Text.append "int32 " strX
+	
+	TypeInt64 -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Int64)
+		in Data.Text.append "int64 " strX
+	
+	TypeDouble -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Double)
+		in Data.Text.append "double " strX
+	
+	TypeString -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (x' :: Text)
+		in Data.Text.append "string " strX
+	
+	TypeObjectPath -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (objectPathText x')
+		in Data.Text.append "object path " strX
+	
+	TypeSignature -> Line $ let
+		Just x' = fromVariant x
+		strX = showT (signatureText x')
+		in Data.Text.append "signature " strX
+	
+	TypeArray _ -> MultiLine $ let
+		Just x' = fromVariant x
+		items = arrayItems x'
+		lines' = [ Line "array ["
+		         , Children (map formatVariant items)
+		         , Line "]"
+		         ]
+		in lines'
+	
+	TypeDictionary _ _ -> MultiLine $ let
+		Just x' = fromVariant x
+		items = dictionaryItems x'
+		lines' = [ Line "dictionary {"
+		         , Children (map formatItem items)
+		         , Line "}"
+		         ]
+		formatItem (k, v) = MultiLine (firstLine : vTail) where
+			Line k' = formatVariant k
+			v' = collapseTree 0 (formatVariant v)
+			vHead = head v'
+			vTail = map Line (tail v')
+			firstLine = Line (Data.Text.concat [k', " -> ", vHead])
+		in lines'
+	
+	TypeStructure _ -> MultiLine $ let
+		Just x' = fromVariant x
+		items = structureItems x'
+		lines' = [ Line "struct ("
+		         , Children (map formatVariant items)
+		         , Line ")"
+		         ]
+		in lines'
+	
+	TypeVariant -> let
+		Just x' = fromVariant x
+		in formatVariant x'
diff --git a/examples/export.hs b/examples/export.hs
new file mode 100644
--- /dev/null
+++ b/examples/export.hs
@@ -0,0 +1,56 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (main) where
+
+import           Control.Concurrent (threadDelay)
+import           Control.Monad (forever)
+import           Data.Text
+
+import           DBus.Client.Simple
+
+onFoo :: Text -> Text -> IO (Text, Text)
+onFoo x y = do
+	putStrLn ("Foo " ++ unpack x ++ " " ++ unpack y)
+	return (x, y)
+
+onBar :: Text -> Text -> IO (Text, Text)
+onBar x y = do
+	putStrLn ("Bar " ++ unpack x ++ " " ++ unpack y)
+	throwError "com.example.ErrorBar" "Bar failed" []
+
+main :: IO ()
+main = do
+	-- Connect to the bus
+	client <- connectSession
+	
+	-- Request a unique name on the bus. If the name is already
+	-- in use, continue without it.
+	_ <- requestName client "com.example.exporting" []
+	
+	-- Export two example objects
+	export client "/a"
+		[ method "test.iface_1" "Foo" (onFoo "hello" "a")
+		, method "test.iface_1" "Bar" (onBar "hello" "a")
+		]
+	export client "/b"
+		[ method "test.iface_1" "Foo" (onFoo "hello")
+		, method "test.iface_1" "Bar" (onBar "hello")
+		]
+	
+	-- Wait forever for method calls
+	forever (threadDelay 50000)
diff --git a/examples/introspect.hs b/examples/introspect.hs
new file mode 100644
--- /dev/null
+++ b/examples/introspect.hs
@@ -0,0 +1,97 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (main) where
+
+import           Data.String (fromString)
+import qualified Data.Text
+import           System (getArgs, getProgName, exitFailure)
+import           System.IO (hPutStrLn, stderr)
+
+import           DBus.Client.Simple
+import qualified DBus.Introspection as I
+
+main :: IO ()
+main = do
+	args <- getArgs
+	(service, path) <- case args of
+		a1:a2:_ -> return (fromString a1, fromString a2)
+		_ -> do
+			name <- getProgName
+			hPutStrLn stderr ("Usage: " ++ name ++ " <service> <path>")
+			exitFailure
+	client <- connectSession
+	printObj (introspect client service) path
+
+introspect :: Client -> BusName -> ObjectPath -> IO I.Object
+introspect client service path = do
+	obj <- proxy client service path
+	reply <- call obj "org.freedesktop.DBus.Introspectable" "Introspect" []
+	let Just xml = fromVariant (reply !! 0)
+	case I.fromXML path xml of
+		Just info -> return info
+		Nothing -> error ("Invalid introspection XML: " ++ show xml)
+
+-- most of this stuff is just boring text formatting
+
+printObj :: (ObjectPath -> IO I.Object) -> ObjectPath -> IO ()
+printObj get path = do
+	(I.Object _ interfaces children) <- get path
+	putStrLn (Data.Text.unpack (objectPathText path))
+	mapM_ printIface interfaces
+	putStrLn ""
+	mapM_ (printObj get) [x | (I.Object x _ _) <- children]
+
+printIface :: I.Interface -> IO ()
+printIface (I.Interface name methods signals properties) = do
+	putStr "    "
+	putStrLn (Data.Text.unpack (interfaceNameText name))
+	
+	mapM_ printMethod methods
+	mapM_ printSignal signals
+	mapM_ printProperty properties
+	putStrLn ""
+
+printMethod :: I.Method -> IO ()
+printMethod (I.Method name inParams outParams) = do
+	putStr "        method "
+	putStrLn (Data.Text.unpack (memberNameText name))
+	
+	mapM_ (printParam "IN") inParams
+	mapM_ (printParam "OUT") outParams
+
+printSignal :: I.Signal -> IO ()
+printSignal (I.Signal name params) = do
+	putStr "        signal "
+	putStrLn (Data.Text.unpack (memberNameText name))
+	
+	mapM_ (printParam "OUT") params
+
+printProperty :: I.Property -> IO ()
+printProperty (I.Property name sig access) = do
+	putStr "        property "
+	putStr (show (signatureText sig) ++ " ")
+	putStrLn (Data.Text.unpack name)
+	
+	putStr "            "
+	putStrLn (show access)
+	
+printParam :: String -> I.Parameter -> IO ()
+printParam label (I.Parameter name sig) = do
+	putStr ("            [" ++ label ++ " ")
+	putStr (show (signatureText sig) ++ "] ")
+	putStrLn (Data.Text.unpack name)
diff --git a/examples/simple.hs b/examples/simple.hs
new file mode 100644
--- /dev/null
+++ b/examples/simple.hs
@@ -0,0 +1,39 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (main) where
+
+import           Data.Text
+import           Data.List (sort)
+
+import           DBus.Client.Simple
+
+main :: IO ()
+main = do
+	client <- connectSession
+	
+	-- Request a list of connected clients from the bus
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	reply <- call bus "org.freedesktop.DBus" "ListNames" []
+	
+	-- org.freedesktop.DBus.ListNames returns a single value, which is
+	-- a list of names (here represented as [Text])
+	let Just names = fromVariant (reply !! 0)
+	
+	-- Print each name on a line, sorted so reserved names are below
+	-- temporary names.
+	mapM_ (putStrLn . unpack) (sort names)
diff --git a/hs/DBus/Address.hs b/hs/DBus/Address.hs
--- a/hs/DBus/Address.hs
+++ b/hs/DBus/Address.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,69 +16,125 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
-{-# LANGUAGE OverloadedStrings #-}
-
 module DBus.Address
 	( Address
 	, addressMethod
 	, addressParameters
-	, mkAddresses
-	, strAddress
+	, address
+	, addresses
+	, addressText
+	
+	-- * Environmental addresses
+	, getSystem
+	, getSession
+	, getStarter
 	) where
+import qualified Control.Exception
+import           Data.Char (ord, chr)
+import qualified Data.Map
+import           Data.Map (Map)
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified System.Environment
+import           Text.Printf (printf)
+import           Text.ParserCombinators.Parsec hiding (runParser)
 
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
+import           DBus.Util (hexToInt, void)
+import           DBus.Types.Internal (runParser)
 
+data Address = Address Text (Map Text Text)
+	deriving (Eq)
 
-import Data.Char (ord, chr)
-import qualified Data.Map as M
-import Text.Printf (printf)
-import qualified Text.ParserCombinators.Parsec as P
-import Text.ParserCombinators.Parsec ((<|>))
-import DBus.Util (hexToInt, eitherToMaybe, void)
+addressMethod :: Address -> Text
+addressMethod (Address x _ ) = x
 
+addressParameters :: Address -> Map Text Text
+addressParameters (Address _ x) = x
+
+address :: Text -> Maybe Address
+address = runParser $ do
+	addr <- parseAddress
+	eof
+	return addr
+
+parseAddress :: Parser Address
+parseAddress = parser where
+	parser = do
+		method <- many (noneOf ":;")
+		void (char ':')
+		params <- sepEndBy param (char ',')
+		return (Address
+			(Data.Text.pack method)
+			(Data.Map.fromList params))
+	
+	param = do
+		key <- many1 (noneOf "=;,")
+		void (char '=')
+		value <- many1 valueChar
+		let pack = Data.Text.pack
+		return (pack key, pack value)
+	
+	valueChar = encoded <|> unencoded
+	encoded = do
+		void (char '%')
+		hex <- count 2 hexDigit
+		return (chr (hexToInt hex))
+	unencoded = oneOf optionallyEncoded
+
 optionallyEncoded :: [Char]
-optionallyEncoded = ['0'..'9'] ++ ['a'..'z'] ++ ['A'..'Z'] ++ "-_/\\*."
+optionallyEncoded = concat
+	[ ['0'..'9']
+	, ['a'..'z']
+	, ['A'..'Z']
+	, "-_/\\*."
+	]
 
-data Address = Address
-	{ addressMethod     :: Text
-	, addressParameters :: M.Map Text Text
-	} deriving (Eq)
+addresses :: Text -> Maybe [Address]
+addresses = runParser $ do
+	xs <- sepEndBy1 parseAddress (char ';')
+	eof
+	return xs
 
 instance Show Address where
-	showsPrec d x = showParen (d> 10) $
-		showString "Address " . shows (strAddress x)
+	showsPrec d x = showParen (d > 10) $
+		showString "Address " .
+		shows (addressText x)
 
-mkAddresses :: Text -> Maybe [Address]
-mkAddresses s = eitherToMaybe . P.parse parser "" . TL.unpack $ s where
-	address = do
-		method <- P.many (P.noneOf ":;")
-		void (P.char ':')
-		params <- P.sepEndBy param (P.char ',')
-		return $ Address (TL.pack method) (M.fromList params)
-	
-	param = do
-		key <- P.many1 (P.noneOf "=;,")
-		void (P.char '=')
-		value <- P.many1 (encodedValue <|> unencodedValue)
-		return (TL.pack key, TL.pack value)
+addressText :: Address -> Text
+addressText addr = Data.Text.concat chunks where
+	chunks = [ addressMethod addr, ":"
+	         , paramsText]
 	
-	parser = do
-		as <- P.sepEndBy1 address (P.char ';')
-		P.eof
-		return as
+	params = addressParameters addr
+	paramsText = Data.Text.intercalate "," $ do
+		(k, v) <- Data.Map.toList params
+		let k' = Data.Text.unpack k
+		let v' = Data.Text.unpack v
+		let encoded = concatMap encode v'
+		let str = concat [k', "=", encoded]
+		return (Data.Text.pack str)
 	
-	unencodedValue = P.oneOf optionallyEncoded
-	encodedValue = do
-		void (P.char '%')
-		hex <- P.count 2 P.hexDigit
-		return . chr . hexToInt $ hex
+	encode c = if elem c optionallyEncoded
+		then [c]
+		else printf "%%%02X" (ord c)
 
-strAddress :: Address -> Text
-strAddress (Address t ps) = TL.concat [t, ":", ps'] where
-	ps' = TL.intercalate "," $ do
-		(k, v) <- M.toList ps
-		return $ TL.concat [k, "=", TL.concatMap encode v]
-	encode c | elem c optionallyEncoded = TL.singleton c
-	         | otherwise       = TL.pack $ printf "%%%02X" (ord c)
+getenv :: String -> IO (Maybe Text)
+getenv name = Control.Exception.catch
+	(fmap (Just . Data.Text.pack) (System.Environment.getEnv name))
+	(\(Control.Exception.SomeException _) -> return Nothing)
+
+getSystem :: IO (Maybe [Address])
+getSystem = do
+	let system = "unix:path=/var/run/dbus/system_bus_socket"
+	env <- getenv "DBUS_SYSTEM_BUS_ADDRESS"
+	return (addresses (maybe system id env))
+
+getSession :: IO (Maybe [Address])
+getSession = do
+	env <- getenv "DBUS_SESSION_BUS_ADDRESS"
+	return (env >>= addresses)
+
+getStarter :: IO (Maybe [Address])
+getStarter = do
+	env <- getenv "DBUS_STARTER_BUS_ADDRESS"
+	return (env >>= addresses)
diff --git a/hs/DBus/Authentication.hs b/hs/DBus/Authentication.hs
deleted file mode 100644
--- a/hs/DBus/Authentication.hs
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-{-# LANGUAGE DeriveDataTypeable #-}
-module DBus.Authentication
-	( Command
-	, Mechanism (..)
-	, AuthenticationError (..)
-	, authenticate
-	, realUserID
-	) where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-import Data.ByteString.Lazy (ByteString)
-import qualified Data.ByteString.Lazy as ByteString
-import Data.ByteString.Lazy.Char8 ()
-import qualified DBus.UUID as UUID
-
-import Data.Typeable (Typeable)
-import qualified Control.Exception as E
-
-import Data.Word (Word8)
-
-import Control.Monad (liftM)
-import Data.Char (chr)
-import Data.Text.Lazy.Encoding (encodeUtf8)
-import DBus.Util (readUntil, dropEnd)
-
-import System.Posix.User (getRealUserID)
-import Data.Char (ord)
-import Text.Printf (printf)
-
-import Data.Maybe (isJust)
-
-type Command = Text
-newtype Mechanism = Mechanism
-	{ mechanismRun :: (Command -> IO Command) -> IO UUID.UUID
-	}
-
-data AuthenticationError
-	= AuthenticationError Text
-	deriving (Show, Typeable)
-
-instance E.Exception AuthenticationError
-
-authenticate :: Mechanism -> (ByteString -> IO ()) -> IO Word8
-             -> IO UUID.UUID
-authenticate mech put getByte = do
-	put $ ByteString.singleton 0
-	uuid <- mechanismRun mech (putCommand put getByte)
-	put "BEGIN\r\n"
-	return uuid
-
-putCommand :: Monad m => (ByteString -> m ()) -> m Word8 -> Command -> m Command
-putCommand put get cmd = do
-	let getC = liftM (chr . fromIntegral) get
-	put $ encodeUtf8 cmd
-	put "\r\n"
-	liftM (TL.pack . dropEnd 2) $ readUntil "\r\n" getC
-
-realUserID :: Mechanism
-realUserID = Mechanism $ \sendCmd -> do
-	uid <- getRealUserID
-	let token = concatMap (printf "%02X" . ord) (show uid)
-	let cmd = "AUTH EXTERNAL " ++ token
-	eitherUUID <- checkOK `fmap` sendCmd (TL.pack cmd)
-	case eitherUUID of
-		Right uuid -> return uuid
-		Left err -> E.throwIO $ AuthenticationError err
-
-checkOK :: Command -> Either Text UUID.UUID
-checkOK cmd = if validUUID then Right uuid else Left errorMsg where
-	validUUID = TL.isPrefixOf "OK " cmd && isJust maybeUUID
-	maybeUUID = UUID.fromHex $ TL.drop 3 cmd
-	Just uuid = maybeUUID
-	errorMsg = if TL.isPrefixOf "ERROR " cmd
-		then TL.drop 6 cmd
-		else TL.pack $ "Unexpected response: " ++ show cmd
diff --git a/hs/DBus/Bus.hs b/hs/DBus/Bus.hs
deleted file mode 100644
--- a/hs/DBus/Bus.hs
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-module DBus.Bus
-	( getBus
-	, getFirstBus
-	, getSystemBus
-	, getSessionBus
-	, getStarterBus
-	) where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-import qualified Control.Exception as E
-import Control.Monad (when)
-import Data.Maybe (fromJust, isNothing)
-import qualified Data.Set as Set
-import System.Environment (getEnv)
-
-import qualified DBus.Address as A
-import qualified DBus.Authentication as Auth
-import qualified DBus.Connection as C
-import DBus.Constants (dbusName, dbusPath, dbusInterface)
-import qualified DBus.Message as M
-import qualified DBus.Types as T
-import DBus.Util (fromRight)
-
-busForConnection :: C.Connection -> IO (C.Connection, T.BusName)
-busForConnection c = fmap ((,) c) $ sendHello c
-
-
--- | Similar to 'C.connect', but additionally sends @Hello@ messages to the
--- central bus.
-
-getBus :: Auth.Mechanism -> A.Address -> IO (C.Connection, T.BusName)
-getBus = ((busForConnection =<<) .) . C.connect
-
-
--- | Similar to 'C.connectFirst', but additionally sends @Hello@ messages to
--- the central bus.
-
-getFirstBus :: [(Auth.Mechanism, A.Address)] -> IO (C.Connection, T.BusName)
-getFirstBus = (busForConnection =<<) . C.connectFirst
-
-
--- | Connect to the bus specified in the environment variable
--- @DBUS_SYSTEM_BUS_ADDRESS@, or to
--- @unix:path=\/var\/run\/dbus\/system_bus_socket@ if @DBUS_SYSTEM_BUS_ADDRESS@
--- is not set.
-
-getSystemBus :: IO (C.Connection, T.BusName)
-getSystemBus = getBus' $ fromEnv `E.catch` noEnv where
-	defaultAddr = "unix:path=/var/run/dbus/system_bus_socket"
-	fromEnv = getEnv "DBUS_SYSTEM_BUS_ADDRESS"
-	noEnv (E.SomeException _) = return defaultAddr
-
-
--- | Connect to the bus specified in the environment variable
--- @DBUS_SESSION_BUS_ADDRESS@, which must be set.
-
-getSessionBus :: IO (C.Connection, T.BusName)
-getSessionBus = getBus' $ getEnv "DBUS_SESSION_BUS_ADDRESS"
-
-
--- | Connect to the bus specified in the environment variable
--- @DBUS_STARTER_ADDRESS@, which must be set.
-
-getStarterBus :: IO (C.Connection, T.BusName)
-getStarterBus = getBus' $ getEnv "DBUS_STARTER_ADDRESS"
-
-getBus' :: IO String -> IO (C.Connection, T.BusName)
-getBus' io = do
-	addr <- fmap TL.pack io
-	case A.mkAddresses addr of
-		Just [x] -> getBus Auth.realUserID x
-		Just  xs -> getFirstBus [(Auth.realUserID,x) | x <- xs]
-		_        -> E.throwIO $ C.InvalidAddress addr
-
-hello :: M.MethodCall
-hello = M.MethodCall dbusPath
-	"Hello"
-	(Just dbusInterface)
-	(Just dbusName)
-	Set.empty
-	[]
-
-sendHello :: C.Connection -> IO T.BusName
-sendHello c = do
-	serial <- fromRight `fmap` C.send c return hello
-	reply <- waitForReply c serial
-	let name = case M.methodReturnBody reply of
-		(x:_) -> T.fromVariant x
-		_     -> Nothing
-	
-	when (isNothing name) $
-		E.throwIO $ E.AssertionFailed "Invalid response to Hello()"
-	
-	return . fromJust $ name
-
-waitForReply :: C.Connection -> M.Serial -> IO M.MethodReturn
-waitForReply c serial = do
-	received <- C.receive c
-	msg <- case received of
-		Right x -> return x
-		Left _  -> E.throwIO $ E.AssertionFailed "Invalid response to Hello()"
-	case msg of
-		(M.ReceivedMethodReturn _ _ reply) ->
-			if M.methodReturnSerial reply == serial
-				then return reply
-				else waitForReply c serial
-		_ -> waitForReply c serial
diff --git a/hs/DBus/Client.hs b/hs/DBus/Client.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Client.hs
@@ -0,0 +1,42 @@
+
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Client
+	(
+	-- * Clients
+	  Client
+	, connect
+	, attach
+	, disconnect
+	, call
+	, call_
+	
+	-- * Listening for signals
+	, MatchRule(..)
+	, listen
+	
+	-- * Exporting objects
+	, Method
+	, Reply(..)
+	, throwError
+	, method
+	, export
+	
+	-- * Other
+	, setMessageProcessor
+	) where
+import           DBus.Client.Internal
diff --git a/hs/DBus/Client/Internal.hs b/hs/DBus/Client/Internal.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Client/Internal.hs
@@ -0,0 +1,350 @@
+
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Client.Internal where
+import           Control.Concurrent
+import           Control.Exception (SomeException)
+import qualified Control.Exception
+import           Control.Monad (forever, unless)
+import           Control.Monad.Fix (mfix)
+import           Data.IORef
+import           Data.List (foldl')
+import qualified Data.Map
+import           Data.Map (Map)
+import           Data.Maybe (isJust, catMaybes)
+import           Data.Text (Text)
+import qualified Data.Text
+import           Data.Typeable (Typeable)
+import qualified Data.Set
+
+import           DBus.Address
+import qualified DBus.Connection
+import           DBus.Connection (Connection)
+import           DBus.Connection.Authentication (external)
+import           DBus.Connection.Transport (unix, tcp)
+import           DBus.Connection.Error
+import qualified DBus.Constants
+import           DBus.Constants ( errorFailed, errorUnknownMethod
+                                , errorInvalidParameters)
+import           DBus.Message
+import qualified DBus.Introspection
+import           DBus.Types
+import           DBus.Types.Internal (Signature(..))
+import           DBus.Util (void)
+
+
+data Client = Client
+	{ clientConnection :: Connection
+	, clientCallbacks :: MVar (Map Serial Callback)
+	, clientSignalHandlers :: MVar [Callback]
+	, clientObjects :: MVar (Map ObjectPath ObjectInfo)
+	, clientThreadID :: ThreadId
+	, clientMessageProcessor :: IORef (ReceivedMessage -> IO Bool)
+	}
+
+type Callback = (ReceivedMessage -> IO ())
+
+data Reply
+	= ReplyReturn [Variant]
+	| ReplyError ErrorName [Variant]
+
+data Method = Method InterfaceName MemberName Signature Signature ([Variant] -> IO Reply)
+
+type ObjectInfo = Map InterfaceName InterfaceInfo
+type InterfaceInfo = Map MemberName MemberInfo
+data MemberInfo
+	= MemberMethod Signature Signature Callback
+	| MemberSignal Signature
+
+attach :: Connection -> IO Client
+attach connection = do
+	callbacks <- newMVar Data.Map.empty
+	signalHandlers <- newMVar []
+	objects <- newMVar Data.Map.empty
+	processor <- newIORef (\_ -> return False)
+	
+	client <- mfix $ \client -> do
+		threadID <- forkIO (mainLoop client)
+		return (Client
+			{ clientConnection = connection
+			, clientCallbacks = callbacks
+			, clientSignalHandlers = signalHandlers
+			, clientObjects = objects
+			, clientThreadID = threadID
+			, clientMessageProcessor = processor
+			})
+	
+	export client "/" [introspectRoot client]
+	
+	void (call_ client (MethodCall
+		{ methodCallDestination = Just "org.freedesktop.DBus"
+		, methodCallMember = "Hello"
+		, methodCallInterface = Just "org.freedesktop.DBus"
+		, methodCallPath = "/org/freedesktop/DBus"
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = []
+		}))
+	
+	return client
+
+connect :: Address -> IO Client
+connect addr = do
+	connection <- DBus.Connection.connect [unix, tcp] [external] addr
+	attach connection
+
+
+-- | Stop a 'Client'#8217;s callback thread and close its underlying socket.
+
+disconnect :: Client -> IO ()
+disconnect client = do
+	let connection = clientConnection client
+	killThread (clientThreadID client)
+	modifyMVar_ (clientCallbacks client) (\_ -> return Data.Map.empty)
+	modifyMVar_ (clientSignalHandlers client) (\_ -> return [])
+	modifyMVar_ (clientObjects client) (\_ -> return Data.Map.empty)
+	DBus.Connection.disconnect connection
+
+setMessageProcessor :: Client -> (ReceivedMessage -> IO Bool) -> IO ()
+setMessageProcessor client io = atomicModifyIORef
+	(clientMessageProcessor client)
+	(\_ -> (io, ()))
+
+mainLoop :: Client -> IO ()
+mainLoop client = forever $ do
+	let connection = clientConnection client
+	
+	received <- DBus.Connection.receive connection
+	msg <- case received of
+		Left err -> do
+			disconnect client
+			connectionError ("Received invalid message: " ++ show err)
+		Right msg -> return msg
+	
+	dispatch client msg
+
+dispatch :: Client -> ReceivedMessage -> IO ()
+dispatch client received = void . forkIO $ do
+	process <- readIORef (clientMessageProcessor client)
+	handled <- process received
+	
+	let onReply serial = do
+		let mvar = clientCallbacks client
+		maybeCB <- modifyMVar mvar $ \callbacks -> let
+			x = Data.Map.lookup serial callbacks
+			callbacks' = if isJust x
+				then Data.Map.delete serial callbacks
+				else callbacks
+			in return (callbacks', x)
+		case maybeCB of
+			Just cb -> void (cb received)
+			Nothing -> return ()
+	
+	unless handled $ case received of
+		(ReceivedMethodReturn _ _ msg) -> onReply (methodReturnSerial msg)
+		(ReceivedError _ _ msg) -> onReply (errorSerial msg)
+		(ReceivedSignal _ _ _) -> do
+			handlers <- readMVar (clientSignalHandlers client)
+			mapM_ ($ received) handlers
+		(ReceivedMethodCall serial sender msg) -> do
+			objects <- readMVar (clientObjects client)
+			case findMethod objects msg of
+				Just io -> io received
+				Nothing -> send_ client
+					(Error errorUnknownMethod serial sender [])
+					(\_ -> return ())
+		_ -> return ()
+
+send_ :: Message msg => Client -> msg -> (Serial -> IO a) -> IO a
+send_ client msg io = do
+	result <- DBus.Connection.send (clientConnection client) msg io
+	case result of
+		Right serial -> return serial
+		Left err -> connectionError ("Error sending message: " ++ show err)
+
+call :: Client -> MethodCall -> IO (Either Error MethodReturn)
+call client msg = do
+	mvar <- newEmptyMVar
+	
+	let callback (ReceivedError _ _ err) = putMVar mvar (Left err)
+	    callback (ReceivedMethodReturn _ _ reply) = putMVar mvar (Right reply)
+	    callback _ = return ()
+	
+	send_ client msg (\serial ->
+		modifyMVar_ (clientCallbacks client) (\callbacks ->
+			return (Data.Map.insert serial callback callbacks)))
+	
+	takeMVar mvar
+
+call_ :: Client -> MethodCall -> IO MethodReturn
+call_ client msg = do
+	result <- call client msg
+	case result of
+		Left err -> connectionError ("Call failed: " ++ Data.Text.unpack (errorMessage err))
+		Right ret -> return ret
+
+data MatchRule = MatchRule
+	{ matchSender      :: Maybe BusName
+	, matchDestination :: Maybe BusName
+	, matchPath        :: Maybe ObjectPath
+	, matchInterface   :: Maybe InterfaceName
+	, matchMember      :: Maybe MemberName
+	}
+	deriving (Show)
+
+listen :: Client -> MatchRule -> (BusName -> Signal -> IO ()) -> IO ()
+listen client rule io = do
+	let handler (ReceivedSignal _ (Just sender) msg)
+	    	| checkMatchRule rule sender msg = io sender msg
+	    handler _ = return ()
+	
+	modifyMVar_ (clientSignalHandlers client) (\hs -> return (handler : hs))
+	void (call_ client (MethodCall
+		{ methodCallPath = DBus.Constants.dbusPath
+		, methodCallMember = "AddMatch"
+		, methodCallInterface = Just DBus.Constants.dbusInterface
+		, methodCallDestination = Just DBus.Constants.dbusName
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = [toVariant (formatMatchRule rule)]
+		}))
+
+formatMatchRule :: MatchRule -> Text
+formatMatchRule rule = Data.Text.intercalate "," predicates where
+	predicates = catMaybes
+		[ f "sender" matchSender busNameText
+		, f "destination" matchDestination busNameText
+		, f "path" matchPath objectPathText
+		, f "interface" matchInterface interfaceNameText
+		, f "member" matchMember memberNameText
+		]
+	
+	f :: Text -> (MatchRule -> Maybe a) -> (a -> Text) -> Maybe Text
+	f key get text = do
+		val <- fmap text (get rule)
+		return (Data.Text.concat [key, "='", val, "'"])
+
+checkMatchRule :: MatchRule -> BusName -> Signal -> Bool
+checkMatchRule rule sender msg = and
+	[ maybe True (== sender) (matchSender rule)
+	, maybe True (\x -> signalDestination msg == Just x) (matchDestination rule)
+	, maybe True (== signalPath msg) (matchPath rule)
+	, maybe True (== signalInterface msg) (matchInterface rule)
+	, maybe True (== signalMember msg) (matchMember rule)
+	]
+
+data MethodError = MethodError ErrorName [Variant]
+	deriving (Show, Eq, Typeable)
+
+instance Control.Exception.Exception MethodError
+
+
+-- | Normally, any exceptions raised while executing a method will be
+-- given the generic @\"org.freedesktop.DBus.Error.Failed\"@ name.
+-- 'throwError' allows the programmer to specify an error name, and provide
+-- additional information to the remote application. You may use this instead
+-- of 'Control.Exception.throwIO' to abort a method call.
+
+throwError :: ErrorName -> Text -> [Variant] -> IO a
+throwError name message extra = Control.Exception.throwIO (MethodError name (toVariant message : extra))
+
+method :: InterfaceName -> MemberName -> Signature -> Signature -> ([Variant] -> IO Reply) -> Method
+method iface name inSig outSig io = Method iface name inSig outSig
+	(\vs -> Control.Exception.catch
+		(Control.Exception.catch
+			(io vs)
+			(\(MethodError name' vs') -> return (ReplyError name' vs')))
+		(\exc -> return (ReplyError errorFailed
+			[toVariant (Data.Text.pack (show (exc :: SomeException)))])))
+
+export :: Client -> ObjectPath -> [Method] -> IO ()
+export client path methods = modifyMVar_ (clientObjects client) addObject where
+	addObject objs = return (Data.Map.insert path info objs)
+	
+	info = foldl' addMethod Data.Map.empty (defaultIntrospect : methods)
+	addMethod m (Method iface name inSig outSig cb) = Data.Map.insertWith'
+		Data.Map.union iface
+		(Data.Map.fromList [(name, MemberMethod inSig outSig (wrapCB cb))]) m
+	
+	wrapCB cb (ReceivedMethodCall serial sender msg) = do
+		reply <- cb (methodCallBody msg)
+		case reply of
+			ReplyReturn vs -> send_ client (MethodReturn serial sender vs) (\_ -> return ())
+			ReplyError name vs -> send_ client (Error name serial sender vs) (\_ -> return ())
+	wrapCB _ _ = return ()
+	
+	defaultIntrospect = methodIntrospect $ do
+		objects <- readMVar (clientObjects client)
+		let Just obj = Data.Map.lookup path objects
+		return (introspect path obj)
+
+findMethod :: Map ObjectPath ObjectInfo -> MethodCall -> Maybe Callback
+findMethod objects msg = do
+	ifaceName <- methodCallInterface msg
+	obj <- Data.Map.lookup (methodCallPath msg) objects
+	iface <- Data.Map.lookup ifaceName obj
+	member <- Data.Map.lookup (methodCallMember msg) iface
+	case member of
+		MemberMethod _ _ io -> return io
+		_ -> Nothing
+
+introspectRoot :: Client -> Method
+introspectRoot client = methodIntrospect $ do
+	objects <- readMVar (clientObjects client)
+	let paths = filter (/= "/") (Data.Map.keys objects)
+	let iface = "org.freedesktop.DBus.Introspectable"
+	let name = "Introspect"
+	return (DBus.Introspection.Object "/"
+		[DBus.Introspection.Interface iface
+			[DBus.Introspection.Method name
+				[]
+				[DBus.Introspection.Parameter "" "s"]]
+			[] []]
+		[DBus.Introspection.Object p [] [] | p <- paths])
+
+methodIntrospect :: IO DBus.Introspection.Object -> Method
+methodIntrospect get = method iface name "" "s" impl where
+	iface = "org.freedesktop.DBus.Introspectable"
+	name = "Introspect"
+	impl [] = do
+		obj <- get
+		let Just xml = DBus.Introspection.toXML obj
+		return (ReplyReturn [toVariant xml])
+	impl _ = return (ReplyError errorInvalidParameters [])
+
+introspect :: ObjectPath -> ObjectInfo -> DBus.Introspection.Object
+introspect path obj = DBus.Introspection.Object path interfaces [] where
+	interfaces = map introspectIface (Data.Map.toList obj)
+	
+	introspectIface (name, iface) = let
+		members = Data.Map.toList iface
+		methods = concatMap introspectMethod members
+		signals = concatMap introspectSignal members
+		in DBus.Introspection.Interface name methods signals []
+	
+	introspectMethod (name, (MemberMethod inSig outSig _)) =
+		[DBus.Introspection.Method name
+			(map introspectParam (signatureTypes inSig))
+			(map introspectParam (signatureTypes outSig))]
+	introspectMethod _ = []
+	
+	introspectSignal (name, (MemberSignal sig)) =
+		[DBus.Introspection.Signal name
+			(map introspectParam (signatureTypes sig))]
+	introspectSignal _ = []
+	
+	introspectParam t = DBus.Introspection.Parameter "" (Signature [t])
diff --git a/hs/DBus/Client/Simple.hs b/hs/DBus/Client/Simple.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Client/Simple.hs
@@ -0,0 +1,313 @@
+
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE OverlappingInstances #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Client.Simple
+	(
+	-- * Clients
+	  Client
+	, connectSystem
+	, connectSession
+	, connectStarter
+	, disconnect
+	
+	-- * Proxies
+	, Proxy
+	, proxy
+	, call
+	, DBus.Client.Simple.listen
+	
+	-- * Name reservation
+	, RequestNameFlag(..)
+	, RequestNameReply(..)
+	, ReleaseNameReply(..)
+	, requestName
+	, releaseName
+	
+	-- * Exporting objects
+	, Method
+	, AutoSignature
+	, AutoReply
+	, method
+	, export
+	, throwError
+	
+	-- * Re-exported modules
+	, module DBus.Types
+	) where
+
+import qualified Control.Exception
+import           Data.Bits ((.|.))
+import qualified Data.Text -- for haddock
+import qualified Data.Set
+import           Data.Word (Word32)
+
+import           DBus.Address
+import           DBus.Client hiding (call, method, export)
+import qualified DBus.Client
+import           DBus.Connection.Error
+import           DBus.Constants (errorInvalidParameters)
+import           DBus.Message hiding (errorName)
+import           DBus.Types
+import           DBus.Types.Internal (checkSignature)
+import           DBus.Util (maybeIndex)
+
+
+connectFirst :: [Address] -> IO Client
+connectFirst addrs = loop addrs where
+	loop [] = connectionError (concat
+		[ "connectFirst: no usable"
+		, " addresses in "
+		, show addrs])
+	loop (a:as) = Control.Exception.catch
+		(DBus.Client.connect a)
+		(\(ConnectionError _) -> loop as)
+
+
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_SESSION_BUS_ADDRESS@, which must be set.
+
+connectSession :: IO Client
+connectSession = do
+	env <- DBus.Address.getSession
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_SESSION_BUS_ADDRESS is"
+			, " missing or invalid."
+			])
+		Just addrs -> connectFirst addrs
+
+
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_SYSTEM_BUS_ADDRESS@, or to
+-- @unix:path=\/var\/run\/dbus\/system_bus_socket@ if @DBUS_SYSTEM_BUS_ADDRESS@
+-- is not set.
+
+connectSystem :: IO Client
+connectSystem = do
+	env <- DBus.Address.getSystem
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_SYSTEM_BUS_ADDRESS is"
+			, " invalid."
+			])
+		Just addrs -> connectFirst addrs
+
+
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_STARTER_ADDRESS@, which must be set.
+
+connectStarter :: IO Client
+connectStarter = do
+	env <- DBus.Address.getStarter
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_STARTER_BUS_ADDRESS is"
+			, " missing or invalid."
+			])
+		Just addrs -> connectFirst addrs
+
+data Proxy = Proxy Client BusName ObjectPath
+
+proxy :: Client -> BusName -> ObjectPath -> IO Proxy
+proxy client dest path = return (Proxy client dest path)
+
+call :: Proxy -> InterfaceName -> MemberName -> [Variant] -> IO [Variant]
+call (Proxy client dest path) iface member body = do
+	reply <- DBus.Client.call_ client $ MethodCall
+		{ methodCallDestination = Just dest
+		, methodCallMember = member
+		, methodCallInterface = Just iface
+		, methodCallPath = path
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = body
+		}
+	return (methodReturnBody reply)
+
+listen :: Proxy -> InterfaceName -> MemberName -> (BusName -> Signal -> IO ()) -> IO ()
+listen (Proxy client dest path) iface member = DBus.Client.listen client (MatchRule
+	{ matchSender = Just dest
+	, matchInterface = Just iface
+	, matchMember = Just member
+	, matchPath = Just path
+	, matchDestination = Nothing
+	})
+
+data RequestNameFlag
+	= AllowReplacement
+	| ReplaceExisting
+	| DoNotQueue
+	deriving (Show)
+
+data RequestNameReply
+	= PrimaryOwner
+	| InQueue
+	| Exists
+	| AlreadyOwner
+	deriving (Show)
+
+data ReleaseNameReply
+	= Released
+	| NonExistent
+	| NotOwner
+	deriving (Show)
+
+encodeFlags :: [RequestNameFlag] -> Word32
+encodeFlags = foldr (.|.) 0 . map flagValue where
+	flagValue AllowReplacement = 0x1
+	flagValue ReplaceExisting  = 0x2
+	flagValue DoNotQueue       = 0x4
+
+requestName :: Client -> BusName -> [RequestNameFlag] -> IO RequestNameReply
+requestName client name flags = do
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	reply <- call bus "org.freedesktop.DBus" "RequestName"
+		[ toVariant name
+		, toVariant (encodeFlags flags)
+		]
+	case (maybeIndex reply 0 >>= fromVariant :: Maybe Word32) of
+		Just 1 -> return PrimaryOwner
+		Just 2 -> return InQueue
+		Just 3 -> return Exists
+		Just 4 -> return AlreadyOwner
+		_ -> connectionError "Call failed: received invalid reply"
+
+releaseName :: Client -> BusName -> IO ReleaseNameReply
+releaseName client name = do
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	reply <- call bus "org.freedesktop.DBus" "ReleaseName"
+		[ toVariant name
+		]
+	case (maybeIndex reply 0 >>= fromVariant :: Maybe Word32) of
+		Just 1 -> return Released
+		Just 2 -> return NonExistent
+		Just 3 -> return NotOwner
+		_ -> connectionError "Call failed: received invalid reply"
+
+
+-- | Used to automatically generate method signatures for introspection
+-- documents. To support automatic signatures, a method#8217;s parameters and
+-- return value must all be instances of 'IsValue'.
+--
+-- This class maps Haskell idioms to D&#8208;Bus; it is therefore unable to
+-- generate some signatures. In particular, it does not support methods
+-- which accept/return a single structure, or single&#8208;element structures.
+-- It also cannot generate signatures for methods with parameters or return
+-- values which are only instances of 'IsVariant'. For these cases, please
+-- use 'DBus.Client.method'.
+--
+-- To match common Haskell use, if the return value is a tuple, it will be
+-- converted to a list of return values.
+
+class AutoSignature a where
+	funTypes :: a -> ([Type], [Type])
+
+instance AutoSignature (IO ()) where
+	funTypes _ = ([], [])
+
+instance IsValue a => AutoSignature (IO a) where
+	funTypes io = ([], case ioT io undefined of
+		(_, t) -> case t of
+			TypeStructure ts -> ts
+			_ -> [t])
+
+ioT :: IsValue a => IO a -> a -> (a, Type)
+ioT _ a = (a, typeOf a)
+
+instance (IsValue a, AutoSignature fun) => AutoSignature (a -> fun) where
+	funTypes fn = case valueT undefined of
+		(a, t) -> case funTypes (fn a) of
+			(ts, ts') -> (t : ts, ts')
+
+valueT :: IsValue a => a -> (a, Type)
+valueT a = (a, typeOf a)
+
+
+-- | Used to automatically generate a 'Reply' from a return value. See
+-- 'AutoSignature' for some caveats about supported signatures.
+--
+-- To match common Haskell use, if the return value is a tuple, it will be
+-- converted to a list of return values.
+
+class AutoReply fun where
+	apply :: fun -> [Variant] -> Maybe (IO [Variant])
+
+instance AutoReply (IO ()) where
+	apply io [] = Just (io >> return [])
+	apply _ _ = Nothing
+
+instance IsVariant a => AutoReply (IO a) where
+	apply io [] = Just (do
+		var <- fmap toVariant io
+		case fromVariant var of
+			Just struct -> return (structureItems struct)
+			Nothing -> return [var])
+	apply _ _ = Nothing
+
+instance (IsVariant a, AutoReply fun) => AutoReply (a -> fun) where
+	apply _ [] = Nothing
+	apply fn (v:vs) = case fromVariant v of
+		Just v' -> apply (fn v') vs
+		Nothing -> Nothing
+
+
+-- | Prepare a Haskell function for export. This automatically detects the
+-- function#8217;s type signature; see 'AutoSignature' and 'AutoReply'.
+--
+-- To manage the type signature and marshaling yourself, use
+-- 'DBus.Client.method' instead.
+
+method :: (AutoSignature fun, AutoReply fun) => InterfaceName -> MemberName -> fun -> Method
+method iface name fun = DBus.Client.method iface name inSig outSig io where
+	(typesIn, typesOut) = funTypes fun
+	inSig = case checkSignature typesIn of
+		Just sig -> sig
+		Nothing -> invalid "input"
+	outSig = case checkSignature typesOut of
+		Just sig -> sig
+		Nothing -> invalid "output"
+	io vs = case apply fun vs of
+		Nothing -> return (ReplyError errorInvalidParameters [])
+		Just io' -> fmap ReplyReturn io'
+	
+	invalid label = error (concat
+		[ "Method "
+		, Data.Text.unpack (interfaceNameText iface)
+		, "."
+		, Data.Text.unpack (memberNameText name)
+		, " has an invalid "
+		, label
+		, " signature."])
+
+
+-- | Export the given functions under the given 'ObjectPath' and
+-- 'InterfaceName'. The functions may accept/return any types that are
+-- instances of 'IsValue'; see 'AutoSignature'.
+--
+-- @
+--sayHello :: Text -> IO Text
+--sayHello name = return ('Data.Text.concat' [\"Hello \", name, \"!\"])
+--
+--export client \"/hello_world\"
+--    [ 'method' \"com.example.HelloWorld\" \"Hello\" sayHello
+--    ]
+-- @
+
+export :: Client -> ObjectPath -> [Method] -> IO ()
+export = DBus.Client.export
diff --git a/hs/DBus/Connection.hs b/hs/DBus/Connection.hs
--- a/hs/DBus/Connection.hs
+++ b/hs/DBus/Connection.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,242 +16,117 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
-{-# LANGUAGE OverloadedStrings #-}
-
-{-# LANGUAGE DeriveDataTypeable #-}
-module DBus.Connection (
-
-	  Connection
-	, connectionAddress
-	, connectionUUID
-
-	, ConnectionError (..)
-
+module DBus.Connection
+	( Connection
+	, ConnectionError
 	, connect
-	, connectFirst
-
-	, connectionClose
-
+	, disconnect
 	, send
-
 	, receive
-
+	
+	-- * Authentication
+	, Mechanism
+	, mechanism
+	, external
+	
+	-- * Transports
+	, Transport
+	, Socket
+	, transport
+	, socket
+	, socketPut
+	, socketGet
+	
+	, unix
+	, tcp
 	) where
+import           Control.Concurrent
+import           Control.Monad (when)
+import           Data.IORef
 
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
+import           DBus.Address
+import           DBus.Connection.Authentication
+import           DBus.Connection.Error
+import           DBus.Connection.Transport
+import           DBus.Message.Internal
+import           DBus.Wire
+import           DBus.Wire.Internal (unmarshalMessageM)
 
 
-import qualified Control.Concurrent as C
-import qualified DBus.Address as A
-import qualified DBus.Message as M
-import qualified DBus.UUID as UUID
 
-import qualified Data.ByteString.Lazy as L
-import Data.Word (Word32)
-
-import qualified Network as N
-import qualified Data.Map as Map
-
-import qualified Network.Socket as NS
-
-import qualified Text.ParserCombinators.Parsec as P
-import Control.Monad (unless)
-import Data.Binary.Get (runGet, getWord16host)
-import Data.Binary.Put (runPut, putWord16be)
-
-import qualified System.IO as I
-
-import qualified Control.Exception as E
-import Data.Typeable (Typeable)
-
-import qualified DBus.Authentication as Auth
-
-import qualified DBus.Wire as W
+-- | A 'Connection' is an opaque handle to an open D&#8208;Bus channel, with
+-- an internal state for maintaining the current message serial.
 
 data Connection = Connection
-	{ connectionAddress    :: A.Address
-	, connectionTransport  :: Transport
-	, connectionSerialMVar :: C.MVar M.Serial
-	, connectionReadMVar   :: C.MVar ()
-	, connectionUUID       :: UUID.UUID
+	{ connectionAddress :: Address
+	, connectionSocket :: Socket
+	, connectionSerial :: IORef Serial
+	, connectionReadLock :: MVar ()
+	, connectionWriteLock :: MVar ()
 	}
 
-instance Show Connection where
-	showsPrec d con = showParen (d > 10) strCon where
-		addr = A.strAddress $ connectionAddress con
-		strCon = s "<Connection " . shows addr . s ">"
-		s = showString
 
-
--- | A 'Transport' is anything which can send and receive bytestrings,
--- typically via a socket.
-
-data Transport = Transport
-	{ transportSend :: L.ByteString -> IO ()
-	, transportRecv :: Word32 -> IO L.ByteString
-	, transportClose :: IO ()
-	}
-
-connectTransport :: A.Address -> IO Transport
-connectTransport a = transport' (A.addressMethod a) a where
-	transport' "unix" = unix
-	transport' "tcp"  = tcp
-	transport' _      = E.throwIO . UnknownMethod
-
-unix :: A.Address -> IO Transport
-unix a = port >>= N.connectTo "localhost" >>= handleTransport where
-	params = A.addressParameters a
-	path = Map.lookup "path" params
-	abstract = Map.lookup "abstract" params
-	
-	tooMany = "Only one of `path' or `abstract' may be specified for the\
-	          \ `unix' transport."
-	tooFew = "One of `path' or `abstract' must be specified for the\
-	         \ `unix' transport."
-	
-	port = fmap N.UnixSocket path'
-	path' = case (path, abstract) of
-		(Just _, Just _) -> E.throwIO $ BadParameters a tooMany
-		(Nothing, Nothing) -> E.throwIO $ BadParameters a tooFew
-		(Just x, Nothing) -> return $ TL.unpack x
-		(Nothing, Just x) -> return $ '\x00' : TL.unpack x
-
-tcp :: A.Address -> IO Transport
-tcp a = openHandle >>= handleTransport where
-	params = A.addressParameters a
-	openHandle = do
-		port <- getPort
-		family <- getFamily
-		addresses <- getAddresses family
-		socket <- openSocket port addresses
-		NS.socketToHandle socket I.ReadWriteMode
-
-	hostname = maybe "localhost" TL.unpack $ Map.lookup "host" params
-
-	unknownFamily x = TL.concat ["Unknown socket family for TCP transport: ", x]
-	getFamily = case Map.lookup "family" params of
-		Just "ipv4" -> return NS.AF_INET
-		Just "ipv6" -> return NS.AF_INET6
-		Nothing     -> return NS.AF_UNSPEC
-		Just x      -> E.throwIO $ BadParameters a $ unknownFamily x
-
-	missingPort = "TCP transport requires the ``port'' parameter."
-	badPort x = TL.concat ["Invalid socket port for TCP transport: ", x]
-	getPort = case Map.lookup "port" params of
-		Nothing -> E.throwIO $ BadParameters a missingPort
-		Just x -> case P.parse parseWord16 "" (TL.unpack x) of
-			Right x' -> return $ NS.PortNum x'
-			Left  _  -> E.throwIO $ BadParameters a $ badPort x
-
-	parseWord16 = do
-		chars <- P.many1 P.digit
-		P.eof
-		let value = read chars :: Integer
-		unless (value > 0 && value <= 65535) $
-			-- Calling 'fail' is acceptable here, because Parsec 2
-			-- offers no other error reporting mechanism, and
-			-- implements 'fail'.
-			fail "bad port"
-		let word = fromIntegral value
-		return $ runGet getWord16host (runPut (putWord16be word))
-
-	getAddresses family = do
-		let hints = NS.defaultHints
-			{ NS.addrFlags = [NS.AI_ADDRCONFIG]
-			, NS.addrFamily = family
-			, NS.addrSocketType = NS.Stream
-			}
-		NS.getAddrInfo (Just hints) (Just hostname) Nothing
-
-	setPort port (NS.SockAddrInet  _ x)     = NS.SockAddrInet port x
-	setPort port (NS.SockAddrInet6 _ x y z) = NS.SockAddrInet6 port x y z
-	setPort _    addr                       = addr
-
-	openSocket _ [] = E.throwIO $ NoWorkingAddress [a]
-	openSocket port (addr:addrs) = E.catch (openSocket' port addr) $
-		\(E.SomeException _) -> openSocket port addrs
-	openSocket' port addr = do
-		sock <- NS.socket (NS.addrFamily addr)
-		                  (NS.addrSocketType addr)
-		                  (NS.addrProtocol addr)
-		NS.connect sock . setPort port . NS.addrAddress $ addr
-		return sock
-
-handleTransport :: I.Handle -> IO Transport
-handleTransport h = do
-	I.hSetBuffering h I.NoBuffering
-	I.hSetBinaryMode h True
-	return $ Transport (L.hPut h) (L.hGet h . fromIntegral) (I.hClose h)
-
-data ConnectionError
-	= InvalidAddress Text
-	| BadParameters A.Address Text
-	| UnknownMethod A.Address
-	| NoWorkingAddress [A.Address]
-	deriving (Show, Typeable)
-
-instance E.Exception ConnectionError
-
-
 -- | Open a connection to some address, using a given authentication
 -- mechanism. If the connection fails, a 'ConnectionError' will be thrown.
 
-connect :: Auth.Mechanism -> A.Address -> IO Connection
-connect mechanism a = do
-	t <- connectTransport a
-	let getByte = L.head `fmap` transportRecv t 1
-	uuid <- Auth.authenticate mechanism (transportSend t) getByte
-	readLock <- C.newMVar ()
-	serialMVar <- C.newMVar M.firstSerial
-	return $ Connection a t serialMVar readLock uuid
-
-
--- | Try to open a connection to various addresses, returning the first
--- connection which could be successfully opened.
-
-connectFirst :: [(Auth.Mechanism, A.Address)] -> IO Connection
-connectFirst orig = connectFirst' orig where
-	allAddrs = [a | (_, a) <- orig]
-	connectFirst'     [] = E.throwIO $ NoWorkingAddress allAddrs
-	connectFirst' ((mech, a):as) = E.catch (connect mech a) $
-		\(E.SomeException _) -> connectFirst' as
+connect :: [Transport] -> [Mechanism] -> Address -> IO Connection
+connect transports mechanisms addr = do
+	msock <- connectTransport transports addr
+	sock <- case msock of
+		Just s -> return s
+		Nothing -> connectionError (concat
+			[ "Unknown address method: "
+			, show (addressMethod addr)
+			])
+	authed <- authenticate sock mechanisms
+	when (not authed)
+		(connectionError "Authentication failed")
+	
+	serial <- newIORef (Serial 1)
+	readLock <- newMVar ()
+	writeLock <- newMVar ()
+	return (Connection addr sock serial
+	                   readLock writeLock)
 
 
 -- | Close an open connection. Once closed, the 'Connection' is no longer
 -- valid and must not be used.
 
-connectionClose :: Connection -> IO ()
-connectionClose = transportClose . connectionTransport
+disconnect :: Connection -> IO ()
+disconnect = socketClose . connectionSocket
 
+instance Show Connection where
+	showsPrec _ x =
+		showString "<Connection " .
+		shows (connectionAddress x) .
+		showString ">"
 
--- | Send a single message, with a generated 'M.Serial'. The second parameter
+
+-- | Send a single message, with a generated 'Serial'. The second parameter
 -- exists to prevent race conditions when registering a reply handler; it
--- receives the serial the message /will/ be sent with, before it's actually
--- sent.
+-- receives the serial the message /will/ be sent with, before it&#8217;s
+-- actually sent.
 --
 -- Only one message may be sent at a time; if multiple threads attempt to
 -- send messages in parallel, one will block until after the other has
 -- finished.
 
-send :: M.Message a => Connection -> (M.Serial -> IO b) -> a
-     -> IO (Either W.MarshalError b)
-send (Connection _ t mvar _ _) io msg = withSerial mvar $ \serial ->
-	case W.marshalMessage W.LittleEndian serial msg of
+send :: Message msg => Connection -> msg -> (Serial -> IO a) -> IO (Either MarshalError a)
+send connection msg io = do
+	serial <- nextSerial connection
+	case marshalMessage LittleEndian serial msg of
 		Right bytes -> do
-			x <- io serial
-			transportSend t bytes
-			return $ Right x
-		Left  err   -> return $ Left err
+			let sock = connectionSocket connection
+			let lock = connectionWriteLock connection
+			result <- io serial
+			withMVar lock (\_ -> socketPut sock bytes)
+			return (Right result)
+		Left err -> return (Left err)
 
-withSerial :: C.MVar M.Serial -> (M.Serial -> IO a) -> IO a
-withSerial m io = E.block $ do
-	s <- C.takeMVar m
-	let s' = M.nextSerial s
-	x <- E.unblock (io s) `E.onException` C.putMVar m s'
-	C.putMVar m s'
-	return x
+nextSerial :: Connection -> IO Serial
+nextSerial connection = atomicModifyIORef
+	(connectionSerial connection)
+	(\serial@(Serial x) -> (Serial (x + 1), serial))
 
 
 -- | Receive the next message from the connection, blocking until one is
@@ -260,6 +136,8 @@
 -- to receive messages in parallel, one will block until after the other has
 -- finished.
 
-receive :: Connection -> IO (Either W.UnmarshalError M.ReceivedMessage)
-receive (Connection _ t _ lock _) = C.withMVar lock $ \_ ->
-	W.unmarshalMessage $ transportRecv t
+receive :: Connection -> IO (Either UnmarshalError ReceivedMessage)
+receive connection = do
+	let sock = connectionSocket connection
+	let lock = connectionReadLock connection
+	withMVar lock (\_ -> unmarshalMessageM (socketGet sock))
diff --git a/hs/DBus/Connection/Authentication.hs b/hs/DBus/Connection/Authentication.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Connection/Authentication.hs
@@ -0,0 +1,90 @@
+
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Connection.Authentication
+	( Mechanism
+	, mechanism
+	, authenticate
+	, external
+	) where
+
+import           Prelude hiding (getLine, head)
+import           Control.Monad (liftM)
+import qualified Data.ByteString
+import qualified Data.ByteString.Char8
+import           Data.Char (ord)
+import qualified System.Posix.User
+import           Text.Printf (printf)
+
+import           DBus.Connection.Transport
+import           DBus.Util (readUntil, dropEnd)
+
+
+authenticate :: Socket
+             -> [Mechanism]
+             -> IO Bool
+authenticate s mechanisms = do
+	socketPut s (Data.ByteString.pack [0])
+	let loop [] = return False
+	    loop ((Mechanism m):next) = do
+	    	success <- m s
+	    	if success
+	    		then return True
+	    		else loop next
+	loop mechanisms
+
+newtype Mechanism = Mechanism (Socket -> IO Bool)
+
+mechanism :: (Socket -> IO Bool) -> Mechanism
+mechanism = Mechanism
+
+data Auth a = Auth
+	{ unAuth :: Socket -> IO a
+	}
+
+instance Monad Auth where
+	return a = Auth (\_ -> return a)
+	m >>= k = Auth $ \s -> do
+		x <- unAuth m s
+		unAuth (k x) s
+
+liftIO :: IO a -> Auth a
+liftIO io = Auth (\_ -> io)
+
+putLine :: String -> Auth ()
+putLine line = Auth $ \s -> do
+	let pack = Data.ByteString.Char8.pack
+	socketPut s (pack (line ++ "\r\n"))
+
+getLine :: Auth String
+getLine = Auth $ \s -> do
+	let head = Data.ByteString.Char8.head
+	let getchr = liftM head (socketGet s 1)
+	raw <- readUntil "\r\n" getchr
+	return (dropEnd 2 raw)
+
+external :: Mechanism
+external = Mechanism $ unAuth $ do
+	uid <- liftIO System.Posix.User.getRealUserID
+	let token = concatMap (printf "%02X" . ord) (show uid)
+	putLine ("AUTH EXTERNAL " ++ token)
+	resp <- getLine
+	case takeWhile (/= ' ') resp of
+		"OK" -> do
+			putLine "BEGIN"
+			return True
+		_ -> return False
diff --git a/hs/DBus/Connection/Error.hs b/hs/DBus/Connection/Error.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Connection/Error.hs
@@ -0,0 +1,29 @@
+
+{-# LANGUAGE DeriveDataTypeable #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Connection.Error where
+import           Control.Exception (Exception, throwIO)
+import           Data.Typeable (Typeable)
+
+newtype ConnectionError = ConnectionError String
+	deriving (Show, Eq, Typeable)
+
+instance Exception ConnectionError
+
+connectionError :: String -> IO a
+connectionError = throwIO . ConnectionError
diff --git a/hs/DBus/Connection/Transport.hs b/hs/DBus/Connection/Transport.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Connection/Transport.hs
@@ -0,0 +1,178 @@
+
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Connection.Transport
+	( Transport
+	, transport
+	, Socket
+	, socket
+	, socketPut
+	, socketGet
+	, socketClose
+	, tcp
+	, unix
+	, connectTransport
+	) where
+
+import qualified Control.Exception
+import           Control.Monad (unless)
+import qualified Data.Binary.Get
+import qualified Data.Binary.Put
+import qualified Data.ByteString
+import           Data.ByteString (ByteString)
+import qualified Data.Map
+import qualified Data.Text
+import           Data.Text (Text)
+import           Data.Word (Word32)
+import qualified Network
+import qualified Network.Socket
+import qualified System.IO
+import           Text.ParserCombinators.Parsec
+
+import           DBus.Address
+import           DBus.Connection.Error
+
+
+
+-- | A 'Transport' is anything which can send and receive bytestrings,
+-- typically via a socket.
+
+data Transport = Transport Text (Address -> IO Socket)
+
+data Socket = Socket
+	(ByteString -> IO ())
+	(Word32 -> IO ByteString)
+	(IO ())
+
+transport :: Text -> (Address -> IO Socket) -> Transport
+transport = Transport
+
+socket :: (ByteString -> IO ()) -> (Word32 -> IO ByteString) -> IO () -> Socket
+socket = Socket
+
+socketPut :: Socket -> ByteString -> IO ()
+socketPut (Socket x _ _) = x
+
+socketGet :: Socket -> Word32 -> IO ByteString
+socketGet (Socket _ x _) = x
+
+socketClose :: Socket -> IO ()
+socketClose (Socket _ _ x) = x
+
+connectTransport :: [Transport] -> Address -> IO (Maybe Socket)
+connectTransport transports addr = loop transports where
+	m = addressMethod addr
+	loop [] = return Nothing
+	loop ((Transport n io):ts) = if n == m
+		then fmap Just (io addr)
+		else loop ts
+
+connectHandle :: System.IO.Handle -> IO Socket
+connectHandle h = do
+	System.IO.hSetBuffering h System.IO.NoBuffering
+	System.IO.hSetBinaryMode h True
+	return (Socket
+		(Data.ByteString.hPut h)
+		(Data.ByteString.hGet h . fromIntegral)
+		(System.IO.hClose h))
+
+unix :: Transport
+unix = transport "unix" connectUNIX
+
+connectUNIX :: Address -> IO Socket
+connectUNIX a = getHandle >>= connectHandle where
+	params = addressParameters a
+	param key = Data.Map.lookup key params
+	
+	tooMany = "Only one of `path' or `abstract' may be specified for the\
+	          \ `unix' transport."
+	tooFew = "One of `path' or `abstract' must be specified for the\
+	         \ `unix' transport."
+	
+	path = case (param "path", param "abstract") of
+		(Just _, Just _) -> connectionError tooMany
+		(Nothing, Nothing) -> connectionError tooFew
+		(Just x, Nothing) -> return (Data.Text.unpack x)
+		(Nothing, Just x) -> return ('\x00' : Data.Text.unpack x)
+	
+	getHandle = do
+		port <- fmap Network.UnixSocket path
+		Network.connectTo "localhost" port
+
+tcp :: Transport
+tcp = Transport "tcp" connectTCP
+
+connectTCP :: Address -> IO Socket
+connectTCP a = getHandle >>= connectHandle where
+	params = addressParameters a
+	param key = Data.Map.lookup key params
+	
+	getHandle = do
+		port <- getPort
+		family <- getFamily
+		addrs <- getAddresses family
+		sock<- openSocket port addrs
+		Network.Socket.socketToHandle sock System.IO.ReadWriteMode
+	hostname = maybe "localhost" Data.Text.unpack (param "host")
+	unknownFamily x = concat ["Unknown socket family for TCP transport: ", show x]
+	getFamily = case param "family" of
+		Just "ipv4" -> return Network.Socket.AF_INET
+		Just "ipv6" -> return Network.Socket.AF_INET6
+		Nothing     -> return Network.Socket.AF_UNSPEC
+		Just x      -> connectionError (unknownFamily x)
+	missingPort = "TCP transport requires the `port' parameter."
+	badPort x = concat ["Invalid socket port for TCP transport: ", show x]
+	getPort = case param "port" of
+		Nothing -> connectionError missingPort
+		Just x -> case parse parseWord16 "" (Data.Text.unpack x) of
+			Right x' -> return (Network.Socket.PortNum x')
+			Left  _  -> connectionError (badPort x)
+
+	parseWord16 = do
+		chars <- many1 digit
+		eof
+		let value = read chars :: Integer
+		unless (value > 0 && value <= 65535) $
+			-- Calling 'fail' is acceptable here, because Parsec 2
+			-- offers no other error reporting mechanism, and
+			-- implements 'fail'.
+			fail "bad port"
+		let word = fromIntegral value
+		return (Data.Binary.Get.runGet Data.Binary.Get.getWord16host (Data.Binary.Put.runPut (Data.Binary.Put.putWord16be word)))
+
+	getAddresses family = do
+		let hints = Network.Socket.defaultHints
+			{ Network.Socket.addrFlags = [Network.Socket.AI_ADDRCONFIG]
+			, Network.Socket.addrFamily = family
+			, Network.Socket.addrSocketType = Network.Socket.Stream
+			}
+		Network.Socket.getAddrInfo (Just hints) (Just hostname) Nothing
+
+	setPort port (Network.Socket.SockAddrInet  _ x)     = Network.Socket.SockAddrInet port x
+	setPort port (Network.Socket.SockAddrInet6 _ x y z) = Network.Socket.SockAddrInet6 port x y z
+	setPort _    addr                       = addr
+
+	openSocket _ [] = connectionError ("Failed to open socket to address " ++ show a)
+	openSocket port (addr:addrs) = Control.Exception.catch (openSocket' port addr) $
+		\(Control.Exception.SomeException _) -> openSocket port addrs
+	openSocket' port addr = do
+		sock <- Network.Socket.socket (Network.Socket.addrFamily addr)
+		                  (Network.Socket.addrSocketType addr)
+		                  (Network.Socket.addrProtocol addr)
+		Network.Socket.connect sock . setPort port . Network.Socket.addrAddress $ addr
+		return sock
diff --git a/hs/DBus/Constants.hs b/hs/DBus/Constants.hs
--- a/hs/DBus/Constants.hs
+++ b/hs/DBus/Constants.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,157 +16,153 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-{-# LANGUAGE OverloadedStrings #-}
 module DBus.Constants where
-import qualified DBus.Types as T
-import Data.Word (Word8, Word32)
+import           DBus.Types
 
-protocolVersion :: Word8
-protocolVersion = 1
 
-messageMaximumLength :: Word32
-messageMaximumLength = 134217728
-
-arrayMaximumLength :: Word32
-arrayMaximumLength = 67108864
-
-dbusName :: T.BusName
+dbusName :: BusName
 dbusName = "org.freedesktop.DBus"
 
-dbusPath :: T.ObjectPath
+dbusPath :: ObjectPath
 dbusPath = "/org/freedesktop/DBus"
 
-dbusInterface :: T.InterfaceName
+dbusInterface :: InterfaceName
 dbusInterface = "org.freedesktop.DBus"
 
-interfaceIntrospectable :: T.InterfaceName
+interfaceIntrospectable :: InterfaceName
 interfaceIntrospectable = "org.freedesktop.DBus.Introspectable"
 
-interfaceProperties :: T.InterfaceName
-interfaceProperties = "org.freedesktop.DBus.Properties"
-
-interfacePeer :: T.InterfaceName
+interfacePeer :: InterfaceName
 interfacePeer = "org.freedesktop.DBus.Peer"
 
-errorFailed :: T.ErrorName
-errorFailed = "org.freedesktop.DBus.Error.Failed"
+interfaceProperties :: InterfaceName
+interfaceProperties = "org.freedesktop.DBus.Properties"
 
-errorNoMemory :: T.ErrorName
-errorNoMemory = "org.freedesktop.DBus.Error.NoMemory"
+errorAccessDenied :: ErrorName
+errorAccessDenied = "org.freedesktop.DBus.Error.AccessDenied"
 
-errorServiceUnknown :: T.ErrorName
-errorServiceUnknown = "org.freedesktop.DBus.Error.ServiceUnknown"
+errorAuthFailed :: ErrorName
+errorAuthFailed = "org.freedesktop.DBus.Error.AuthFailed"
 
-errorNameHasNoOwner :: T.ErrorName
-errorNameHasNoOwner = "org.freedesktop.DBus.Error.NameHasNoOwner"
+errorDisconnected :: ErrorName
+errorDisconnected = "org.freedesktop.DBus.Error.Disconnected"
 
-errorNoReply :: T.ErrorName
+errorFailed :: ErrorName
+errorFailed = "org.freedesktop.DBus.Error.Failed"
+
+errorNoReply :: ErrorName
 errorNoReply = "org.freedesktop.DBus.Error.NoReply"
 
-errorIOError :: T.ErrorName
-errorIOError = "org.freedesktop.DBus.Error.IOError"
+errorNoServer :: ErrorName
+errorNoServer = "org.freedesktop.DBus.Error.NoServer"
 
-errorBadAddress :: T.ErrorName
-errorBadAddress = "org.freedesktop.DBus.Error.BadAddress"
+errorTimedOut :: ErrorName
+errorTimedOut = "org.freedesktop.DBus.Error.TimedOut"
 
-errorNotSupported :: T.ErrorName
-errorNotSupported = "org.freedesktop.DBus.Error.NotSupported"
+errorTimeout :: ErrorName
+errorTimeout = "org.freedesktop.DBus.Error.Timeout"
 
-errorLimitsExceeded :: T.ErrorName
-errorLimitsExceeded = "org.freedesktop.DBus.Error.LimitsExceeded"
+errorServiceUnknown :: ErrorName
+errorServiceUnknown = "org.freedesktop.DBus.Error.ServiceUnknown"
 
-errorAccessDenied :: T.ErrorName
-errorAccessDenied = "org.freedesktop.DBus.Error.AccessDenied"
+errorUnknownObject :: ErrorName
+errorUnknownObject = "org.freedesktop.DBus.Error.UnknownObject"
 
-errorAuthFailed :: T.ErrorName
-errorAuthFailed = "org.freedesktop.DBus.Error.AuthFailed"
+errorUnknownInterface :: ErrorName
+errorUnknownInterface = "org.freedesktop.DBus.Error.UnknownInterface"
 
-errorNoServer :: T.ErrorName
-errorNoServer = "org.freedesktop.DBus.Error.NoServer"
+errorUnknownMethod :: ErrorName
+errorUnknownMethod = "org.freedesktop.DBus.Error.UnknownMethod"
 
-errorTimeout :: T.ErrorName
-errorTimeout = "org.freedesktop.DBus.Error.Timeout"
+errorInvalidParameters :: ErrorName
+errorInvalidParameters = "org.freedesktop.DBus.Error.InvalidParameters"
 
-errorNoNetwork :: T.ErrorName
-errorNoNetwork = "org.freedesktop.DBus.Error.NoNetwork"
+errorSpawnChildExited :: ErrorName
+errorSpawnChildExited = "org.freedesktop.DBus.Error.Spawn.ChildExited"
 
-errorAddressInUse :: T.ErrorName
-errorAddressInUse = "org.freedesktop.DBus.Error.AddressInUse"
+errorSpawnChildSignaled :: ErrorName
+errorSpawnChildSignaled = "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
 
-errorDisconnected :: T.ErrorName
-errorDisconnected = "org.freedesktop.DBus.Error.Disconnected"
+errorSpawnConfigInvalid :: ErrorName
+errorSpawnConfigInvalid = "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
 
-errorInvalidArgs :: T.ErrorName
-errorInvalidArgs = "org.freedesktop.DBus.Error.InvalidArgs"
+errorSpawnExecFailed :: ErrorName
+errorSpawnExecFailed = "org.freedesktop.DBus.Error.Spawn.ExecFailed"
 
-errorFileNotFound :: T.ErrorName
-errorFileNotFound = "org.freedesktop.DBus.Error.FileNotFound"
+errorSpawnForkFailed :: ErrorName
+errorSpawnForkFailed = "org.freedesktop.DBus.Error.Spawn.ForkFailed"
 
-errorFileExists :: T.ErrorName
-errorFileExists = "org.freedesktop.DBus.Error.FileExists"
+errorSpawnFailed :: ErrorName
+errorSpawnFailed = "org.freedesktop.DBus.Error.Spawn.Failed"
 
-errorUnknownMethod :: T.ErrorName
-errorUnknownMethod = "org.freedesktop.DBus.Error.UnknownMethod"
+errorSpawnFailedToSetup :: ErrorName
+errorSpawnFailedToSetup = "org.freedesktop.DBus.Error.Spawn.FailedToSetup"
 
-errorTimedOut :: T.ErrorName
-errorTimedOut = "org.freedesktop.DBus.Error.TimedOut"
+errorSpawnFileInvalid :: ErrorName
+errorSpawnFileInvalid = "org.freedesktop.DBus.Error.Spawn.FileInvalid"
 
-errorMatchRuleNotFound :: T.ErrorName
-errorMatchRuleNotFound = "org.freedesktop.DBus.Error.MatchRuleNotFound"
+errorSpawnNoMemory :: ErrorName
+errorSpawnNoMemory = "org.freedesktop.DBus.Error.Spawn.NoMemory"
 
-errorMatchRuleInvalid :: T.ErrorName
-errorMatchRuleInvalid = "org.freedesktop.DBus.Error.MatchRuleInvalid"
+errorSpawnPermissionsInvalid :: ErrorName
+errorSpawnPermissionsInvalid = "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
 
-errorSpawnExecFailed :: T.ErrorName
-errorSpawnExecFailed = "org.freedesktop.DBus.Error.Spawn.ExecFailed"
+errorSpawnServiceNotFound :: ErrorName
+errorSpawnServiceNotFound = "org.freedesktop.DBus.Error.Spawn.ServiceNotFound"
 
-errorSpawnForkFailed :: T.ErrorName
-errorSpawnForkFailed = "org.freedesktop.DBus.Error.Spawn.ForkFailed"
+errorSpawnServiceNotValid :: ErrorName
+errorSpawnServiceNotValid = "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
 
-errorSpawnChildExited :: T.ErrorName
-errorSpawnChildExited = "org.freedesktop.DBus.Error.Spawn.ChildExited"
+errorAddressInUse :: ErrorName
+errorAddressInUse = "org.freedesktop.DBus.Error.AddressInUse"
 
-errorSpawnChildSignaled :: T.ErrorName
-errorSpawnChildSignaled = "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
+errorAdtAuditDataUnknown :: ErrorName
+errorAdtAuditDataUnknown = "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
 
-errorSpawnFailed :: T.ErrorName
-errorSpawnFailed = "org.freedesktop.DBus.Error.Spawn.Failed"
+errorBadAddress :: ErrorName
+errorBadAddress = "org.freedesktop.DBus.Error.BadAddress"
 
-errorSpawnFailedToSetup :: T.ErrorName
-errorSpawnFailedToSetup = "org.freedesktop.DBus.Error.Spawn.FailedToSetup"
+errorFileExists :: ErrorName
+errorFileExists = "org.freedesktop.DBus.Error.FileExists"
 
-errorSpawnConfigInvalid :: T.ErrorName
-errorSpawnConfigInvalid = "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
+errorFileNotFound :: ErrorName
+errorFileNotFound = "org.freedesktop.DBus.Error.FileNotFound"
 
-errorSpawnServiceNotValid :: T.ErrorName
-errorSpawnServiceNotValid = "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
+errorInconsistentMessage :: ErrorName
+errorInconsistentMessage = "org.freedesktop.DBus.Error.InconsistentMessage"
 
-errorSpawnServiceNotFound :: T.ErrorName
-errorSpawnServiceNotFound = "org.freedesktop.DBus.Error.Spawn.ServiceNotFound"
+errorInvalidFileContent :: ErrorName
+errorInvalidFileContent = "org.freedesktop.DBus.Error.InvalidFileContent"
 
-errorSpawnPermissionsInvalid :: T.ErrorName
-errorSpawnPermissionsInvalid = "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
+errorIOError :: ErrorName
+errorIOError = "org.freedesktop.DBus.Error.IOError"
 
-errorSpawnFileInvalid :: T.ErrorName
-errorSpawnFileInvalid = "org.freedesktop.DBus.Error.Spawn.FileInvalid"
+errorLimitsExceeded :: ErrorName
+errorLimitsExceeded = "org.freedesktop.DBus.Error.LimitsExceeded"
 
-errorSpawnNoMemory :: T.ErrorName
-errorSpawnNoMemory = "org.freedesktop.DBus.Error.Spawn.NoMemory"
+errorMatchRuleInvalid :: ErrorName
+errorMatchRuleInvalid = "org.freedesktop.DBus.Error.MatchRuleInvalid"
 
-errorUnixProcessIdUnknown :: T.ErrorName
-errorUnixProcessIdUnknown = "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
+errorMatchRuleNotFound :: ErrorName
+errorMatchRuleNotFound = "org.freedesktop.DBus.Error.MatchRuleNotFound"
 
-errorInvalidFileContent :: T.ErrorName
-errorInvalidFileContent = "org.freedesktop.DBus.Error.InvalidFileContent"
+errorNameHasNoOwner :: ErrorName
+errorNameHasNoOwner = "org.freedesktop.DBus.Error.NameHasNoOwner"
 
-errorSELinuxSecurityContextUnknown :: T.ErrorName
-errorSELinuxSecurityContextUnknown = "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
+errorNoMemory :: ErrorName
+errorNoMemory = "org.freedesktop.DBus.Error.NoMemory"
 
-errorAdtAuditDataUnknown :: T.ErrorName
-errorAdtAuditDataUnknown = "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
+errorNoNetwork :: ErrorName
+errorNoNetwork = "org.freedesktop.DBus.Error.NoNetwork"
 
-errorObjectPathInUse :: T.ErrorName
+errorNotSupported :: ErrorName
+errorNotSupported = "org.freedesktop.DBus.Error.NotSupported"
+
+errorObjectPathInUse :: ErrorName
 errorObjectPathInUse = "org.freedesktop.DBus.Error.ObjectPathInUse"
 
-errorInconsistentMessage :: T.ErrorName
-errorInconsistentMessage = "org.freedesktop.DBus.Error.InconsistentMessage"
+errorSELinuxSecurityContextUnknown :: ErrorName
+errorSELinuxSecurityContextUnknown = "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
+
+errorUnixProcessIdUnknown :: ErrorName
+errorUnixProcessIdUnknown = "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
diff --git a/hs/DBus/Introspection.hs b/hs/DBus/Introspection.hs
--- a/hs/DBus/Introspection.hs
+++ b/hs/DBus/Introspection.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,9 +16,6 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
-{-# LANGUAGE OverloadedStrings #-}
-
 module DBus.Introspection
 	( Object (..)
 	, Interface (..)
@@ -29,21 +27,19 @@
 	, toXML
 	, fromXML
 	) where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
+import           Control.Monad ((>=>))
+import           Control.Monad.ST (runST)
+import           Data.Maybe (fromMaybe)
+import qualified Data.STRef as ST
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
 import qualified Data.XML.Types as X
 import qualified Text.XML.LibXML.SAX as SAX
-import Control.Monad.ST (runST)
-import qualified Data.STRef as ST
 
-import Control.Monad ((>=>))
-import Data.Maybe (fromMaybe, listToMaybe)
-
 import qualified DBus.Types as T
 
+
 data Object = Object T.ObjectPath [Interface] [Object]
 	deriving (Show, Eq)
 
@@ -73,7 +69,9 @@
 parseElement :: Text -> Maybe X.Element
 parseElement text = runST $ do
 	stackRef <- ST.newSTRef [([], [])]
-	let onError _ = ST.writeSTRef stackRef []
+	let onError _ = do
+		ST.writeSTRef stackRef []
+		return False
 	let onBegin _ attrs = do
 		ST.modifySTRef stackRef ((attrs, []):)
 		return True
@@ -86,10 +84,11 @@
 		ST.writeSTRef stackRef (parent:stack'')
 		return True
 	
-	p <- SAX.newParserST onError Nothing
+	p <- SAX.newParserST Nothing
 	SAX.setCallback p SAX.parsedBeginElement onBegin
 	SAX.setCallback p SAX.parsedEndElement onEnd
-	SAX.parseLazyText p text
+	SAX.setCallback p SAX.reportError onError
+	SAX.parseBytes p (Data.Text.Encoding.encodeUtf8 text)
 	SAX.parseComplete p
 	stack <- ST.readSTRef stackRef
 	return $ case stack of
@@ -98,60 +97,58 @@
 
 parseRoot :: T.ObjectPath -> X.Element -> Maybe Object
 parseRoot defaultPath e = do
-	path <- case getattrM "name" e of
+	path <- case X.attributeText "name" e of
 		Nothing -> Just defaultPath
-		Just x  -> T.mkObjectPath x
+		Just x  -> T.objectPath x
 	parseObject path e
 
 parseChild :: T.ObjectPath -> X.Element -> Maybe Object
 parseChild parentPath e = do
-	let parentPath' = case T.strObjectPath parentPath of
+	let parentPath' = case T.objectPathText parentPath of
 		"/" -> "/"
-		x   -> TL.append x "/"
-	pathSegment <- getattrM "name" e
-	path <- T.mkObjectPath $ TL.append parentPath' pathSegment
+		x   -> Data.Text.append x "/"
+	pathSegment <- X.attributeText "name" e
+	path <- T.objectPath $ Data.Text.append parentPath' pathSegment
 	parseObject path e
 
 parseObject :: T.ObjectPath -> X.Element -> Maybe Object
-parseObject path e | X.elementName e == toName "node" = do
-	interfaces <- children parseInterface (named "interface") e
-	children' <- children (parseChild path) (named "node") e
+parseObject path e | X.elementName e == "node" = do
+	interfaces <- children parseInterface (X.isNamed "interface") e
+	children' <- children (parseChild path) (X.isNamed "node") e
 	return $ Object path interfaces children'
 parseObject _ _ = Nothing
 
 parseInterface :: X.Element -> Maybe Interface
 parseInterface e = do
-	name <- T.mkInterfaceName =<< getattrM "name" e
-	methods <- children parseMethod (named "method") e
-	signals <- children parseSignal (named "signal") e
-	properties <- children parseProperty (named "property") e
+	name <- T.interfaceName =<< X.attributeText "name" e
+	methods <- children parseMethod (X.isNamed "method") e
+	signals <- children parseSignal (X.isNamed "signal") e
+	properties <- children parseProperty (X.isNamed "property") e
 	return $ Interface name methods signals properties
 
 parseMethod :: X.Element -> Maybe Method
 parseMethod e = do
-	name <- T.mkMemberName =<< getattrM "name" e
+	name <- T.memberName =<< X.attributeText "name" e
 	paramsIn <- children parseParameter (isParam ["in", ""]) e
 	paramsOut <- children parseParameter (isParam ["out"]) e
 	return $ Method name paramsIn paramsOut
 
 parseSignal :: X.Element -> Maybe Signal
 parseSignal e = do
-	name <- T.mkMemberName =<< getattrM "name" e
+	name <- T.memberName =<< X.attributeText "name" e
 	params <- children parseParameter (isParam ["out", ""]) e
 	return $ Signal name params
 
+parseType :: X.Element -> Maybe T.Signature
+parseType e = X.attributeText "type" e >>= T.signature
+
 parseParameter :: X.Element -> Maybe Parameter
 parseParameter e = do
 	let name = getattr "name" e
 	sig <- parseType e
-	return $ Parameter name sig
-
-parseType :: X.Element -> Maybe T.Signature
-parseType e = do
-	sig <- T.mkSignature =<< getattrM "type" e
 	case T.signatureTypes sig of
-		[_] -> Just sig
-		_   -> Nothing
+		[_] -> Just (Parameter name sig)
+		_ -> Nothing
 
 parseProperty :: X.Element -> Maybe Property
 parseProperty e = do
@@ -165,36 +162,24 @@
 		_           -> Nothing
 	return $ Property name sig access
 
-getattrM :: Text -> X.Element -> Maybe Text
-getattrM name = fmap attrText . listToMaybe . attrs where
-	attrText = textContent . X.attributeContent
-	attrs = X.elementAttributes >=> X.isNamed (toName name)
-	textContent cs = TL.concat [t | X.ContentText t <- cs]
-
-getattr :: Text -> X.Element -> Text
-getattr = (fromMaybe "" .) . getattrM
+getattr :: X.Name -> X.Element -> Text
+getattr = (fromMaybe "" .) . X.attributeText
 
 isParam :: [Text] -> X.Element -> [X.Element]
-isParam dirs = named "arg" >=> checkDir where
+isParam dirs = X.isNamed "arg" >=> checkDir where
 	checkDir e = [e | getattr "direction" e `elem` dirs]
 
 children :: Monad m => (X.Element -> m b) -> (X.Element -> [X.Element]) -> X.Element -> m [b]
 children f p = mapM f . concatMap p . X.elementChildren
 
-named :: X.Named a => Text -> a -> [a]
-named = X.isNamed . toName
-
-toName :: Text -> X.Name
-toName t = X.Name t Nothing Nothing
-
 newtype XmlWriter a = XmlWriter { runXmlWriter :: Maybe (a, Text) }
 
 instance Monad XmlWriter where
-	return a = XmlWriter $ Just (a, TL.empty)
+	return a = XmlWriter $ Just (a, Data.Text.empty)
 	m >>= f = XmlWriter $ do
 		(a, w) <- runXmlWriter m
 		(b, w') <- runXmlWriter (f a)
-		return (b, TL.append w w')
+		return (b, Data.Text.append w w')
 
 tell :: Text -> XmlWriter ()
 tell t = XmlWriter $ Just ((), t)
@@ -208,16 +193,16 @@
 writeRoot obj@(Object path _ _) = do
 	tell "<!DOCTYPE node PUBLIC '-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'"
 	tell " 'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>\n"
-	writeObject (T.strObjectPath path) obj
+	writeObject (T.objectPathText path) obj
 
 writeChild :: T.ObjectPath -> Object -> XmlWriter ()
 writeChild parentPath obj@(Object path _ _) = write where
-	path' = T.strObjectPath path
-	parent' = T.strObjectPath parentPath
-	relpathM = if TL.isPrefixOf parent' path'
+	path' = T.objectPathText path
+	parent' = T.objectPathText parentPath
+	relpathM = if Data.Text.isPrefixOf parent' path'
 		then Just $ if parent' == "/"
-			then TL.drop 1 path'
-			else TL.drop (TL.length parent' + 1) path'
+			then Data.Text.drop 1 path'
+			else Data.Text.drop (Data.Text.length parent' + 1) path'
 		else Nothing
 	
 	write = case relpathM of
@@ -232,38 +217,38 @@
 
 writeInterface :: Interface -> XmlWriter ()
 writeInterface (Interface name methods signals properties) = writeElement "interface"
-	[("name", T.strInterfaceName name)] $ do
+	[("name", T.interfaceNameText name)] $ do
 		mapM_ writeMethod methods
 		mapM_ writeSignal signals
 		mapM_ writeProperty properties
 
 writeMethod :: Method -> XmlWriter ()
 writeMethod (Method name inParams outParams) = writeElement "method"
-	[("name", T.strMemberName name)] $ do
+	[("name", T.memberNameText name)] $ do
 		mapM_ (writeParameter "in") inParams
 		mapM_ (writeParameter "out") outParams
 
 writeSignal :: Signal -> XmlWriter ()
 writeSignal (Signal name params) = writeElement "signal"
-	[("name", T.strMemberName name)] $ do
+	[("name", T.memberNameText name)] $ do
 		mapM_ (writeParameter "out") params
 
 writeParameter :: Text -> Parameter -> XmlWriter ()
 writeParameter direction (Parameter name sig) = writeEmptyElement "arg"
 	[ ("name", name)
-	, ("type", T.strSignature sig)
+	, ("type", T.signatureText sig)
 	, ("direction", direction)
 	]
 
 writeProperty :: Property -> XmlWriter ()
 writeProperty (Property name sig access) = writeEmptyElement "property"
 	[ ("name", name)
-	, ("type", T.strSignature sig)
+	, ("type", T.signatureText sig)
 	, ("access", strAccess access)
 	]
 
 strAccess :: [PropertyAccess] -> Text
-strAccess access = TL.append readS writeS where
+strAccess access = Data.Text.append readS writeS where
 	readS = if elem Read access then "read" else ""
 	writeS = if elem Write access then "write" else ""
 
@@ -294,11 +279,11 @@
 	tell "'"
 
 escape :: Text -> Text
-escape = TL.concatMap escapeChar where
+escape = Data.Text.concatMap escapeChar where
 	escapeChar c = case c of
 		'&' -> "&amp;"
 		'<' -> "&lt;"
 		'>' -> "&gt;"
 		'"' -> "&quot;"
 		'\'' -> "&apos;"
-		_ -> TL.singleton c
+		_ -> Data.Text.singleton c
diff --git a/hs/DBus/MatchRule.hs b/hs/DBus/MatchRule.hs
deleted file mode 100644
--- a/hs/DBus/MatchRule.hs
+++ /dev/null
@@ -1,205 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-module DBus.MatchRule (
-	  MatchRule (..)
-	, MessageType (..)
-	, ParameterValue (..)
-	, formatRule
-	, addMatch
-	, matchAll
-	, matches
-	) where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-import Data.Word (Word8)
-import Data.Maybe (fromMaybe, mapMaybe)
-import qualified Data.Set as Set
-import qualified DBus.Types as T
-import qualified DBus.Message as M
-import qualified DBus.Constants as C
-import DBus.Util (maybeIndex)
-
--- | A match rule is a set of filters; most filters may have one possible
--- value assigned, such as a single message type. The exception are parameter
--- filters, which are limited in number only by the server implementation.
--- 
-data MatchRule = MatchRule
-	{ matchType        :: Maybe MessageType
-	, matchSender      :: Maybe T.BusName
-	, matchInterface   :: Maybe T.InterfaceName
-	, matchMember      :: Maybe T.MemberName
-	, matchPath        :: Maybe T.ObjectPath
-	, matchDestination :: Maybe T.BusName
-	, matchParameters  :: [ParameterValue]
-	}
-	deriving (Show)
-
--- | Parameters may match against two types, strings and object paths. It's
--- probably an error to have two values for the same parameter.
--- 
--- The constructor @StringValue 3 \"hello\"@ means that the fourth parameter
--- in the message body must be the string @\"hello\"@. @PathValue@ is the
--- same, but its value must be an object path.
--- 
-data ParameterValue
-	= StringValue Word8 Text
-	| PathValue Word8 T.ObjectPath
-	deriving (Show, Eq)
-
--- | The set of allowed message types to filter on is separate from the set
--- supported for sending over the wire. This allows the server to support
--- additional types not yet implemented in the library, or vice-versa.
--- 
-data MessageType
-	= MethodCall
-	| MethodReturn
-	| Signal
-	| Error
-	deriving (Show, Eq)
-
-
--- | Format a 'MatchRule' as the bus expects to receive in a call to
--- @AddMatch@.
-
-formatRule :: MatchRule -> Text
-formatRule rule = TL.intercalate "," filters where
-	filters = structureFilters ++ parameterFilters
-	parameterFilters = map formatParameter $ matchParameters rule
-	structureFilters = mapMaybe unpack
-		[ ("type", fmap formatType . matchType)
-		, ("sender", fmap T.strBusName . matchSender)
-		, ("interface", fmap T.strInterfaceName . matchInterface)
-		, ("member", fmap T.strMemberName . matchMember)
-		, ("path", fmap T.strObjectPath . matchPath)
-		, ("destination", fmap T.strBusName . matchDestination)
-		]
-	unpack (key, mkValue) = formatFilter' key `fmap` mkValue rule
-
-formatParameter :: ParameterValue -> Text
-formatParameter (StringValue index x) = formatFilter' key x where
-	key = "arg" `TL.append` TL.pack (show index)
-formatParameter (PathValue index x) = formatFilter' key value where
-	key = "arg" `TL.append` TL.pack (show index) `TL.append` "path"
-	value = T.strObjectPath x
-
-formatFilter' :: Text -> Text -> Text
-formatFilter' key value = TL.concat [key, "='", value, "'"]
-
-formatType :: MessageType -> Text
-formatType MethodCall   = "method_call"
-formatType MethodReturn = "method_return"
-formatType Signal       = "signal"
-formatType Error        = "error"
-
-
--- | Build a 'M.MethodCall' for adding a match rule to the bus.
-
-addMatch :: MatchRule -> M.MethodCall
-addMatch rule = M.MethodCall
-	C.dbusPath
-	"AddMatch"
-	(Just C.dbusInterface)
-	(Just C.dbusName)
-	Set.empty
-	[T.toVariant $ formatRule rule]
-
-
--- | An empty match rule, which matches everything.
-
-matchAll :: MatchRule
-matchAll = MatchRule
-	{ matchType        = Nothing
-	, matchSender      = Nothing
-	, matchInterface   = Nothing
-	, matchMember      = Nothing
-	, matchPath        = Nothing
-	, matchDestination = Nothing
-	, matchParameters  = []
-	}
-
-
--- | Whether a 'M.ReceivedMessage' matches a given rule. This is useful
--- for implementing signal handlers.
-
-matches :: MatchRule -> M.ReceivedMessage -> Bool
-matches rule msg = and . mapMaybe ($ rule) $
-	[ fmap      (typeMatches msg) . matchType
-	, fmap    (senderMatches msg) . matchSender
-	, fmap     (ifaceMatches msg) . matchInterface
-	, fmap    (memberMatches msg) . matchMember
-	, fmap      (pathMatches msg) . matchPath
-	, fmap      (destMatches msg) . matchDestination
-	, Just . parametersMatch msg  . matchParameters
-	]
-
-typeMatches :: M.ReceivedMessage -> MessageType -> Bool
-typeMatches (M.ReceivedMethodCall   _ _ _) MethodCall   = True
-typeMatches (M.ReceivedMethodReturn _ _ _) MethodReturn = True
-typeMatches (M.ReceivedSignal       _ _ _) Signal       = True
-typeMatches (M.ReceivedError        _ _ _) Error        = True
-typeMatches _ _ = False
-
-senderMatches :: M.ReceivedMessage -> T.BusName -> Bool
-senderMatches msg name = M.receivedSender msg == Just name
-
-ifaceMatches :: M.ReceivedMessage -> T.InterfaceName -> Bool
-ifaceMatches (M.ReceivedMethodCall _ _ msg) name =
-	Just name == M.methodCallInterface msg
-ifaceMatches (M.ReceivedSignal _ _ msg) name =
-	name == M.signalInterface msg
-ifaceMatches _ _ = False
-
-memberMatches :: M.ReceivedMessage -> T.MemberName -> Bool
-memberMatches (M.ReceivedMethodCall _ _ msg) name =
-	name == M.methodCallMember msg
-memberMatches (M.ReceivedSignal _ _ msg) name =
-	name == M.signalMember msg
-memberMatches _ _ = False
-
-pathMatches :: M.ReceivedMessage -> T.ObjectPath -> Bool
-pathMatches (M.ReceivedMethodCall _ _ msg) path =
-	path == M.methodCallPath msg
-pathMatches (M.ReceivedSignal _ _ msg) path =
-	path == M.signalPath msg
-pathMatches _ _ = False
-
-destMatches :: M.ReceivedMessage -> T.BusName -> Bool
-destMatches (M.ReceivedMethodCall _ _ msg) name =
-	Just name == M.methodCallDestination msg
-destMatches (M.ReceivedMethodReturn _ _ msg) name =
-	Just name == M.methodReturnDestination msg
-destMatches (M.ReceivedError _ _ msg) name =
-	Just name == M.errorDestination msg
-destMatches (M.ReceivedSignal _ _ msg) name =
-	Just name == M.signalDestination msg
-destMatches _ _ = False
-
-parametersMatch :: M.ReceivedMessage -> [ParameterValue] -> Bool
-parametersMatch _ [] = True
-parametersMatch msg values = all validParam values where
-	body = M.receivedBody msg
-	validParam (StringValue idx x) = validParam' idx x
-	validParam (PathValue   idx x) = validParam' idx x
-	validParam' idx x = fromMaybe False $ do
-		var <- maybeIndex body $ fromIntegral idx
-		fmap (== x) $ T.fromVariant var
diff --git a/hs/DBus/Message.hs b/hs/DBus/Message.hs
--- a/hs/DBus/Message.hs
+++ b/hs/DBus/Message.hs
@@ -1,6 +1,6 @@
 
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,34 +15,22 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-module DBus.Message (
-
-	Message ( messageFlags
-	        , messageBody
-	        )
-
+module DBus.Message
+	( Message ( messageFlags
+	          , messageBody
+	          )
 	, Flag (..)
-
 	, Serial
 	, serialValue
-	, firstSerial
-	, nextSerial
-
+	, Unknown (..)
 	, MethodCall (..)
-
 	, MethodReturn (..)
-
 	, Error (..)
 	, errorMessage
-
 	, Signal (..)
-
-	, Unknown (..)
-
 	, ReceivedMessage (..)
 	, receivedSerial
 	, receivedSender
 	, receivedBody
-
 	) where
 import DBus.Message.Internal
diff --git a/hs/DBus/Message/Internal.hs b/hs/DBus/Message/Internal.hs
--- a/hs/DBus/Message/Internal.hs
+++ b/hs/DBus/Message/Internal.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,72 +16,71 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-
-{-# LANGUAGE OverloadedStrings #-}
-
 module DBus.Message.Internal where
+import           Data.Maybe (fromMaybe)
+import qualified Data.Set
+import           Data.Set (Set)
+import qualified Data.Text
+import           Data.Text (Text)
+import           Data.Word (Word8, Word32)
 
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
+import           DBus.Types hiding (errorName)
+import           DBus.Util (maybeIndex)
 
-import qualified Data.Set as S
-import Data.Word (Word8, Word32)
-import Data.Maybe (fromMaybe)
-import qualified DBus.Types as T
-import DBus.Util (maybeIndex)
 
 class Message a where
 	messageTypeCode     :: a -> Word8
 	messageHeaderFields :: a -> [HeaderField]
-	messageFlags        :: a -> S.Set Flag
-	messageBody         :: a -> [T.Variant]
+	messageFlags        :: a -> Set Flag
+	messageBody         :: a -> [Variant]
 
+maybe' :: (a -> b) -> Maybe a -> [b]
+maybe' f = maybe [] (\x' -> [f x'])
+
+data Unknown = Unknown
+	{ unknownType    :: Word8
+	, unknownFlags   :: Set Flag
+	, unknownBody    :: [Variant]
+	}
+	deriving (Show, Eq)
+
+data HeaderField
+	= HeaderPath        ObjectPath
+	| HeaderInterface   InterfaceName
+	| HeaderMember      MemberName
+	| HeaderErrorName   ErrorName
+	| HeaderReplySerial Serial
+	| HeaderDestination BusName
+	| HeaderSender      BusName
+	| HeaderSignature   Signature
+	deriving (Show, Eq)
+
 data Flag
 	= NoReplyExpected
 	| NoAutoStart
 	deriving (Show, Eq, Ord)
 
-data HeaderField
-	= Path        T.ObjectPath
-	| Interface   T.InterfaceName
-	| Member      T.MemberName
-	| ErrorName   T.ErrorName
-	| ReplySerial Serial
-	| Destination T.BusName
-	| Sender      T.BusName
-	| Signature   T.Signature
-	deriving (Show, Eq)
 
-
 -- | A value used to uniquely identify a particular message within a session.
--- 'Serial's are 32-bit unsigned integers, and eventually wrap.
-
-newtype Serial = Serial { serialValue :: Word32 }
-	deriving (Eq, Ord)
-
-instance Show Serial where
-	show (Serial x) = show x
-
-instance T.Variable Serial where
-	toVariant (Serial x) = T.toVariant x
-	fromVariant = fmap Serial . T.fromVariant
+-- 'Serial's are 32&#8208;bit unsigned integers, and eventually wrap.
 
-firstSerial :: Serial
-firstSerial = Serial 1
+newtype Serial = Serial Word32
+	deriving (Eq, Ord, Show)
 
-nextSerial :: Serial -> Serial
-nextSerial (Serial x) = Serial (x + 1)
+instance IsVariant Serial where
+	toVariant (Serial x) = toVariant x
+	fromVariant = fmap Serial . fromVariant
 
-maybe' :: (a -> b) -> Maybe a -> [b]
-maybe' f = maybe [] (\x' -> [f x'])
+serialValue :: Serial -> Word32
+serialValue (Serial x) = x
 
 data MethodCall = MethodCall
-	{ methodCallPath        :: T.ObjectPath
-	, methodCallMember      :: T.MemberName
-	, methodCallInterface   :: Maybe T.InterfaceName
-	, methodCallDestination :: Maybe T.BusName
-	, methodCallFlags       :: S.Set Flag
-	, methodCallBody        :: [T.Variant]
+	{ methodCallPath        :: ObjectPath
+	, methodCallMember      :: MemberName
+	, methodCallInterface   :: Maybe InterfaceName
+	, methodCallDestination :: Maybe BusName
+	, methodCallFlags       :: Set Flag
+	, methodCallBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
@@ -89,96 +89,89 @@
 	messageFlags      = methodCallFlags
 	messageBody       = methodCallBody
 	messageHeaderFields m = concat
-		[ [ Path    $ methodCallPath m
-		  ,  Member $ methodCallMember m
+		[ [ HeaderPath (methodCallPath m)
+		  , HeaderMember (methodCallMember m)
 		  ]
-		, maybe' Interface . methodCallInterface $ m
-		, maybe' Destination . methodCallDestination $ m
+		, maybe' HeaderInterface (methodCallInterface m)
+		, maybe' HeaderDestination (methodCallDestination m)
 		]
 
 data MethodReturn = MethodReturn
 	{ methodReturnSerial      :: Serial
-	, methodReturnDestination :: Maybe T.BusName
-	, methodReturnBody        :: [T.Variant]
+	, methodReturnDestination :: Maybe BusName
+	, methodReturnBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message MethodReturn where
 	messageTypeCode _ = 2
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = methodReturnBody
 	messageHeaderFields m = concat
-		[ [ ReplySerial $ methodReturnSerial m
+		[ [ HeaderReplySerial (methodReturnSerial m)
 		  ]
-		, maybe' Destination . methodReturnDestination $ m
+		, maybe' HeaderDestination (methodReturnDestination m)
 		]
 
 data Error = Error
-	{ errorName        :: T.ErrorName
+	{ errorName        :: ErrorName
 	, errorSerial      :: Serial
-	, errorDestination :: Maybe T.BusName
-	, errorBody        :: [T.Variant]
+	, errorDestination :: Maybe BusName
+	, errorBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message Error where
 	messageTypeCode _ = 3
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = errorBody
 	messageHeaderFields m = concat
-		[ [ ErrorName   $ errorName m
-		  , ReplySerial $ errorSerial m
+		[ [ HeaderErrorName (errorName m)
+		  , HeaderReplySerial (errorSerial m)
 		  ]
-		, maybe' Destination . errorDestination $ m
+		, maybe' HeaderDestination (errorDestination m)
 		]
 
 errorMessage :: Error -> Text
 errorMessage msg = fromMaybe "(no error message)" $ do
 	field <- maybeIndex (errorBody msg) 0
-	text <- T.fromVariant field
-	if TL.null text
+	text <- fromVariant field
+	if Data.Text.null text
 		then Nothing
 		else return text
 
 data Signal = Signal
-	{ signalPath        :: T.ObjectPath
-	, signalMember      :: T.MemberName
-	, signalInterface   :: T.InterfaceName
-	, signalDestination :: Maybe T.BusName
-	, signalBody        :: [T.Variant]
+	{ signalDestination :: Maybe BusName
+	, signalPath        :: ObjectPath
+	, signalInterface   :: InterfaceName
+	, signalMember      :: MemberName
+	, signalBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message Signal where
 	messageTypeCode _ = 4
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = signalBody
 	messageHeaderFields m = concat
-		[ [ Path      $ signalPath m
-		  , Member    $ signalMember m
-		  , Interface $ signalInterface m
+		[ [ HeaderPath (signalPath m)
+		  , HeaderMember (signalMember m)
+		  , HeaderInterface (signalInterface m)
 		  ]
-		, maybe' Destination . signalDestination $ m
+		, maybe' HeaderDestination (signalDestination m)
 		]
 
-data Unknown = Unknown
-	{ unknownType    :: Word8
-	, unknownFlags   :: S.Set Flag
-	, unknownBody    :: [T.Variant]
-	}
-	deriving (Show, Eq)
 
-
 -- | Not an actual message type, but a wrapper around messages received from
--- the bus. Each value contains the message's 'Serial' and possibly the
--- origin's 'T.BusName'
+-- the bus. Each value contains the message&#8217;s 'Serial' and possibly the
+-- origin&#8217;s 'BusName'
 
 data ReceivedMessage
-	= ReceivedMethodCall   Serial (Maybe T.BusName) MethodCall
-	| ReceivedMethodReturn Serial (Maybe T.BusName) MethodReturn
-	| ReceivedError        Serial (Maybe T.BusName) Error
-	| ReceivedSignal       Serial (Maybe T.BusName) Signal
-	| ReceivedUnknown      Serial (Maybe T.BusName) Unknown
+	= ReceivedMethodCall   Serial (Maybe BusName) MethodCall
+	| ReceivedMethodReturn Serial (Maybe BusName) MethodReturn
+	| ReceivedError        Serial (Maybe BusName) Error
+	| ReceivedSignal       Serial (Maybe BusName) Signal
+	| ReceivedUnknown      Serial (Maybe BusName) Unknown
 	deriving (Show, Eq)
 
 receivedSerial :: ReceivedMessage -> Serial
@@ -188,14 +181,14 @@
 receivedSerial (ReceivedSignal       s _ _) = s
 receivedSerial (ReceivedUnknown      s _ _) = s
 
-receivedSender :: ReceivedMessage -> Maybe T.BusName
+receivedSender :: ReceivedMessage -> Maybe BusName
 receivedSender (ReceivedMethodCall   _ s _) = s
 receivedSender (ReceivedMethodReturn _ s _) = s
 receivedSender (ReceivedError        _ s _) = s
 receivedSender (ReceivedSignal       _ s _) = s
 receivedSender (ReceivedUnknown      _ s _) = s
 
-receivedBody :: ReceivedMessage -> [T.Variant]
+receivedBody :: ReceivedMessage -> [Variant]
 receivedBody (ReceivedMethodCall   _ _ x) = messageBody x
 receivedBody (ReceivedMethodReturn _ _ x) = messageBody x
 receivedBody (ReceivedError        _ _ x) = messageBody x
diff --git a/hs/DBus/NameReservation.hs b/hs/DBus/NameReservation.hs
deleted file mode 100644
--- a/hs/DBus/NameReservation.hs
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-{-# LANGUAGE OverloadedStrings #-}
-module DBus.NameReservation
-	( RequestNameFlag (..)
-	, RequestNameReply (..)
-	, ReleaseNameReply (..)
-	, requestName
-	, releaseName
-	, mkRequestNameReply
-	, mkReleaseNameReply
-	) where
-import Data.Word (Word32)
-import Data.Bits ((.|.))
-import qualified Data.Set as Set
-import qualified DBus.Types as T
-import qualified DBus.Message as M
-import qualified DBus.Constants as C
-import DBus.Util (maybeIndex)
-
-data RequestNameFlag
-	= AllowReplacement
-	| ReplaceExisting
-	| DoNotQueue
-	deriving (Show)
-
-encodeFlags :: [RequestNameFlag] -> Word32
-encodeFlags = foldr (.|.) 0 . map flagValue where
-	flagValue AllowReplacement = 0x1
-	flagValue ReplaceExisting  = 0x2
-	flagValue DoNotQueue       = 0x4
-
-
--- | Build a 'M.MethodCall' for requesting a registered bus name.
-
-requestName :: T.BusName -> [RequestNameFlag] -> M.MethodCall
-requestName name flags = M.MethodCall
-	{ M.methodCallPath = C.dbusPath
-	, M.methodCallInterface = Just C.dbusInterface
-	, M.methodCallDestination = Just C.dbusName
-	, M.methodCallFlags = Set.empty
-	, M.methodCallMember = "RequestName"
-	, M.methodCallBody =
-		[ T.toVariant name
-		, T.toVariant . encodeFlags $ flags]
-	}
-
-data RequestNameReply
-	= PrimaryOwner
-	| InQueue
-	| Exists
-	| AlreadyOwner
-	deriving (Show)
-
-mkRequestNameReply :: M.MethodReturn -> Maybe RequestNameReply
-mkRequestNameReply msg =
-	maybeIndex (M.messageBody msg) 0 >>=
-	T.fromVariant >>=
-	decodeRequestReply
-
-decodeRequestReply :: Word32 -> Maybe RequestNameReply
-decodeRequestReply 1 = Just PrimaryOwner
-decodeRequestReply 2 = Just InQueue
-decodeRequestReply 3 = Just Exists
-decodeRequestReply 4 = Just AlreadyOwner
-decodeRequestReply _ = Nothing
-
-
--- | Build a 'M.MethodCall' for releasing a registered bus name.
-
-releaseName :: T.BusName -> M.MethodCall
-releaseName name = M.MethodCall
-	{ M.methodCallPath = C.dbusPath
-	, M.methodCallInterface = Just C.dbusInterface
-	, M.methodCallDestination = Just C.dbusName
-	, M.methodCallFlags = Set.empty
-	, M.methodCallMember = "ReleaseName"
-	, M.methodCallBody = [T.toVariant name]
-	}
-
-data ReleaseNameReply
-	= Released
-	| NonExistent
-	| NotOwner
-	deriving (Show)
-
-mkReleaseNameReply :: M.MethodReturn -> Maybe ReleaseNameReply
-mkReleaseNameReply msg =
-	maybeIndex (M.messageBody msg) 0 >>=
-	T.fromVariant >>=
-	decodeReleaseReply
-
-decodeReleaseReply :: Word32 -> Maybe ReleaseNameReply
-decodeReleaseReply 1 = Just Released
-decodeReleaseReply 2 = Just NonExistent
-decodeReleaseReply 3 = Just NotOwner
-decodeReleaseReply _ = Nothing
diff --git a/hs/DBus/Types.hs b/hs/DBus/Types.hs
--- a/hs/DBus/Types.hs
+++ b/hs/DBus/Types.hs
@@ -1,6 +1,6 @@
 
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,85 +15,57 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-module DBus.Types (
-
-	  -- * Available types
-	  Type (..)
-	, typeCode
-
-	  -- * Variants
-	, Variant
-	, Variable (..)
-
-	, variantType
-
-	  -- * Signatures
+module DBus.Types
+	( Type(..)
+	
 	, Signature
+	, signature
+	, signature_
+	, signatureText
 	, signatureTypes
-	, strSignature
-
-	, mkSignature
-	, mkSignature_
-
-	  -- * Object paths
+	
+	, IsValue
+	, IsAtom
+	, typeOf
+	
+	, Variant
+	, IsVariant(..)
+	, variantType
+	
 	, ObjectPath
-	, strObjectPath
-	, mkObjectPath
-	, mkObjectPath_
-
-	  -- * Arrays
+	, objectPath
+	, objectPath_
+	, objectPathText
+	
+	, InterfaceName
+	, interfaceName
+	, interfaceName_
+	, interfaceNameText
+	
+	, MemberName
+	, memberName
+	, memberName_
+	, memberNameText
+	
+	, ErrorName
+	, errorName
+	, errorName_
+	, errorNameText
+	
+	, BusName
+	, busName
+	, busName_
+	, busNameText
+	
+	, Structure
 	, Array
-	, arrayType
-	, arrayItems
-
-	, toArray
-	, fromArray
-	, arrayFromItems
-
-	, arrayToBytes
-	, arrayFromBytes
-
-	  -- * Dictionaries
 	, Dictionary
+	, structureItems
+	, arrayItems
 	, dictionaryItems
-	, dictionaryKeyType
-	, dictionaryValueType
-
-	, toDictionary
-	, fromDictionary
-	, dictionaryFromItems
-
-	, dictionaryToArray
-	, arrayToDictionary
-
-	  -- * Structures
-	, Structure (..)
-
-	-- * Names
-
-	  -- ** Bus names
-	, BusName
-	, strBusName
-	, mkBusName
-	, mkBusName_
-
-	  -- ** Interface names
-	, InterfaceName
-	, strInterfaceName
-	, mkInterfaceName
-	, mkInterfaceName_
-
-	  -- ** Error names
-	, ErrorName
-	, strErrorName
-	, mkErrorName
-	, mkErrorName_
-
-	  -- ** Member names
-	, MemberName
-	, strMemberName
-	, mkMemberName
-	, mkMemberName_
-
 	) where
-import DBus.Types.Internal
+import           DBus.Types.Internal hiding (typeOf)
+import qualified DBus.Types.Internal
+
+typeOf :: IsValue a => a -> Type
+typeOf = DBus.Types.Internal.typeOf
diff --git a/hs/DBus/Types/Internal.cpphs b/hs/DBus/Types/Internal.cpphs
deleted file mode 100644
--- a/hs/DBus/Types/Internal.cpphs
+++ /dev/null
@@ -1,622 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-
-{-# LANGUAGE TypeSynonymInstances #-}
-
-module DBus.Types.Internal where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-import Data.Word (Word8, Word16, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-
-import qualified Data.Text as T
-
-import Data.Ord (comparing)
-
-import Data.Text.Encoding (decodeUtf8)
-
-import qualified Data.ByteString.Unsafe as B
-import qualified Foreign as F
-import System.IO.Unsafe (unsafePerformIO)
-
-import Data.Text.Lazy.Encoding (encodeUtf8)
-
-import DBus.Util (mkUnsafe)
-import qualified Data.String as String
-
-import Text.ParserCombinators.Parsec ((<|>))
-import qualified Text.ParserCombinators.Parsec as P
-import DBus.Util (checkLength, parseMaybe)
-
-import Data.List (intercalate)
-
-import Control.Monad (unless)
-
-import Control.Arrow ((***))
-import qualified Data.Map as Map
-
-import Control.Monad (forM)
-
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Char8 as B8
-import qualified Data.ByteString.Lazy as BL
-import qualified Data.ByteString.Char8 as BL8
-
-data Type
-	= DBusBoolean
-	| DBusByte
-	| DBusInt16
-	| DBusInt32
-	| DBusInt64
-	| DBusWord16
-	| DBusWord32
-	| DBusWord64
-	| DBusDouble
-	| DBusString
-	| DBusSignature
-	| DBusObjectPath
-	| DBusVariant
-	| DBusArray Type
-	| DBusDictionary Type Type
-	| DBusStructure [Type]
-	deriving (Show, Eq)
-
-
--- | \"Atomic\" types are any which can't contain any other types. Only
--- atomic types may be used as dictionary keys.
-
-isAtomicType :: Type -> Bool
-isAtomicType DBusBoolean    = True
-isAtomicType DBusByte       = True
-isAtomicType DBusInt16      = True
-isAtomicType DBusInt32      = True
-isAtomicType DBusInt64      = True
-isAtomicType DBusWord16     = True
-isAtomicType DBusWord32     = True
-isAtomicType DBusWord64     = True
-isAtomicType DBusDouble     = True
-isAtomicType DBusString     = True
-isAtomicType DBusSignature  = True
-isAtomicType DBusObjectPath = True
-isAtomicType _              = False
-
-
--- | Every type has an associated type code; a textual representation of
--- the type, useful for debugging.
-
-typeCode :: Type -> Text
-
-typeCode t = TL.fromChunks [decodeUtf8 $ typeCodeB t]
-
-typeCodeB :: Type -> B.ByteString
-typeCodeB DBusBoolean    = "b"
-typeCodeB DBusByte       = "y"
-typeCodeB DBusInt16      = "n"
-typeCodeB DBusInt32      = "i"
-typeCodeB DBusInt64      = "x"
-typeCodeB DBusWord16     = "q"
-typeCodeB DBusWord32     = "u"
-typeCodeB DBusWord64     = "t"
-typeCodeB DBusDouble     = "d"
-typeCodeB DBusString     = "s"
-typeCodeB DBusSignature  = "g"
-typeCodeB DBusObjectPath = "o"
-typeCodeB DBusVariant    = "v"
-
-typeCodeB (DBusArray t) = B8.cons 'a' $ typeCodeB t
-
-typeCodeB (DBusDictionary k v) = B.concat ["a{", typeCodeB k, typeCodeB v, "}"]
-
-typeCodeB (DBusStructure ts) = B.concat $
-	["("] ++ map typeCodeB ts ++ [")"]
-
-
--- | 'Variant's may contain any other built-in D-Bus value. Besides
--- representing native @VARIANT@ values, they allow type-safe storage and
--- deconstruction of heterogeneous collections.
-
-data Variant
-	= VarBoxBool Bool
-	| VarBoxWord8 Word8
-	| VarBoxInt16 Int16
-	| VarBoxInt32 Int32
-	| VarBoxInt64 Int64
-	| VarBoxWord16 Word16
-	| VarBoxWord32 Word32
-	| VarBoxWord64 Word64
-	| VarBoxDouble Double
-	| VarBoxString Text
-	| VarBoxSignature Signature
-	| VarBoxObjectPath ObjectPath
-	| VarBoxVariant Variant
-	| VarBoxArray Array
-	| VarBoxDictionary Dictionary
-	| VarBoxStructure Structure
-	deriving (Eq)
-
-class Variable a where
-	toVariant :: a -> Variant
-	fromVariant :: Variant -> Maybe a
-
-instance Show Variant where
-	showsPrec d var = showParen (d > 10) full where
-		full = s "Variant " . shows code . s " " . valueStr
-		code = typeCode $ variantType var
-		s = showString
-		valueStr = showsPrecVar 11 var
-
-showsPrecVar :: Int -> Variant -> ShowS
-showsPrecVar d var = case var of
-	(VarBoxBool x) -> showsPrec d x
-	(VarBoxWord8 x) -> showsPrec d x
-	(VarBoxInt16 x) -> showsPrec d x
-	(VarBoxInt32 x) -> showsPrec d x
-	(VarBoxInt64 x) -> showsPrec d x
-	(VarBoxWord16 x) -> showsPrec d x
-	(VarBoxWord32 x) -> showsPrec d x
-	(VarBoxWord64 x) -> showsPrec d x
-	(VarBoxDouble x) -> showsPrec d x
-	(VarBoxString x) -> showsPrec d x
-	(VarBoxSignature x) -> showsPrec d x
-	(VarBoxObjectPath x) -> showsPrec d x
-	(VarBoxVariant x) -> showsPrec d x
-	(VarBoxArray x) -> showsPrec d x
-	(VarBoxDictionary x) -> showsPrec d x
-	(VarBoxStructure x) -> showsPrec d x
-
-
--- | Every variant is strongly-typed; that is, the type of its contained
--- value is known at all times. This function retrieves that type, so that
--- the correct cast can be used to retrieve the value.
-
-variantType :: Variant -> Type
-variantType var = case var of
-	(VarBoxBool _) -> DBusBoolean
-	(VarBoxWord8 _) -> DBusByte
-	(VarBoxInt16 _) -> DBusInt16
-	(VarBoxInt32 _) -> DBusInt32
-	(VarBoxInt64 _) -> DBusInt64
-	(VarBoxWord16 _) -> DBusWord16
-	(VarBoxWord32 _) -> DBusWord32
-	(VarBoxWord64 _) -> DBusWord64
-	(VarBoxDouble _) -> DBusDouble
-	(VarBoxString _) -> DBusString
-	(VarBoxSignature _) -> DBusSignature
-	(VarBoxObjectPath _) -> DBusObjectPath
-	(VarBoxVariant _) -> DBusVariant
-	(VarBoxArray x) -> DBusArray (arrayType x)
-	(VarBoxDictionary x) -> let
-		keyT = dictionaryKeyType x
-		valueT = dictionaryValueType x
-		in DBusDictionary keyT valueT
-	(VarBoxStructure x) -> let
-		Structure items = x
-		in DBusStructure (map variantType items)
-
-variantSignature :: Variant -> Maybe Signature
-variantSignature = mkBytesSignature . typeCodeB . variantType
-
-#define INSTANCE_VARIABLE(TYPE) \
-	instance Variable TYPE where \
-		{ toVariant = VarBox/**/TYPE \
-		; fromVariant (VarBox/**/TYPE x) = Just x \
-		; fromVariant _ = Nothing \
-		}
-
-INSTANCE_VARIABLE(Variant)
-
-INSTANCE_VARIABLE(Bool)
-INSTANCE_VARIABLE(Word8)
-INSTANCE_VARIABLE(Int16)
-INSTANCE_VARIABLE(Int32)
-INSTANCE_VARIABLE(Int64)
-INSTANCE_VARIABLE(Word16)
-INSTANCE_VARIABLE(Word32)
-INSTANCE_VARIABLE(Word64)
-INSTANCE_VARIABLE(Double)
-
-instance Variable TL.Text where
-	toVariant = VarBoxString
-	fromVariant (VarBoxString x) = Just x
-	fromVariant _ = Nothing
-
-instance Variable T.Text where
-	toVariant = toVariant . TL.fromChunks . (:[])
-	fromVariant = fmap (T.concat . TL.toChunks) . fromVariant
-
-instance Variable String where
-	toVariant = toVariant . TL.pack
-	fromVariant = fmap TL.unpack . fromVariant
-
-INSTANCE_VARIABLE(Signature)
-data Signature = Signature { signatureTypes :: [Type] }
-	deriving (Eq)
-
-instance Show Signature where
-	showsPrec d x = showParen (d > 10) $
-		showString "Signature " . shows (strSignature x)
-
-bytesSignature :: Signature -> B.ByteString
-bytesSignature (Signature ts) = B.concat $ map typeCodeB ts
-
-strSignature :: Signature -> Text
-strSignature (Signature ts) = TL.concat $ map typeCode ts
-
-instance Ord Signature where
-	compare = comparing strSignature
-
-mkBytesSignature :: B.ByteString -> Maybe Signature
-mkBytesSignature = unsafePerformIO . flip B.unsafeUseAsCStringLen io where
-
-	parseAtom c yes no = case c of
-		0x62 -> yes DBusBoolean
-		0x79 -> yes DBusByte
-		0x6E -> yes DBusInt16
-		0x69 -> yes DBusInt32
-		0x78 -> yes DBusInt64
-		0x71 -> yes DBusWord16
-		0x75 -> yes DBusWord32
-		0x74 -> yes DBusWord64
-		0x64 -> yes DBusDouble
-		0x73 -> yes DBusString
-		0x67 -> yes DBusSignature
-		0x6F -> yes DBusObjectPath
-		_ -> no
-	
-	fast c = parseAtom c (\t -> Just (Signature [t])) $ case c of
-		0x76 -> Just (Signature [DBusVariant])
-		_ -> Nothing
-
-
-	slow :: F.Ptr Word8 -> Int -> IO (Maybe Signature)
-	slow buf len = loop [] 0 where
-		loop acc ii | ii >= len = return . Just . Signature $ reverse acc
-		loop acc ii = do
-			c <- F.peekElemOff buf ii
-			let next t = loop (t : acc) (ii + 1)
-			parseAtom c next $ case c of
-				0x76 -> next DBusVariant
-				
-				-- '('
-				0x28 -> do
-					mt <- structure buf len (ii + 1)
-					case mt of
-						Just (ii', t) -> loop (t : acc) ii'
-						Nothing -> return Nothing
-				
-				-- 'a'
-				0x61 -> do
-					mt <- array buf len (ii + 1)
-					case mt of
-						Just (ii', t) -> loop (t : acc) ii'
-						Nothing -> return Nothing
-				
-				_ -> return Nothing
-
-	structure :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-	structure buf len = loop [] where
-		loop _ ii | ii >= len = return Nothing
-		loop acc ii = do
-			c <- F.peekElemOff buf ii
-			let next t = loop (t : acc) (ii + 1)
-			parseAtom c next $ case c of
-				0x76 -> next DBusVariant
-				
-				-- '('
-				0x28 -> do
-					mt <- structure buf len (ii + 1)
-					case mt of
-						Just (ii', t) -> loop (t : acc) ii'
-						Nothing -> return Nothing
-				
-				-- ')'
-				0x29 -> return $ Just $ (ii + 1, DBusStructure (reverse acc))
-				
-				-- 'a'
-				0x61 -> do
-					mt <- array buf len (ii + 1)
-					case mt of
-						Just (ii', t) -> loop (t : acc) ii'
-						Nothing -> return Nothing
-				
-				_ -> return Nothing
-
-	array :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-	array _   len ii | ii >= len = return Nothing
-	array buf len ii = do
-		c <- F.peekElemOff buf ii
-		let next t = return $ Just (ii + 1, DBusArray t)
-		parseAtom c next $ case c of
-			0x76 -> next DBusVariant
-			
-			-- '('
-			0x28 -> do
-				mt <- structure buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> return $ Just (ii', DBusArray t)
-					Nothing -> return Nothing
-			
-			-- '{'
-			0x7B -> dict buf len (ii + 1)
-			
-			-- 'a'
-			0x61 -> do
-				mt <- array buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> return $ Just (ii', DBusArray t)
-					Nothing -> return Nothing
-			
-			_ -> return Nothing
-
-	dict :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-	dict _   len ii | ii + 1 >= len = return Nothing
-	dict buf len ii = do
-		c1 <- F.peekElemOff buf ii
-		c2 <- F.peekElemOff buf (ii + 1)
-		
-		let mt1 = parseAtom c1 Just Nothing
-		
-		let next t = return $ Just (ii + 2, t)
-		mt2 <- parseAtom c2 next $ case c2 of
-			0x76 -> next DBusVariant
-			
-			-- '('
-			0x28 -> structure buf len (ii + 2)
-			
-			-- 'a'
-			0x61 -> array buf len (ii + 2)
-			
-			_ -> return Nothing
-		
-		case mt2 of
-			Nothing -> return Nothing
-			Just (ii', t2) -> if ii' >= len
-				then return Nothing
-				else do
-					c3 <- F.peekElemOff buf ii'
-					return $ do
-						if c3 == 0x7D then Just () else Nothing
-						t1 <- mt1
-						Just (ii' + 1, DBusDictionary t1 t2)
-
-	
-	io (cstr, len) = case len of
-		0 -> return $ Just $ Signature []
-		1 -> fmap fast $ F.peek cstr
-		_ | len <= 255 -> slow (F.castPtr cstr) len
-		_ -> return Nothing
-
-mkSignature :: Text -> Maybe Signature
-mkSignature = mkBytesSignature . B.concat . BL.toChunks . encodeUtf8
-
-mkSignature_ :: Text -> Signature
-mkSignature_ = mkUnsafe "signature" mkSignature
-
-instance String.IsString Signature where
-	fromString = mkUnsafe "signature" mkBytesSignature . BL8.pack
-
-maybeValidType :: Type -> Maybe ()
-maybeValidType t = if B.length (typeCodeB t) > 255
-	then Nothing
-	else Just ()
-
-INSTANCE_VARIABLE(ObjectPath)
-newtype ObjectPath = ObjectPath
-	{ strObjectPath :: Text
-	}
-	deriving (Eq, Ord)
-
-instance Show ObjectPath where
-	showsPrec d (ObjectPath x) = showParen (d > 10) $
-		showString "ObjectPath " . shows x
-
-instance String.IsString ObjectPath where
-	fromString = mkObjectPath_ . TL.pack
-
-mkObjectPath :: Text -> Maybe ObjectPath
-mkObjectPath s = parseMaybe path' (TL.unpack s) where
-	c = P.oneOf $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "_"
-	path = P.char '/' >>= P.optional . P.sepBy (P.many1 c) . P.char
-	path' = path >> P.eof >> return (ObjectPath s)
-
-mkObjectPath_ :: Text -> ObjectPath
-mkObjectPath_ = mkUnsafe "object path" mkObjectPath
-
-INSTANCE_VARIABLE(Array)
-data Array
-	= VariantArray Type [Variant]
-	| ByteArray BL.ByteString
-	deriving (Eq)
-
-
--- | This is the type contained within the array, not the type of the array
--- itself.
-
-arrayType :: Array -> Type
-arrayType (VariantArray t _) = t
-arrayType (ByteArray _) = DBusByte
-
-arrayItems :: Array -> [Variant]
-arrayItems (VariantArray _ xs) = xs
-arrayItems (ByteArray xs) = map toVariant $ BL.unpack xs
-
-instance Show Array where
-	showsPrec d array = showParen (d > 10) $
-		s "Array " . showSig . s " [" . s valueString . s "]" where
-			s = showString
-			showSig = shows . typeCode . arrayType $ array
-			showVar var = showsPrecVar 0 var ""
-			valueString = intercalate ", " $ map showVar $ arrayItems array
-
-arrayFromItems :: Type -> [Variant] -> Maybe Array
-arrayFromItems DBusByte vs = fmap (ByteArray . BL.pack) (mapM fromVariant vs)
-
-arrayFromItems t vs = do
-	maybeValidType t
-	if all (\x -> variantType x == t) vs
-		then Just $ VariantArray t vs
-		else Nothing
-
-toArray :: Variable a => Type -> [a] -> Maybe Array
-toArray t = arrayFromItems t . map toVariant
-
-fromArray :: Variable a => Array -> Maybe [a]
-fromArray = mapM fromVariant . arrayItems
-
-arrayToBytes :: Array -> Maybe BL.ByteString
-arrayToBytes (ByteArray x) = Just x
-arrayToBytes _             = Nothing
-
-arrayFromBytes :: BL.ByteString -> Array
-arrayFromBytes = ByteArray
-
-instance Variable BL.ByteString where
-	toVariant = toVariant . arrayFromBytes
-	fromVariant x = fromVariant x >>= arrayToBytes
-
-instance Variable B.ByteString where
-	toVariant x = toVariant . arrayFromBytes $ BL.fromChunks [x]
-	fromVariant = fmap (B.concat . BL.toChunks) . fromVariant
-
-INSTANCE_VARIABLE(Dictionary)
-
-data Dictionary = Dictionary
-	{ dictionaryKeyType   :: Type
-	, dictionaryValueType :: Type
-	, dictionaryItems     :: [(Variant, Variant)]
-	}
-	deriving (Eq)
-
-instance Show Dictionary where
-	showsPrec d (Dictionary kt vt pairs) = showParen (d > 10) $
-		s "Dictionary " . showSig . s " {" . s valueString . s "}" where
-			s = showString
-			showSig = shows $ TL.append (typeCode kt) (typeCode vt)
-			valueString = intercalate ", " $ map showPair pairs
-			showPair (k, v) = (showsPrecVar 0 k . showString " -> " . showsPrecVar 0 v) ""
-
-dictionaryFromItems :: Type -> Type -> [(Variant, Variant)] -> Maybe Dictionary
-dictionaryFromItems kt vt pairs = do
-	unless (isAtomicType kt) Nothing
-	maybeValidType kt
-	maybeValidType vt
-	
-	let sameType (k, v) = variantType k == kt &&
-	                      variantType v == vt
-	if all sameType pairs
-		then Just $ Dictionary kt vt pairs
-		else Nothing
-
-toDictionary :: (Variable a, Variable b) => Type -> Type -> Map.Map a b
-             -> Maybe Dictionary
-toDictionary kt vt = dictionaryFromItems kt vt . pairs where
-	pairs = map (toVariant *** toVariant) . Map.toList
-
-fromDictionary :: (Variable a, Ord a, Variable b) => Dictionary
-               -> Maybe (Map.Map a b)
-fromDictionary (Dictionary _ _ vs) = do
-	pairs <- forM vs $ \(k, v) -> do
-		k' <- fromVariant k
-		v' <- fromVariant v
-		return (k', v')
-	return $ Map.fromList pairs
-
-dictionaryToArray :: Dictionary -> Array
-dictionaryToArray (Dictionary kt vt items) = array where
-	Just array = toArray itemType structs
-	itemType = DBusStructure [kt, vt]
-	structs = [Structure [k, v] | (k, v) <- items]
-
-arrayToDictionary :: Array -> Maybe Dictionary
-arrayToDictionary array = do
-	let toPair x = do
-		struct <- fromVariant x
-		case struct of
-			Structure [k, v] -> Just (k, v)
-			_                -> Nothing
-	(kt, vt) <- case arrayType array of
-		DBusStructure [kt, vt] -> Just (kt, vt)
-		_                      -> Nothing
-	pairs <- mapM toPair $ arrayItems array
-	dictionaryFromItems kt vt pairs
-
-INSTANCE_VARIABLE(Structure)
-
-data Structure = Structure [Variant]
-	deriving (Show, Eq)
-
-#define NAME_TYPE(TYPE, NAME) \
-	newtype TYPE = TYPE {str/**/TYPE :: Text} \
-		deriving (Eq, Ord); \
-		\
-	instance Show TYPE where \
-		{ showsPrec d (TYPE x) = showParen (d > 10) $ \
-			showString "TYPE " . shows x \
-		}; \
-		\
-	instance String.IsString TYPE where \
-		{ fromString = mk/**/TYPE/**/_ . TL.pack }; \
-		\
-	instance Variable TYPE where \
-		{ toVariant = toVariant . str/**/TYPE \
-		; fromVariant = (mk/**/TYPE =<<) . fromVariant }; \
-		                                                \
-	mk/**/TYPE/**/_ :: Text -> TYPE; \
-	mk/**/TYPE/**/_ = mkUnsafe NAME mk/**/TYPE
-
-NAME_TYPE(BusName, "bus name")
-
-mkBusName :: Text -> Maybe BusName
-mkBusName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
-	c' = c ++ ['0'..'9']
-	parser = (unique <|> wellKnown) >> P.eof >> return (BusName s)
-	unique = P.char ':' >> elems c'
-	wellKnown = elems c
-	elems start = elem' start >> P.many1 (P.char '.' >> elem' start)
-	elem' start = P.oneOf start >> P.many (P.oneOf c')
-
-NAME_TYPE(InterfaceName, "interface name")
-
-mkInterfaceName :: Text -> Maybe InterfaceName
-mkInterfaceName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-	c' = c ++ ['0'..'9']
-	element = P.oneOf c >> P.many (P.oneOf c')
-	name = element >> P.many1 (P.char '.' >> element)
-	parser = name >> P.eof >> return (InterfaceName s)
-
-NAME_TYPE(ErrorName, "error name")
-
-mkErrorName :: Text -> Maybe ErrorName
-mkErrorName = fmap (ErrorName . strInterfaceName) . mkInterfaceName
-
-NAME_TYPE(MemberName, "member name")
-
-mkMemberName :: Text -> Maybe MemberName
-mkMemberName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-	c' = c ++ ['0'..'9']
-	name = P.oneOf c >> P.many (P.oneOf c')
-	parser = name >> P.eof >> return (MemberName s)
diff --git a/hs/DBus/Types/Internal.hs b/hs/DBus/Types/Internal.hs
new file mode 100644
--- /dev/null
+++ b/hs/DBus/Types/Internal.hs
@@ -0,0 +1,1215 @@
+
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE IncoherentInstances #-}
+
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module DBus.Types.Internal where
+import           Control.Monad (liftM, when, (>=>))
+import           Data.ByteString (ByteString)
+import qualified Data.ByteString
+import qualified Data.ByteString.Char8
+import qualified Data.ByteString.Lazy
+import qualified Data.ByteString.Unsafe
+import           Data.Int
+import           Data.List (intercalate)
+import qualified Data.Map
+import           Data.Map (Map)
+import qualified Data.String
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
+import qualified Data.Text.Lazy
+import qualified Data.Vector
+import           Data.Vector (Vector)
+import           Data.Word
+import qualified Foreign
+import           System.IO.Unsafe (unsafePerformIO)
+
+
+import qualified Text.ParserCombinators.Parsec as Parsec
+import           Text.ParserCombinators.Parsec ((<|>), oneOf)
+
+
+import           DBus.Util (void)
+
+
+data Type
+	= TypeBoolean
+	| TypeWord8
+	| TypeWord16
+	| TypeWord32
+	| TypeWord64
+	| TypeInt16
+	| TypeInt32
+	| TypeInt64
+	| TypeDouble
+	| TypeString
+	| TypeSignature
+	| TypeObjectPath
+	| TypeVariant
+	| TypeArray Type
+	| TypeDictionary Type Type
+	| TypeStructure [Type]
+	deriving (Eq, Ord)
+
+instance Show Type where
+	showsPrec d = showString . showType (d > 10)
+
+showType :: Bool -> Type -> String
+showType paren t = case t of
+	TypeBoolean -> "Bool"
+	TypeWord8 -> "Word8"
+	TypeWord16 -> "Word16"
+	TypeWord32 -> "Word32"
+	TypeWord64 -> "Word64"
+	TypeInt16 -> "Int16"
+	TypeInt32 -> "Int32"
+	TypeInt64 -> "Int64"
+	TypeDouble -> "Double"
+	TypeString -> "String"
+	TypeSignature -> "Signature"
+	TypeObjectPath -> "ObjectPath"
+	TypeVariant -> "Variant"
+	TypeArray t' -> concat ["[", show t', "]"]
+	TypeDictionary kt vt -> showParen paren (
+	                        showString "Map " .
+	                        shows kt .
+	                        showString " " .
+	                        showsPrec 11 vt) ""
+	TypeStructure ts -> concat
+		["(", intercalate ", " (map show ts), ")"]
+
+newtype Signature = Signature [Type]
+	deriving (Eq, Ord)
+
+signatureTypes :: Signature -> [Type]
+signatureTypes (Signature types) = types
+
+instance Show Signature where
+	showsPrec d sig = showParen (d > 10) $
+		showString "Signature " .
+		shows (signatureText sig)
+
+signatureText :: Signature -> Text
+signatureText = Data.Text.Encoding.decodeUtf8
+              . Data.ByteString.Char8.pack
+              . concatMap typeCode
+              . signatureTypes
+
+typeCode :: Type -> String
+typeCode TypeBoolean    = "b"
+typeCode TypeWord8      = "y"
+typeCode TypeWord16     = "q"
+typeCode TypeWord32     = "u"
+typeCode TypeWord64     = "t"
+typeCode TypeInt16      = "n"
+typeCode TypeInt32      = "i"
+typeCode TypeInt64      = "x"
+typeCode TypeDouble     = "d"
+typeCode TypeString     = "s"
+typeCode TypeSignature  = "g"
+typeCode TypeObjectPath = "o"
+typeCode TypeVariant    = "v"
+typeCode (TypeArray t)  = 'a' : typeCode t
+typeCode (TypeDictionary kt vt) = concat
+	[ "a{", typeCode kt , typeCode vt, "}"]
+
+typeCode (TypeStructure ts) = concat
+	["(", concatMap typeCode ts, ")"]
+
+instance Data.String.IsString Signature where
+	fromString = signature_ . Data.Text.pack
+
+signature :: Text -> Maybe Signature
+signature text = parseSignature bytes where
+	bytes = Data.Text.Encoding.encodeUtf8 text
+
+signature_ :: Text -> Signature
+signature_ = tryParse "signature" signature
+
+parseSignature :: ByteString -> Maybe Signature
+parseSignature bytes =
+	case Data.ByteString.length bytes of
+		0 -> Just (Signature [])
+		1 -> parseSigFast bytes
+		len | len <= 255 -> parseSigFull bytes
+		_ -> Nothing
+
+checkSignature :: [Type] -> Maybe Signature
+checkSignature = check where
+	check ts = if sumLen ts > 255
+		then Nothing
+		else Just (Signature ts)
+	sumLen :: [Type] -> Int
+	sumLen = sum . map len
+
+	len (TypeArray t) = 1 + len t
+	len (TypeDictionary kt vt) = 3 + len kt + len vt
+	len (TypeStructure ts) = 2 + sumLen ts
+	len _ = 1
+
+parseSigFast :: ByteString -> Maybe Signature
+parseSigFast bytes =
+	let byte = Data.ByteString.head bytes in
+	parseAtom byte
+		(\t -> Just (Signature [t]))
+		(case byte of
+			0x76 -> Just (Signature [TypeVariant])
+			_ -> Nothing)
+
+parseAtom :: Word8 -> (Type -> a) -> a -> a
+parseAtom byte yes no = case byte of
+	0x62 -> yes TypeBoolean
+	0x6E -> yes TypeInt16
+	0x69 -> yes TypeInt32
+	0x78 -> yes TypeInt64
+	0x79 -> yes TypeWord8
+	0x71 -> yes TypeWord16
+	0x75 -> yes TypeWord32
+	0x74 -> yes TypeWord64
+	0x64 -> yes TypeDouble
+	0x73 -> yes TypeString
+	0x67 -> yes TypeSignature
+	0x6F -> yes TypeObjectPath
+	_ -> no
+
+parseSigFull :: ByteString -> Maybe Signature
+parseSigFull bytes = unsafePerformIO io where
+	io = Data.ByteString.Unsafe.unsafeUseAsCStringLen bytes castBuf
+	castBuf (ptr, len) = parseSigBuf (Foreign.castPtr ptr, len)
+	parseSigBuf (buf, len) = mainLoop [] 0 where
+
+		mainLoop acc ii | ii >= len = return (Just (Signature (reverse acc)))
+		mainLoop acc ii = do
+			c <- Foreign.peekElemOff buf ii
+			let next t = mainLoop (t : acc) (ii + 1)
+			parseAtom c next $ case c of
+				0x76 -> next TypeVariant
+				0x28 -> do -- '('
+					mt <- structure (ii + 1)
+					case mt of
+						Just (ii', t) -> mainLoop (t : acc) ii'
+						Nothing -> return Nothing
+				0x61 -> do -- 'a'
+					mt <- array (ii + 1)
+					case mt of
+						Just (ii', t) -> mainLoop (t : acc) ii'
+						Nothing -> return Nothing
+				_ -> return Nothing
+
+		structure :: Int -> IO (Maybe (Int, Type))
+		structure = loop [] where
+			loop _ ii | ii >= len = return Nothing
+			loop acc ii = do
+				c <- Foreign.peekElemOff buf ii
+				let next t = loop (t : acc) (ii + 1)
+				parseAtom c next $ case c of
+					0x76 -> next TypeVariant
+					0x28 -> do -- '('
+						mt <- structure (ii + 1)
+						case mt of
+							Just (ii', t) -> loop (t : acc) ii'
+							Nothing -> return Nothing
+					0x61 -> do -- 'a'
+						mt <- array (ii + 1)
+						case mt of
+							Just (ii', t) -> loop (t : acc) ii'
+							Nothing -> return Nothing
+					-- ')'
+					0x29 -> return $ case acc of
+						[] -> Nothing
+						_ -> Just $ (ii + 1, TypeStructure (reverse acc))
+					_ -> return Nothing
+
+		array :: Int -> IO (Maybe (Int, Type))
+		array ii | ii >= len = return Nothing
+		array ii = do
+			c <- Foreign.peekElemOff buf ii
+			let next t = return $ Just (ii + 1, TypeArray t)
+			parseAtom c next $ case c of
+				0x76 -> next TypeVariant
+				0x7B -> dict (ii + 1) -- '{'
+				0x28 -> do -- '('
+					mt <- structure (ii + 1)
+					case mt of
+						Just (ii', t) -> return $ Just (ii', TypeArray t)
+						Nothing -> return Nothing
+				0x61 -> do -- 'a'
+					mt <- array (ii + 1)
+					case mt of
+						Just (ii', t) -> return $ Just (ii', TypeArray t)
+						Nothing -> return Nothing
+				_ -> return Nothing
+
+		dict :: Int -> IO (Maybe (Int, Type))
+		dict ii | ii + 1 >= len = return Nothing
+		dict ii = do
+			c1 <- Foreign.peekElemOff buf ii
+			c2 <- Foreign.peekElemOff buf (ii + 1)
+			
+			let next t = return (Just (ii + 2, t))
+			mt2 <- parseAtom c2 next $ case c2 of
+				0x76 -> next TypeVariant
+				0x28 -> structure (ii + 2) -- '('
+				0x61 -> array (ii + 2) -- 'a'
+				_ -> return Nothing
+			
+			case mt2 of
+				Nothing -> return Nothing
+				Just (ii', t2) -> if ii' >= len
+					then return Nothing
+					else do
+						c3 <- Foreign.peekElemOff buf ii'
+						return $ do
+							if c3 == 0x7D then Just () else Nothing
+							t1 <- parseAtom c1 Just Nothing
+							Just (ii' + 1, TypeDictionary t1 t2)
+
+class IsVariant a where
+	toVariant :: a -> Variant
+	fromVariant :: Variant -> Maybe a
+
+class IsVariant a => IsValue a where
+	typeOf :: a -> Type
+	toValue :: a -> Value
+	fromValue :: Value -> Maybe a
+
+class IsValue a => IsAtom a where
+	toAtom :: a -> Atom
+	fromAtom :: Atom -> Maybe a
+
+
+-- | 'Variant's may contain any other built&#8208;in D&#8208;Bus value. Besides
+-- representing native @VARIANT@ values, they allow type&#8208;safe storage and
+-- deconstruction of heterogeneous collections.
+
+newtype Variant = Variant Value
+	deriving (Eq)
+
+data Value
+	= ValueAtom Atom
+	| ValueVariant Variant
+	| ValueBytes ByteString
+	| ValueVector Type (Vector Value)
+	| ValueMap Type Type (Map Atom Value)
+	| ValueStructure [Value]
+	deriving (Show)
+
+data Atom
+	= AtomBool Bool
+	| AtomWord8 Word8
+	| AtomWord16 Word16
+	| AtomWord32 Word32
+	| AtomWord64 Word64
+	| AtomInt16 Int16
+	| AtomInt32 Int32
+	| AtomInt64 Int64
+	| AtomDouble Double
+	| AtomText Text
+	| AtomSignature Signature
+	| AtomObjectPath ObjectPath
+	deriving (Show, Eq, Ord)
+
+instance Eq Value where
+	(==) (ValueBytes x) y = case y of
+		ValueBytes y' -> x == y'
+		ValueVector TypeWord8 y' -> x == vectorToBytes y'
+		_ -> False
+	
+	(==) (ValueVector TypeWord8 x) y = case y of
+		ValueBytes y' -> vectorToBytes x == y'
+		ValueVector TypeWord8 y' -> x == y'
+		_ -> False
+	
+	(==) (ValueAtom x) (ValueAtom y) = x == y
+	(==) (ValueVariant x) (ValueVariant y) = x == y
+	(==) (ValueVector tx x) (ValueVector ty y) = tx == ty && x == y
+	(==) (ValueMap ktx vtx x) (ValueMap kty vty y) = ktx == kty && vtx == vty && x == y
+	(==) (ValueStructure x) (ValueStructure y) = x == y
+	(==) _ _ = False
+
+showAtom :: Bool -> Atom -> String
+showAtom _ (AtomBool x) = show x
+showAtom _ (AtomWord8 x) = show x
+showAtom _ (AtomWord16 x) = show x
+showAtom _ (AtomWord32 x) = show x
+showAtom _ (AtomWord64 x) = show x
+showAtom _ (AtomInt16 x) = show x
+showAtom _ (AtomInt32 x) = show x
+showAtom _ (AtomInt64 x) = show x
+showAtom _ (AtomDouble x) = show x
+showAtom _ (AtomText x) = show x
+showAtom p (AtomSignature x) = showsPrec (if p then 11 else 0) x ""
+showAtom p (AtomObjectPath x) = showsPrec (if p then 11 else 0) x ""
+
+showValue :: Bool -> Value -> String
+showValue p (ValueAtom x) = showAtom p x
+showValue p (ValueVariant x) = showsPrec (if p then 11 else 0) x ""
+showValue _ (ValueBytes xs) = 'b' : show xs
+showValue _ (ValueVector TypeWord8 xs) = 'b' : show (vectorToBytes xs)
+showValue _ (ValueVector _ xs) = showThings "[" (showValue False) "]" (Data.Vector.toList xs)
+showValue _ (ValueMap _ _ xs) = showThings "{" showPair "}" (Data.Map.toList xs) where
+	showPair (k, v) = showAtom False k ++ ": " ++ showValue False v
+showValue _ (ValueStructure xs) = showThings "(" (showValue False) ")" xs
+
+showThings :: String -> (a -> String) -> String -> [a] -> String
+showThings a s z xs = a ++ intercalate ", " (map s xs) ++ z
+
+vectorToBytes :: Vector Value -> ByteString
+vectorToBytes = Data.ByteString.pack
+              . Data.Vector.toList
+              . Data.Vector.map (\(ValueAtom (AtomWord8 x)) -> x)
+
+instance Show Variant where
+	showsPrec d (Variant x) = showParen (d > 10) $
+		showString "Variant " .  showString (showValue True x)
+
+
+-- | Every variant is strongly&#8208;typed; that is, the type of its contained
+-- value is known at all times. This function retrieves that type, so that
+-- the correct cast can be used to retrieve the value.
+
+variantType :: Variant -> Type
+variantType (Variant val) = valueType val
+
+valueType :: Value -> Type
+valueType (ValueAtom x) = atomType x
+valueType (ValueVariant _) = TypeVariant
+valueType (ValueVector t _) = TypeArray t
+valueType (ValueBytes _) = TypeArray TypeWord8
+valueType (ValueMap kt vt _) = TypeDictionary kt vt
+valueType (ValueStructure vs) = TypeStructure (map valueType vs)
+
+atomType :: Atom -> Type
+atomType (AtomBool _) = TypeBoolean
+atomType (AtomWord8 _) = TypeWord8
+atomType (AtomWord16 _) = TypeWord16
+atomType (AtomWord32 _) = TypeWord32
+atomType (AtomWord64 _) = TypeWord64
+atomType (AtomInt16 _) = TypeInt16
+atomType (AtomInt32 _) = TypeInt32
+atomType (AtomInt64 _) = TypeInt64
+atomType (AtomDouble _) = TypeDouble
+atomType (AtomText _) = TypeString
+atomType (AtomSignature _) = TypeSignature
+atomType (AtomObjectPath _) = TypeObjectPath
+
+#define IS_ATOM(HsType, AtomCons, TypeCons) \
+	instance IsAtom HsType where \
+	{ toAtom = AtomCons \
+	; fromAtom (AtomCons x) = Just x \
+	; fromAtom _ = Nothing \
+	}; \
+	instance IsValue HsType where \
+	{ typeOf _ = TypeCons \
+	; toValue = ValueAtom . toAtom \
+	; fromValue (ValueAtom x) = fromAtom x \
+	; fromValue _ = Nothing \
+	}; \
+	instance IsVariant HsType where \
+	{ toVariant = Variant . toValue \
+	; fromVariant (Variant val) = fromValue val \
+	}
+
+IS_ATOM(Bool,       AtomBool,       TypeBoolean)
+IS_ATOM(Word8,      AtomWord8,      TypeWord8)
+IS_ATOM(Word16,     AtomWord16,     TypeWord16)
+IS_ATOM(Word32,     AtomWord32,     TypeWord32)
+IS_ATOM(Word64,     AtomWord64,     TypeWord64)
+IS_ATOM(Int16,      AtomInt16,      TypeInt16)
+IS_ATOM(Int32,      AtomInt32,      TypeInt32)
+IS_ATOM(Int64,      AtomInt64,      TypeInt64)
+IS_ATOM(Double,     AtomDouble,     TypeDouble)
+IS_ATOM(Text,       AtomText,       TypeString)
+IS_ATOM(Signature,  AtomSignature,  TypeSignature)
+IS_ATOM(ObjectPath, AtomObjectPath, TypeObjectPath)
+
+instance IsValue Variant where
+	typeOf _ = TypeVariant
+	toValue = ValueVariant
+	fromValue (ValueVariant x) = Just x
+	fromValue _ = Nothing
+
+instance IsVariant Variant where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance IsAtom Data.Text.Lazy.Text where
+	toAtom = toAtom . Data.Text.Lazy.toStrict
+	fromAtom = fmap Data.Text.Lazy.fromStrict . fromAtom
+
+instance IsValue Data.Text.Lazy.Text where
+	typeOf _ = TypeString
+	toValue = ValueAtom . toAtom
+	fromValue (ValueAtom x) = fromAtom x
+	fromValue _ = Nothing
+
+instance IsVariant Data.Text.Lazy.Text where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance IsAtom String where
+	toAtom = toAtom . Data.Text.pack
+	fromAtom = fmap Data.Text.unpack . fromAtom
+
+instance IsValue String where
+	typeOf _ = TypeString
+	toValue = ValueAtom . toAtom
+	fromValue (ValueAtom x) = fromAtom x
+	fromValue _ = Nothing
+
+instance IsVariant String where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance IsValue a => IsValue (Vector a) where
+	typeOf v = TypeArray (vectorItemType v)
+	toValue v = ValueVector (vectorItemType v) (Data.Vector.map toValue v)
+	fromValue (ValueVector _ v) = Data.Vector.mapM fromValue v
+	fromValue _ = Nothing
+
+vectorItemType :: IsValue a => Vector a -> Type
+vectorItemType v = typeOf (undefined `asTypeOf` Data.Vector.head v)
+
+instance IsValue a => IsVariant (Vector a) where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance IsValue a => IsValue [a] where
+	typeOf v = TypeArray (typeOf (undefined `asTypeOf` head v))
+	toValue = toValue . Data.Vector.fromList
+	fromValue = fmap Data.Vector.toList . fromValue
+
+instance IsValue a => IsVariant [a] where
+	toVariant = toVariant . Data.Vector.fromList
+	fromVariant = fmap Data.Vector.toList . fromVariant
+
+instance IsValue ByteString where
+	typeOf _ = TypeArray TypeWord8
+	toValue = ValueBytes
+	fromValue (ValueBytes bs) = Just bs
+	fromValue (ValueVector TypeWord8 v) = Just (vectorToBytes v)
+	fromValue _ = Nothing
+
+instance IsVariant ByteString where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance IsValue Data.ByteString.Lazy.ByteString where
+	typeOf _ = TypeArray TypeWord8
+	toValue = toValue
+	        . Data.ByteString.concat 
+	        . Data.ByteString.Lazy.toChunks
+	fromValue = fmap (\bs -> Data.ByteString.Lazy.fromChunks [bs])
+	          . fromValue
+
+instance IsVariant Data.ByteString.Lazy.ByteString where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance (Ord k, IsAtom k, IsValue v) => IsValue (Map k v) where
+	typeOf m = TypeDictionary kt vt where
+		(kt, vt) = mapItemType m
+	
+	toValue m = ValueMap kt vt (bimap box m) where
+		(kt, vt) = mapItemType m
+		box k v = (toAtom k, toValue v)
+	
+	fromValue (ValueMap _ _ m) = bimapM unbox m where
+		unbox k v = do
+			k' <- fromAtom k
+			v' <- fromValue v
+			return (k', v')
+	fromValue _ = Nothing
+
+bimap :: Ord k' => (k -> v -> (k', v')) -> Map k v -> Map k' v'
+bimap f = Data.Map.fromList . map (\(k, v) -> f k v) . Data.Map.toList
+
+bimapM :: (Monad m, Ord k') => (k -> v -> m (k', v')) -> Map k v -> m (Map k' v')
+bimapM f = liftM Data.Map.fromList . mapM (\(k, v) -> f k v) . Data.Map.toList
+
+mapItemType :: (IsValue k, IsValue v) => Map k v -> (Type, Type)
+mapItemType m = (typeOf k, typeOf v) where
+	mapItem :: Map k v -> (k, v)
+	mapItem _ = (undefined, undefined)
+	(k, v) = mapItem m
+
+instance (Ord k, IsAtom k, IsValue v) => IsVariant (Map k v) where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+
+instance (IsValue a1, IsValue a2) => IsValue (a1, a2) where
+	typeOf ~(a1, a2) = TypeStructure [typeOf a1, typeOf a2]
+	toValue (a1, a2) = ValueStructure [toValue a1, toValue a2]
+	fromValue (ValueStructure [a1, a2]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		return (a1', a2')
+	fromValue _ = Nothing
+
+instance (IsVariant a1, IsVariant a2) => IsVariant (a1, a2) where
+	toVariant (a1, a2) = Variant (ValueStructure [varToVal a1, varToVal a2])
+	fromVariant (Variant (ValueStructure [a1, a2])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		return (a1', a2')
+	fromVariant _ = Nothing
+
+varToVal :: IsVariant a => a -> Value
+varToVal a = case toVariant a of
+	Variant val -> val
+
+newtype ObjectPath = ObjectPath Text
+	deriving (Eq, Ord, Show)
+
+objectPathText :: ObjectPath -> Text
+objectPathText (ObjectPath text) = text
+
+objectPath :: Text -> Maybe ObjectPath
+objectPath text = do
+	runParser parseObjectPath text
+	return (ObjectPath text)
+
+objectPath_ :: Text -> ObjectPath
+objectPath_ = tryParse "object path" objectPath
+
+instance Data.String.IsString ObjectPath where
+	fromString = objectPath_ . Data.Text.pack
+
+parseObjectPath :: Parsec.Parser ()
+parseObjectPath = root <|> object where
+	root = Parsec.try $ do
+		slash
+		Parsec.eof
+	
+	object = do
+		slash
+		skipSepBy1 element slash
+		Parsec.eof
+	
+	element = Parsec.skipMany1 (oneOf chars)
+	
+	slash = void (Parsec.char '/')
+	chars = concat [ ['a'..'z']
+	               , ['A'..'Z']
+	               , ['0'..'9']
+	               , "_"]
+
+newtype InterfaceName = InterfaceName Text
+	deriving (Eq, Ord, Show)
+
+interfaceNameText :: InterfaceName -> Text
+interfaceNameText (InterfaceName text) = text
+
+interfaceName :: Text -> Maybe InterfaceName
+interfaceName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseInterfaceName text
+	return (InterfaceName text)
+
+interfaceName_ :: Text -> InterfaceName
+interfaceName_ = tryParse "interface name" interfaceName
+
+instance Data.String.IsString InterfaceName where
+	fromString = interfaceName_ . Data.Text.pack
+
+instance IsVariant InterfaceName where
+	toVariant = toVariant . interfaceNameText
+	fromVariant = fromVariant >=> interfaceName
+
+parseInterfaceName :: Parsec.Parser ()
+parseInterfaceName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
+	alphanum = alpha ++ ['0'..'9']
+	element = do
+		void (oneOf alpha)
+		Parsec.skipMany (oneOf alphanum)
+	name = do
+		element
+		void (Parsec.char '.')
+		skipSepBy1 element (Parsec.char '.')
+
+newtype MemberName = MemberName Text
+	deriving (Eq, Ord, Show)
+
+memberNameText :: MemberName -> Text
+memberNameText (MemberName text) = text
+
+memberName :: Text -> Maybe MemberName
+memberName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseMemberName text
+	return (MemberName text)
+
+memberName_ :: Text -> MemberName
+memberName_ = tryParse "member name" memberName
+
+instance Data.String.IsString MemberName where
+	fromString = memberName_ . Data.Text.pack
+
+instance IsVariant MemberName where
+	toVariant = toVariant . memberNameText
+	fromVariant = fromVariant >=> memberName
+
+parseMemberName :: Parsec.Parser ()
+parseMemberName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
+	alphanum = alpha ++ ['0'..'9']
+	name = do
+		void (oneOf alpha)
+		Parsec.skipMany (oneOf alphanum)
+
+newtype ErrorName = ErrorName Text
+	deriving (Eq, Ord, Show)
+
+errorNameText :: ErrorName -> Text
+errorNameText (ErrorName text) = text
+
+errorName :: Text -> Maybe ErrorName
+errorName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseInterfaceName text
+	return (ErrorName text)
+
+errorName_ :: Text -> ErrorName
+errorName_ = tryParse "error name" errorName
+
+instance Data.String.IsString ErrorName where
+	fromString = errorName_ . Data.Text.pack
+
+instance IsVariant ErrorName where
+	toVariant = toVariant . errorNameText
+	fromVariant = fromVariant >=> errorName
+
+newtype BusName = BusName Text
+	deriving (Eq, Ord, Show)
+
+busNameText :: BusName -> Text
+busNameText (BusName text) = text
+
+busName :: Text -> Maybe BusName
+busName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseBusName text
+	return (BusName text)
+
+busName_ :: Text -> BusName
+busName_ = tryParse "bus name" busName
+
+instance Data.String.IsString BusName where
+	fromString = busName_ . Data.Text.pack
+
+instance IsVariant BusName where
+	toVariant = toVariant . busNameText
+	fromVariant = fromVariant >=> busName
+
+parseBusName :: Parsec.Parser ()
+parseBusName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
+	alphanum = alpha ++ ['0'..'9']
+	
+	name = unique <|> wellKnown
+	unique = do
+		void (Parsec.char ':')
+		elements alphanum
+	
+	wellKnown = elements alpha
+	
+	elements start = do
+		element start
+		Parsec.skipMany1 $ do
+			void (Parsec.char '.')
+			element start
+	
+	element start = do
+		void (oneOf start)
+		Parsec.skipMany (oneOf alphanum)
+
+newtype Structure = Structure [Value]
+	deriving (Eq)
+
+instance Show Structure where
+	show (Structure xs) = showValue True (ValueStructure xs)
+
+instance IsVariant Structure where
+	toVariant (Structure xs) = Variant (ValueStructure xs)
+	fromVariant (Variant (ValueStructure xs)) = Just (Structure xs)
+	fromVariant _ = Nothing
+
+structureItems :: Structure -> [Variant]
+structureItems (Structure xs) = map Variant xs
+
+data Array
+	= Array Type (Vector Value)
+	| ArrayBytes ByteString
+
+instance Show Array where
+	show (Array t xs) = showValue True (ValueVector t xs)
+	show (ArrayBytes xs) = showValue True (ValueBytes xs)
+
+instance Eq Array where
+	x == y = norm x == norm y where
+		norm (Array TypeWord8 xs) = Left (vectorToBytes xs)
+		norm (Array t xs) = Right (t, xs)
+		norm (ArrayBytes xs) = Left xs
+
+instance IsVariant Array where
+	toVariant (Array t xs) = Variant (ValueVector t xs)
+	toVariant (ArrayBytes bs) = Variant (ValueBytes bs)
+	fromVariant (Variant (ValueVector t xs)) = Just (Array t xs)
+	fromVariant (Variant (ValueBytes bs)) = Just (ArrayBytes bs)
+	fromVariant _ = Nothing
+
+arrayItems :: Array -> [Variant]
+arrayItems (Array _ xs) = map Variant (Data.Vector.toList xs)
+arrayItems (ArrayBytes bs) = map toVariant (Data.ByteString.unpack bs)
+
+data Dictionary = Dictionary Type Type (Map Atom Value)
+	deriving (Eq)
+
+instance Show Dictionary where
+	show (Dictionary kt vt xs) = showValue True (ValueMap kt vt xs)
+
+instance IsVariant Dictionary where
+	toVariant (Dictionary kt vt xs) = Variant (ValueMap kt vt xs)
+	fromVariant (Variant (ValueMap kt vt xs)) = Just (Dictionary kt vt xs)
+	fromVariant _ = Nothing
+
+dictionaryItems :: Dictionary -> [(Variant, Variant)]
+dictionaryItems (Dictionary _ _ xs) = do
+	(k, v) <- Data.Map.toList xs
+	return (Variant (ValueAtom k), Variant v)
+
+instance (IsValue a1, IsValue a2, IsValue a3) => IsValue (a1, a2, a3) where
+	typeOf ~(a1, a2, a3) = TypeStructure [typeOf a1, typeOf a2, typeOf a3]
+	toValue (a1, a2, a3) = ValueStructure [toValue a1, toValue a2, toValue a3]
+	fromValue (ValueStructure [a1, a2, a3]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		return (a1', a2', a3')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4) => IsValue (a1, a2, a3, a4) where
+	typeOf ~(a1, a2, a3, a4) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4]
+	toValue (a1, a2, a3, a4) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4]
+	fromValue (ValueStructure [a1, a2, a3, a4]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		return (a1', a2', a3', a4')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5) => IsValue (a1, a2, a3, a4, a5) where
+	typeOf ~(a1, a2, a3, a4, a5) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5]
+	toValue (a1, a2, a3, a4, a5) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		return (a1', a2', a3', a4', a5')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6) => IsValue (a1, a2, a3, a4, a5, a6) where
+	typeOf ~(a1, a2, a3, a4, a5, a6) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6]
+	toValue (a1, a2, a3, a4, a5, a6) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		return (a1', a2', a3', a4', a5', a6')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7) => IsValue (a1, a2, a3, a4, a5, a6, a7) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7]
+	toValue (a1, a2, a3, a4, a5, a6, a7) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		return (a1', a2', a3', a4', a5', a6', a7')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		return (a1', a2', a3', a4', a5', a6', a7', a8')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13, typeOf a14]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13, toValue a14]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		a14' <- fromValue a14
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14, IsValue a15) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13, typeOf a14, typeOf a15]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13, toValue a14, toValue a15]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		a14' <- fromValue a14
+		a15' <- fromValue a15
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14', a15')
+	fromValue _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3) => IsVariant (a1, a2, a3) where
+	toVariant (a1, a2, a3) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3])
+	fromVariant (Variant (ValueStructure [a1, a2, a3])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		return (a1', a2', a3')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4) => IsVariant (a1, a2, a3, a4) where
+	toVariant (a1, a2, a3, a4) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		return (a1', a2', a3', a4')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5) => IsVariant (a1, a2, a3, a4, a5) where
+	toVariant (a1, a2, a3, a4, a5) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		return (a1', a2', a3', a4', a5')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6) => IsVariant (a1, a2, a3, a4, a5, a6) where
+	toVariant (a1, a2, a3, a4, a5, a6) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		return (a1', a2', a3', a4', a5', a6')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7) => IsVariant (a1, a2, a3, a4, a5, a6, a7) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		return (a1', a2', a3', a4', a5', a6', a7')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		return (a1', a2', a3', a4', a5', a6', a7', a8')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13, varToVal a14])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		a14' <- (fromVariant . Variant) a14
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14, IsVariant a15) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13, varToVal a14, varToVal a15])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		a14' <- (fromVariant . Variant) a14
+		a15' <- (fromVariant . Variant) a15
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14', a15')
+	fromVariant _ = Nothing
+
+
+skipSepBy1 :: Parsec.Parser a -> Parsec.Parser b -> Parsec.Parser ()
+skipSepBy1 p sep = do
+	void p
+	Parsec.skipMany (sep >> p)
+
+runParser :: Parsec.Parser a -> Text -> Maybe a
+runParser parser text = case Parsec.parse parser "" (Data.Text.unpack text) of
+	Left _ -> Nothing
+	Right a -> Just a
+
+tryParse :: String -> (Text -> Maybe a) -> Text -> a
+tryParse label parse text = case parse text of
+	Just x -> x
+	Nothing -> error ("Invalid " ++ label ++ ": " ++ show text)
diff --git a/hs/DBus/UUID.hs b/hs/DBus/UUID.hs
deleted file mode 100644
--- a/hs/DBus/UUID.hs
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-module DBus.UUID
-	( UUID
-	, toHex
-	, fromHex
-	) where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-newtype UUID = UUID Text -- TODO: (Word64, Word64)?
-	deriving (Eq)
-
-instance Show UUID where
-	showsPrec d uuid = showParen (d > 10) $
-		showString "UUID " . shows (toHex uuid)
-
-toHex :: UUID -> Text
-toHex (UUID text) = text
-
-fromHex :: Text -> Maybe UUID
-fromHex text = if validUUID text
-	then Just $ UUID text
-	else Nothing
-
-validUUID :: Text -> Bool
-validUUID text = valid where
-	valid = and [TL.length text == 32, TL.all validChar text]
-	validChar c = or
-		[ c >= '0' && c <= '9'
-		, c >= 'a' && c <= 'f'
-		, c >= 'A' && c <= 'F'
-		]
diff --git a/hs/DBus/Util.hs b/hs/DBus/Util.hs
--- a/hs/DBus/Util.hs
+++ b/hs/DBus/Util.hs
@@ -1,6 +1,6 @@
 
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,34 +15,20 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-module DBus.Util where
-import Text.ParserCombinators.Parsec (Parser, parse)
+module DBus.Util
+	( hexToInt
+	, maybeIndex
+	, readUntil
+	, dropEnd
+	, void
+	, untilM
+	) where
 import Data.Char (digitToInt)
 import Data.List (isPrefixOf)
 
-checkLength :: Int -> String -> Maybe String
-checkLength length' s | length s <= length' = Just s
-checkLength _ _ = Nothing
-
-parseMaybe :: Parser a -> String -> Maybe a
-parseMaybe p = either (const Nothing) Just . parse p ""
-
-mkUnsafe :: Show a => String -> (a -> Maybe b) -> a -> b
-mkUnsafe label f x = case f x of
-	Just x' -> x'
-	Nothing -> error $ "Invalid " ++ label ++ ": " ++ show x
-
 hexToInt :: String -> Int
 hexToInt = foldl ((+) . (16 *)) 0 . map digitToInt
 
-eitherToMaybe :: Either a b -> Maybe b
-eitherToMaybe (Left  _) = Nothing
-eitherToMaybe (Right x) = Just x
-
-fromRight :: Either a b -> b
-fromRight (Right x) = x
-fromRight _ = error "DBus.Util.fromRight: Left"
-
 maybeIndex :: [a] -> Int -> Maybe a
 maybeIndex (x:_ ) 0         = Just x
 maybeIndex (_:xs) n | n > 0 = maybeIndex xs (n - 1)
@@ -66,3 +52,13 @@
 
 void :: Monad m => m a -> m ()
 void m = m >> return ()
+
+untilM :: Monad m => m Bool -> m a -> m [a]
+untilM test comp = do
+	done <- test
+	if done
+		then return []
+		else do
+			x <- comp
+			xs <- untilM test comp
+			return (x:xs)
diff --git a/hs/DBus/Util/MonadError.hs b/hs/DBus/Util/MonadError.hs
--- a/hs/DBus/Util/MonadError.hs
+++ b/hs/DBus/Util/MonadError.hs
@@ -1,6 +1,6 @@
 
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
diff --git a/hs/DBus/Wire.hs b/hs/DBus/Wire.hs
--- a/hs/DBus/Wire.hs
+++ b/hs/DBus/Wire.hs
@@ -1,6 +1,6 @@
 
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -15,19 +15,11 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-module DBus.Wire (
-
-	  Endianness (..)
-
-	, MarshalError (..)
-
-	, UnmarshalError (..)
-
+module DBus.Wire
+	( Endianness (..)
+	, MarshalError
+	, UnmarshalError
 	, marshalMessage
-
 	, unmarshalMessage
-
 	) where
 import DBus.Wire.Internal
-import DBus.Wire.Marshal
-import DBus.Wire.Unmarshal
diff --git a/hs/DBus/Wire/Internal.hs b/hs/DBus/Wire/Internal.hs
--- a/hs/DBus/Wire/Internal.hs
+++ b/hs/DBus/Wire/Internal.hs
@@ -1,6 +1,7 @@
 
+{-# LANGUAGE OverloadedStrings #-}
 
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -16,52 +17,739 @@
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 module DBus.Wire.Internal where
-import Data.Word (Word8, Word64)
-import qualified DBus.Types as T
+import Control.Monad (liftM, when, unless)
 
+import qualified Data.Binary.Builder
+import qualified Data.Binary.Get
+import           Data.Binary.Put (runPut)
+import           Data.Bits ((.&.), (.|.))
+import qualified Data.ByteString
+import           Data.ByteString (ByteString)
+import qualified Data.ByteString.Char8
+import qualified Data.ByteString.Lazy
+import           Data.Int (Int16, Int32, Int64)
+import qualified Data.Map
+import           Data.Map (Map)
+import           Data.Maybe (fromJust, listToMaybe, fromMaybe)
+import qualified Data.Set
+import           Data.Set (Set)
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
+import qualified Data.Vector
+import           Data.Vector (Vector)
+import           Data.Word (Word8, Word16, Word32, Word64)
+
+import qualified Data.Binary.IEEE754
+
+import           DBus.Message.Internal
+import           DBus.Types.Internal
+import           DBus.Util (void, untilM)
+import qualified DBus.Util.MonadError as E
+
+
 data Endianness = LittleEndian | BigEndian
 	deriving (Show, Eq)
 
 encodeEndianness :: Endianness -> Word8
-encodeEndianness LittleEndian = 108
-encodeEndianness BigEndian    = 66
+encodeEndianness LittleEndian = 0x6C
+encodeEndianness BigEndian    = 0x42
 
 decodeEndianness :: Word8 -> Maybe Endianness
-decodeEndianness 108 = Just LittleEndian
-decodeEndianness 66  = Just BigEndian
-decodeEndianness _   = Nothing
+decodeEndianness 0x6C = Just LittleEndian
+decodeEndianness 0x42 = Just BigEndian
+decodeEndianness _    = Nothing
 
-alignment :: T.Type -> Word8
+alignment :: Type -> Word8
+alignment TypeBoolean = 4
+alignment TypeWord8 = 1
+alignment TypeWord16 = 2
+alignment TypeWord32 = 4
+alignment TypeWord64 = 8
+alignment TypeInt16 = 2
+alignment TypeInt32 = 4
+alignment TypeInt64 = 8
+alignment TypeDouble = 8
+alignment TypeString = 4
+alignment TypeObjectPath = 4
+alignment TypeSignature = 1
+alignment (TypeArray _) = 4
+alignment (TypeDictionary _ _) = 4
+alignment (TypeStructure _) = 8
+alignment TypeVariant = 1
 
-alignment T.DBusByte    = 1
-alignment T.DBusWord16  = 2
-alignment T.DBusWord32  = 4
-alignment T.DBusWord64  = 8
-alignment T.DBusInt16   = 2
-alignment T.DBusInt32   = 4
-alignment T.DBusInt64   = 8
-alignment T.DBusDouble  = 8
+padding :: Word64 -> Word8 -> Word64
+padding current count = required where
+	count' = fromIntegral count
+	missing = mod current count'
+	required = if missing > 0
+		then count' - missing
+		else 0
 
-alignment T.DBusBoolean = 4
+data WireR s a
+	= WireRL String
+	| WireRR a {-# UNPACK #-} !s
 
-alignment T.DBusString     = 4
-alignment T.DBusObjectPath = 4
+newtype Wire s a = Wire
+	{ unWire :: Endianness -> s -> WireR s a
+	}
 
-alignment T.DBusSignature  = 1
+instance Monad (Wire s) where
+	{-# INLINE return #-}
+	return a = Wire (\_ s -> WireRR a s)
+	
+	{-# INLINE (>>=) #-}
+	m >>= k = Wire $ \e s -> case unWire m e s of
+		WireRL err -> WireRL err
+		WireRR a s' -> unWire (k a) e s'
+	
+	{-# INLINE (>>) #-}
+	m >> k = Wire $ \e s -> case unWire m e s of
+		WireRL err -> WireRL err
+		WireRR _ s' -> unWire k e s'
 
-alignment (T.DBusArray _) = 4
+throwError :: String -> Wire s a
+throwError err = Wire (\_ _ -> WireRL err)
 
-alignment (T.DBusDictionary _ _) = 4
+{-# INLINE getState #-}
+getState :: Wire s s
+getState = Wire (\_ s -> WireRR s s)
 
-alignment (T.DBusStructure _) = 8
+{-# INLINE putState #-}
+putState :: s -> Wire s ()
+putState s = Wire (\_ _ -> WireRR () s)
 
-alignment T.DBusVariant = 1
+{-# INLINE chooseEndian #-}
+chooseEndian :: a -> a -> Wire s a
+chooseEndian big little = Wire (\e s -> case e of
+	BigEndian -> WireRR big s
+	LittleEndian -> WireRR little s)
 
+type Marshal = Wire MarshalState
 
-padding :: Word64 -> Word8 -> Word64
-padding current count = required where
-	count' = fromIntegral count
-	missing = mod current count'
-	required = if missing > 0
-		then count' - missing
-		else 0
+newtype MarshalError = MarshalError Text
+	deriving (Show, Eq)
+
+data MarshalState = MarshalState
+	{-# UNPACK #-} !Data.Binary.Builder.Builder
+	{-# UNPACK #-} !Word64
+
+marshal :: Value -> Marshal ()
+marshal (ValueAtom x) = marshalAtom x
+marshal (ValueBytes xs) = marshalStrictBytes xs
+marshal (ValueVector t xs) = marshalVector t xs
+marshal (ValueMap kt vt xs) = marshalMap kt vt xs
+marshal (ValueStructure xs) = marshalStructure xs
+marshal (ValueVariant x) = marshalVariant x
+
+marshalAtom :: Atom -> Marshal ()
+marshalAtom (AtomWord8 x) = marshalWord8 x
+marshalAtom (AtomWord16 x) = marshalWord16 x
+marshalAtom (AtomWord32 x) = marshalWord32 x
+marshalAtom (AtomWord64 x) = marshalWord64 x
+marshalAtom (AtomInt16 x) = marshalInt16 x
+marshalAtom (AtomInt32 x) = marshalInt32 x
+marshalAtom (AtomInt64 x) = marshalInt64 x
+marshalAtom (AtomDouble x) = marshalDouble x
+marshalAtom (AtomBool x) = marshalBool x
+marshalAtom (AtomText x) = marshalText x
+marshalAtom (AtomObjectPath x) = marshalObjectPath x
+marshalAtom (AtomSignature x) = marshalSignature x
+
+appendB :: Word64 -> Data.Binary.Builder.Builder -> Marshal ()
+appendB size bytes = Wire (\_ (MarshalState builder count) -> let
+	builder' = Data.Binary.Builder.append builder bytes
+	count' = count + size
+	in WireRR () (MarshalState builder' count'))
+
+appendS :: ByteString -> Marshal ()
+appendS bytes = appendB
+	(fromIntegral (Data.ByteString.length bytes))
+	(Data.Binary.Builder.fromByteString bytes)
+
+appendL :: Data.ByteString.Lazy.ByteString -> Marshal ()
+appendL bytes = appendB
+	(fromIntegral (Data.ByteString.Lazy.length bytes))
+	(Data.Binary.Builder.fromLazyByteString bytes)
+
+pad :: Word8 -> Marshal ()
+pad count = do
+	(MarshalState _ existing) <- getState
+	let padding' = fromIntegral (padding existing count)
+	appendS (Data.ByteString.replicate padding' 0)
+
+marshalBuilder :: Word8
+               -> (a -> Data.Binary.Builder.Builder)
+               -> (a -> Data.Binary.Builder.Builder)
+               -> a -> Marshal ()
+marshalBuilder size be le x = do
+	builder <- chooseEndian (be x) (le x)
+	pad size
+	appendB (fromIntegral size) builder
+
+type Unmarshal = Wire UnmarshalState
+
+newtype UnmarshalError = UnmarshalError Text
+	deriving (Show, Eq)
+
+data UnmarshalState = UnmarshalState
+	{-# UNPACK #-} !ByteString
+	{-# UNPACK #-} !Word64
+
+unmarshal :: Type -> Unmarshal Value
+unmarshal TypeWord8 = liftM toValue unmarshalWord8
+unmarshal TypeWord16 = liftM toValue unmarshalWord16
+unmarshal TypeWord32 = liftM toValue unmarshalWord32
+unmarshal TypeWord64 = liftM toValue unmarshalWord64
+unmarshal TypeInt16 = liftM toValue unmarshalInt16
+unmarshal TypeInt32 = liftM toValue unmarshalInt32
+unmarshal TypeInt64 = liftM toValue unmarshalInt64
+unmarshal TypeDouble = liftM toValue unmarshalDouble
+unmarshal TypeBoolean = liftM toValue unmarshalBool
+unmarshal TypeString = liftM toValue unmarshalText
+unmarshal TypeObjectPath = liftM toValue unmarshalObjectPath
+unmarshal TypeSignature = liftM toValue unmarshalSignature
+unmarshal (TypeArray TypeWord8) = liftM toValue unmarshalByteArray
+unmarshal (TypeArray t) = liftM (ValueVector t) (unmarshalArray t)
+unmarshal (TypeDictionary kt vt) = unmarshalDictionary kt vt
+unmarshal (TypeStructure ts) = unmarshalStructure ts
+unmarshal TypeVariant = unmarshalVariant
+
+{-# INLINE consume #-}
+consume :: Word64 -> Unmarshal ByteString
+consume count = do
+	(UnmarshalState bytes offset) <- getState
+	let count' = fromIntegral count
+	let (x, bytes') = Data.ByteString.splitAt count' bytes
+	let lenConsumed = Data.ByteString.length x
+	if lenConsumed == count'
+		then do
+			putState (UnmarshalState bytes' (offset + count))
+			return x
+		else throwError (concat
+			[ "Unexpected EOF at offset "
+			, show (offset + fromIntegral lenConsumed)
+			])
+
+skipPadding :: Word8 -> Unmarshal ()
+skipPadding count = do
+	(UnmarshalState _ offset) <- getState
+	bytes <- consume (padding offset count)
+	unless (Data.ByteString.all (== 0) bytes) (throwError (concat
+		[ "Value padding ", show bytes
+		, " contains invalid bytes."
+		]))
+
+skipTerminator :: Unmarshal ()
+skipTerminator = do
+	byte <- unmarshalWord8
+	when (byte /= 0) (throwError "Textual value is not NUL-terminated.")
+
+fromMaybeU :: Show a => String -> (a -> Maybe b) -> a -> Unmarshal b
+fromMaybeU label f x = case f x of
+	Just x' -> return x'
+	Nothing -> throwError (concat ["Invalid ", label, ": ", show x])
+
+unmarshalGet :: Word8 -> Data.Binary.Get.Get a -> Data.Binary.Get.Get a -> Unmarshal a
+unmarshalGet count be le = do
+	skipPadding count
+	bytes <- consume (fromIntegral count)
+	get <- chooseEndian be le
+	let lazy = Data.ByteString.Lazy.fromChunks [bytes]
+	return (Data.Binary.Get.runGet get lazy)
+
+marshalWord8 :: Word8 -> Marshal ()
+marshalWord8 x = appendB 1 (Data.Binary.Builder.singleton x)
+
+unmarshalWord8 :: Unmarshal Word8
+unmarshalWord8 = liftM Data.ByteString.head (consume 1)
+
+marshalWord16 :: Word16 -> Marshal ()
+marshalWord16 = marshalBuilder 2
+	Data.Binary.Builder.putWord16be
+	Data.Binary.Builder.putWord16le
+
+marshalWord32 :: Word32 -> Marshal ()
+marshalWord32 = marshalBuilder 4
+	Data.Binary.Builder.putWord32be
+	Data.Binary.Builder.putWord32le
+
+marshalWord64 :: Word64 -> Marshal ()
+marshalWord64 = marshalBuilder 8
+	Data.Binary.Builder.putWord64be
+	Data.Binary.Builder.putWord64le
+
+marshalInt16 :: Int16 -> Marshal ()
+marshalInt16 = marshalWord16 . fromIntegral
+
+marshalInt32 :: Int32 -> Marshal ()
+marshalInt32 = marshalWord32 . fromIntegral
+
+marshalInt64 :: Int64 -> Marshal ()
+marshalInt64 = marshalWord64 . fromIntegral
+
+unmarshalWord16 :: Unmarshal Word16
+unmarshalWord16 = unmarshalGet 2
+	Data.Binary.Get.getWord16be
+	Data.Binary.Get.getWord16le
+
+unmarshalWord32 :: Unmarshal Word32
+unmarshalWord32 = unmarshalGet 4
+	Data.Binary.Get.getWord32be
+	Data.Binary.Get.getWord32le
+
+unmarshalWord64 :: Unmarshal Word64
+unmarshalWord64 = unmarshalGet 8
+	Data.Binary.Get.getWord64be
+	Data.Binary.Get.getWord64le
+
+unmarshalInt16 :: Unmarshal Int16
+unmarshalInt16 = liftM fromIntegral unmarshalWord16
+
+unmarshalInt32 :: Unmarshal Int32
+unmarshalInt32 = liftM fromIntegral unmarshalWord32
+
+unmarshalInt64 :: Unmarshal Int64
+unmarshalInt64 = liftM fromIntegral unmarshalWord64
+
+marshalDouble :: Double -> Marshal ()
+marshalDouble x = do
+	put <- chooseEndian
+		Data.Binary.IEEE754.putFloat64be
+		Data.Binary.IEEE754.putFloat64le
+	pad 8
+	appendL (runPut (put x))
+
+unmarshalDouble :: Unmarshal Double
+unmarshalDouble = unmarshalGet 8
+	Data.Binary.IEEE754.getFloat64be
+	Data.Binary.IEEE754.getFloat64le
+
+marshalBool :: Bool -> Marshal ()
+marshalBool False = marshalWord32 0
+marshalBool True  = marshalWord32 1
+
+unmarshalBool :: Unmarshal Bool
+unmarshalBool = do
+	word <- unmarshalWord32
+	case word of
+		0 -> return False
+		1 -> return True
+		_ -> throwError (concat
+			[ "Invalid boolean: "
+			, show word
+			])
+
+marshalText :: Text -> Marshal ()
+marshalText text = do
+	let bytes = Data.Text.Encoding.encodeUtf8 text
+	when (Data.ByteString.any (== 0) bytes) (throwError (concat
+		[ "String "
+		, show text
+		, " contained forbidden character: '\\x00'"
+		]))
+	marshalWord32 (fromIntegral (Data.ByteString.length bytes))
+	appendS bytes
+	marshalWord8 0
+
+unmarshalText :: Unmarshal Text
+unmarshalText = do
+	byteCount <- unmarshalWord32
+	bytes <- consume (fromIntegral byteCount)
+	skipTerminator
+	fromMaybeU "text" maybeDecodeUtf8 bytes
+
+maybeDecodeUtf8 :: ByteString -> Maybe Text
+maybeDecodeUtf8 bs = case Data.Text.Encoding.decodeUtf8' bs of
+	Right text -> Just text
+	_ -> Nothing
+
+marshalObjectPath :: ObjectPath -> Marshal ()
+marshalObjectPath = marshalText . objectPathText
+
+unmarshalObjectPath :: Unmarshal ObjectPath
+unmarshalObjectPath = do
+	text <- unmarshalText
+	fromMaybeU "object path" objectPath text
+
+signatureBytes :: Signature -> ByteString
+signatureBytes (Signature ts) = Data.ByteString.Char8.pack (concatMap typeCode ts)
+
+marshalSignature :: Signature -> Marshal ()
+marshalSignature x = do
+	let bytes = signatureBytes x
+	marshalWord8 (fromIntegral (Data.ByteString.length bytes))
+	appendS bytes
+	marshalWord8 0
+
+unmarshalSignature :: Unmarshal Signature
+unmarshalSignature = do
+	byteCount <- unmarshalWord8
+	bytes <- consume (fromIntegral byteCount)
+	skipTerminator
+	fromMaybeU "signature" parseSignature bytes
+
+arrayMaximumLength :: Int64
+arrayMaximumLength = 67108864
+
+marshalVector :: Type -> Vector Value -> Marshal ()
+marshalVector t x = do
+	(arrayPadding, arrayBytes) <- getArrayBytes t x
+	let arrayLen = Data.ByteString.Lazy.length arrayBytes
+	when (arrayLen > arrayMaximumLength) (throwError (concat
+		[ "Marshaled array size ("
+		, show arrayLen
+		, " bytes) exceeds maximum limit of ("
+		, show arrayMaximumLength
+		, " bytes)."
+		]))
+	marshalWord32 (fromIntegral arrayLen)
+	appendL (Data.ByteString.Lazy.replicate arrayPadding 0)
+	appendL arrayBytes
+
+marshalStrictBytes :: ByteString -> Marshal ()
+marshalStrictBytes bytes = do
+	let arrayLen = Data.ByteString.length bytes
+	when (fromIntegral arrayLen > arrayMaximumLength) (throwError (concat
+		[ "Marshaled array size ("
+		, show arrayLen
+		, " bytes) exceeds maximum limit of ("
+		, show arrayMaximumLength
+		, " bytes)."
+		]))
+	marshalWord32 (fromIntegral arrayLen)
+	appendS bytes
+
+getArrayBytes :: Type -> Vector Value -> Marshal (Int64, Data.ByteString.Lazy.ByteString)
+getArrayBytes itemType vs = do
+	s <- getState
+	(MarshalState _ afterLength) <- marshalWord32 0 >> getState
+	(MarshalState _ afterPadding) <- pad (alignment itemType) >> getState
+	
+	putState (MarshalState Data.Binary.Builder.empty afterPadding)
+	(MarshalState itemBuilder _) <- Data.Vector.mapM_ marshal vs >> getState
+	
+	let itemBytes = Data.Binary.Builder.toLazyByteString itemBuilder
+	    paddingSize = fromIntegral (afterPadding - afterLength)
+	
+	putState s
+	return (paddingSize, itemBytes)
+
+unmarshalByteArray :: Unmarshal ByteString
+unmarshalByteArray = do
+	byteCount <- unmarshalWord32
+	consume (fromIntegral byteCount)
+
+unmarshalArray :: Type -> Unmarshal (Vector Value)
+unmarshalArray itemType = do
+	let getOffset = do
+		(UnmarshalState _ o) <- getState
+		return o
+	byteCount <- unmarshalWord32
+	skipPadding (alignment itemType)
+	start <- getOffset
+	let end = start + fromIntegral byteCount
+	vs <- untilM (liftM (>= end) getOffset) (unmarshal itemType)
+	end' <- getOffset
+	when (end' > end) (throwError (concat
+		[ "Array data size exeeds array size of "
+		, show end
+		]))
+	return (Data.Vector.fromList vs)
+
+dictionaryToArray :: Map Atom Value -> Vector Value
+dictionaryToArray = Data.Vector.fromList . map step . Data.Map.toList where
+	step (k, v) = ValueStructure [ValueAtom k, v]
+
+arrayToDictionary :: Vector Value -> Map Atom Value
+arrayToDictionary = Data.Map.fromList . map step . Data.Vector.toList where
+	step (ValueStructure [ValueAtom k, v]) = (k, v)
+	step _ = error "arrayToDictionary: internal error"
+
+marshalMap :: Type -> Type -> Map Atom Value -> Marshal ()
+marshalMap kt vt x = let
+	structType = TypeStructure [kt, vt]
+	array = dictionaryToArray x
+	in marshalVector structType array
+
+unmarshalDictionary :: Type -> Type -> Unmarshal Value
+unmarshalDictionary kt vt = do
+	let pairType = TypeStructure [kt, vt]
+	array <- unmarshalArray pairType
+	return (ValueMap kt vt (arrayToDictionary array))
+
+marshalStructure :: [Value] -> Marshal ()
+marshalStructure vs = do
+	pad 8
+	mapM_ marshal vs
+
+unmarshalStructure :: [Type] -> Unmarshal Value
+unmarshalStructure ts = do
+	skipPadding 8
+	liftM ValueStructure (mapM unmarshal ts)
+
+marshalVariant :: Variant -> Marshal ()
+marshalVariant var@(Variant val) = do
+	sig <- case checkSignature [valueType val] of
+		Just x' -> return x'
+		Nothing -> throwError (concat
+			[ "Signature "
+			, show (typeCode (valueType val))
+			, " for variant "
+			, show var
+			, " is malformed or too large."
+			])
+	marshalSignature sig
+	marshal val
+
+unmarshalVariant :: Unmarshal Value
+unmarshalVariant = do
+	let getType sig = case signatureTypes sig of
+		[t] -> Just t
+		_   -> Nothing
+	
+	t <- fromMaybeU "variant signature" getType =<< unmarshalSignature
+	(toValue . Variant) `liftM` unmarshal t
+
+protocolVersion :: Word8
+protocolVersion = 1
+
+messageMaximumLength :: Word64
+messageMaximumLength = 134217728
+
+encodeFlags :: Set Flag -> Word8
+encodeFlags flags = foldr (.|.) 0 (map flagValue (Data.Set.toList flags)) where
+	flagValue NoReplyExpected = 0x1
+	flagValue NoAutoStart     = 0x2
+
+decodeFlags :: Word8 -> Set Flag
+decodeFlags word = Data.Set.fromList flags where
+	flagSet = [ (0x1, NoReplyExpected)
+	          , (0x2, NoAutoStart)
+	          ]
+	flags = flagSet >>= \(x, y) -> [y | word .&. x > 0]
+
+encodeField :: HeaderField -> Value
+encodeField (HeaderPath x)        = encodeField' 1 x
+encodeField (HeaderInterface x)   = encodeField' 2 x
+encodeField (HeaderMember x)      = encodeField' 3 x
+encodeField (HeaderErrorName x)   = encodeField' 4 x
+encodeField (HeaderReplySerial x) = encodeField' 5 x
+encodeField (HeaderDestination x) = encodeField' 6 x
+encodeField (HeaderSender x)      = encodeField' 7 x
+encodeField (HeaderSignature x)   = encodeField' 8 x
+
+encodeField' :: IsVariant a => Word8 -> a -> Value
+encodeField' code x = toValue (code, toVariant x)
+
+decodeField :: (Word8, Variant)
+            -> E.ErrorM UnmarshalError [HeaderField]
+decodeField struct = case struct of
+	(1, x) -> decodeField' x HeaderPath "path"
+	(2, x) -> decodeField' x HeaderInterface "interface"
+	(3, x) -> decodeField' x HeaderMember "member"
+	(4, x) -> decodeField' x HeaderErrorName "error name"
+	(5, x) -> decodeField' x HeaderReplySerial "reply serial"
+	(6, x) -> decodeField' x HeaderDestination "destination"
+	(7, x) -> decodeField' x HeaderSender "sender"
+	(8, x) -> decodeField' x HeaderSignature "signature"
+	_      -> return []
+
+decodeField' :: IsVariant a => Variant -> (a -> b) -> Text
+             -> E.ErrorM UnmarshalError [b]
+decodeField' x f label = case fromVariant x of
+	Just x' -> return [f x']
+	Nothing -> E.throwErrorM (UnmarshalError (Data.Text.pack (concat
+		[ "Header field "
+		, show label
+		, " contains invalid value "
+		, show x
+		])))
+
+
+-- | Convert a 'Message' into a 'ByteString'. Although unusual, it is
+-- possible for marshaling to fail; if this occurs, an error will be
+-- returned instead.
+
+marshalMessage :: Message a => Endianness -> Serial -> a
+               -> Either MarshalError Data.ByteString.ByteString
+marshalMessage e serial msg = runMarshal where
+	body = messageBody msg
+	marshaler = do
+		sig <- checkBodySig body
+		empty <- getState
+		mapM_ (marshal . (\(Variant x) -> x)) body
+		(MarshalState bodyBytesB _) <- getState
+		putState empty
+		marshal (toValue (encodeEndianness e))
+		let bodyBytes = Data.Binary.Builder.toLazyByteString bodyBytesB
+		marshalHeader msg serial sig (fromIntegral (Data.ByteString.Lazy.length bodyBytes))
+		pad 8
+		appendL bodyBytes
+		checkMaximumSize
+	emptyState = MarshalState Data.Binary.Builder.empty 0
+	runMarshal = case unWire marshaler e emptyState of
+		WireRL err -> Left (MarshalError (Data.Text.pack err))
+		WireRR _ (MarshalState builder _) -> Right (toStrict builder)
+	toStrict = Data.ByteString.concat
+	         . Data.ByteString.Lazy.toChunks
+	         . Data.Binary.Builder.toLazyByteString
+
+checkBodySig :: [Variant] -> Marshal Signature
+checkBodySig vs = case checkSignature (map variantType vs) of
+	Just x -> return x
+	Nothing -> throwError (concat
+		[ "Message body ", show vs
+		, " has too many items"
+		])
+
+marshalHeader :: Message a => a -> Serial -> Signature -> Word32
+              -> Marshal ()
+marshalHeader msg serial bodySig bodyLength = do
+	let fields = HeaderSignature bodySig : messageHeaderFields msg
+	marshalWord8 (messageTypeCode msg)
+	marshalWord8 (encodeFlags (messageFlags msg))
+	marshalWord8 protocolVersion
+	marshalWord32 bodyLength
+	marshalWord32 (serialValue serial)
+	let fieldType = TypeStructure [TypeWord8, TypeVariant]
+	marshalVector fieldType (Data.Vector.fromList (map encodeField fields))
+
+checkMaximumSize :: Marshal ()
+checkMaximumSize = do
+	(MarshalState _ messageLength) <- getState
+	when (messageLength > messageMaximumLength) (throwError (concat
+		[ "Marshaled message size (", show messageLength
+		, " bytes) exeeds maximum limit of ("
+		, show messageMaximumLength, " bytes)."
+		]))
+
+unmarshalMessageM :: Monad m => (Word32 -> m ByteString)
+                  -> m (Either UnmarshalError ReceivedMessage)
+unmarshalMessageM getBytes' = E.runErrorT $ do
+	let getBytes = E.ErrorT . liftM Right . getBytes'
+	
+
+	let fixedSig = "yyyyuuu"
+	fixedBytes <- getBytes 16
+
+	let messageVersion = Data.ByteString.index fixedBytes 3
+	when (messageVersion /= protocolVersion) (E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+		[ "Unsupported protocol version: "
+		, show messageVersion
+		]))))
+
+	let eByte = Data.ByteString.index fixedBytes 0
+	endianness <- case decodeEndianness eByte of
+		Just x' -> return x'
+		Nothing -> E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+			[ "Invalid endianness: "
+			, show eByte
+			])))
+
+	let unmarshalSig = mapM unmarshal . signatureTypes
+	let unmarshal' x bytes = case unWire (unmarshalSig x) endianness (UnmarshalState bytes 0) of
+		WireRR x' _ -> return x'
+		WireRL err  -> E.throwErrorT (UnmarshalError (Data.Text.pack err))
+	fixed <- unmarshal' fixedSig fixedBytes
+	let messageType = fromJust (fromValue (fixed !! 1))
+	let flags = decodeFlags (fromJust (fromValue (fixed !! 2)))
+	let bodyLength = fromJust (fromValue (fixed !! 4))
+	let serial = fromJust (fromVariant (Variant (fixed !! 5)))
+
+	let fieldByteCount = fromJust (fromValue (fixed !! 6))
+
+
+	let headerSig  = "yyyyuua(yv)"
+	fieldBytes <- getBytes fieldByteCount
+	let headerBytes = Data.ByteString.append fixedBytes fieldBytes
+	header <- unmarshal' headerSig headerBytes
+
+	let fieldArray = Data.Vector.toList (fromJust (fromValue (header !! 6)))
+	fields <- case E.runErrorM $ concat `liftM` mapM decodeField fieldArray of
+		Left err -> E.throwErrorT err
+		Right x -> return x
+
+
+	let bodyPadding = padding (fromIntegral fieldByteCount + 16) 8
+	void (getBytes (fromIntegral bodyPadding))
+
+	let bodySig = findBodySignature fields
+
+	bodyBytes <- getBytes bodyLength
+	body <- unmarshal' bodySig bodyBytes
+
+
+	y <- case E.runErrorM (buildReceivedMessage messageType fields) of
+		Right x -> return x
+		Left err -> E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+			[ "Header field "
+			, show err
+			, " is required, but missing"
+			])))
+	return (y serial flags (map Variant body))
+
+findBodySignature :: [HeaderField] -> Signature
+findBodySignature fields = fromMaybe "" (listToMaybe [x | HeaderSignature x <- fields])
+
+buildReceivedMessage :: Word8 -> [HeaderField] -> E.ErrorM Text
+                        (Serial -> (Set Flag) -> [Variant]
+                         -> ReceivedMessage)
+
+buildReceivedMessage 1 fields = do
+	path <- require "path" [x | HeaderPath x <- fields]
+	member <- require "member name" [x | HeaderMember x <- fields]
+	return $ \serial flags body -> let
+		iface = listToMaybe [x | HeaderInterface x <- fields]
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = MethodCall path member iface dest flags body
+		in ReceivedMethodCall serial sender msg
+
+buildReceivedMessage 2 fields = do
+	replySerial <- require "reply serial" [x | HeaderReplySerial x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = MethodReturn replySerial dest body
+		in ReceivedMethodReturn serial sender msg
+
+buildReceivedMessage 3 fields = do
+	name <- require "error name" [x | HeaderErrorName x <- fields]
+	replySerial <- require "reply serial" [x | HeaderReplySerial x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = Error name replySerial dest body
+		in ReceivedError serial sender msg
+
+buildReceivedMessage 4 fields = do
+	path <- require "path" [x | HeaderPath x <- fields]
+	member <- require "member name" [x | HeaderMember x <- fields]
+	iface <- require "interface" [x | HeaderInterface x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = Signal dest path iface member body
+		in ReceivedSignal serial sender msg
+
+buildReceivedMessage messageType fields = return $ \serial flags body -> let
+	sender = listToMaybe [x | HeaderSender x <- fields]
+	msg = Unknown messageType flags body
+	in ReceivedUnknown serial sender msg
+
+require :: Text -> [a] -> E.ErrorM Text a
+require _     (x:_) = return x
+require label _     = E.throwErrorM label
+
+
+-- | Parse a 'ByteString' into a 'ReceivedMessage'. The result can be
+-- inspected to see what type of message was parsed. Unknown message types
+-- can still be parsed successfully, as long as they otherwise conform to
+-- the D&#8208;Bus standard.
+
+unmarshalMessage :: ByteString -> Either UnmarshalError ReceivedMessage
+unmarshalMessage = Data.Binary.Get.runGet get . toLazy where
+	get = unmarshalMessageM getBytes
+	getBytes = Data.Binary.Get.getByteString . fromIntegral
+	toLazy bs = Data.ByteString.Lazy.fromChunks [bs]
diff --git a/hs/DBus/Wire/Marshal.hs b/hs/DBus/Wire/Marshal.hs
deleted file mode 100644
--- a/hs/DBus/Wire/Marshal.hs
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-{-# LANGUAGE TypeFamilies #-}
-module DBus.Wire.Marshal where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-import qualified Data.ByteString as BS
-import qualified Data.ByteString.Lazy as L
-import qualified Data.Binary.Builder as B
-
-import Data.Binary.Put (runPut)
-import qualified Data.Binary.IEEE754 as IEEE
-
-import DBus.Wire.Unicode (maybeEncodeUtf8)
-
-import qualified DBus.Constants as C
-
-import qualified DBus.Message.Internal as M
-
-import Data.Bits ((.|.))
-import qualified Data.Set as Set
-
-import DBus.Wire.Internal
-import Control.Monad (when)
-import Data.Maybe (fromJust)
-import Data.Word (Word8, Word32, Word64)
-import Data.Int (Int64)
-
-import qualified DBus.Types as T
-import qualified DBus.Types.Internal as T
-
-data MarshalState = MarshalState {-# UNPACK #-} !B.Builder {-# UNPACK #-} !Word64
-
-data MarshalR a = MarshalRL MarshalError | MarshalRR a {-# UNPACK #-} !MarshalState
-
-type Marshal = MarshalM ()
-newtype MarshalM a = MarshalM { unMarshalM :: Endianness -> MarshalState -> MarshalR a }
-
-instance Monad MarshalM where
-	{-# INLINE return #-}
-	return a = MarshalM $ \_ s -> MarshalRR a s
-	
-	{-# INLINE (>>=) #-}
-	m >>= k = MarshalM $ \e s -> case unMarshalM m e s of
-		MarshalRL err -> MarshalRL err
-		MarshalRR a s' -> unMarshalM (k a) e s'
-	
-	{-# INLINE (>>) #-}
-	m >> k = MarshalM $ \e s -> case unMarshalM m e s of
-		MarshalRL err -> MarshalRL err
-		MarshalRR _ s' -> unMarshalM k e s'
-
-throwError :: MarshalError -> MarshalM a
-throwError err = MarshalM $ \_ _ -> MarshalRL err
-
-{-# INLINE getState #-}
-getState :: MarshalM MarshalState
-getState = MarshalM $ \_ s -> MarshalRR s s
-
-{-# INLINE putState #-}
-putState :: MarshalState -> MarshalM ()
-putState s = MarshalM $ \_ _ -> MarshalRR () s
-
-runMarshal :: Marshal -> Endianness -> Either MarshalError L.ByteString
-runMarshal m e = case unMarshalM m e (MarshalState B.empty 0) of
-	MarshalRL err -> Left err
-	MarshalRR _ (MarshalState builder _) -> Right $ B.toLazyByteString builder
-
-marshal :: T.Variant -> Marshal
-marshal v = case v of
-
-	T.VarBoxWord8  x -> marshalWord8 x
-	T.VarBoxWord16 x -> marshalBuilder 2 B.putWord16be B.putWord16le x
-	T.VarBoxWord32 x -> marshalWord32 x
-	T.VarBoxWord64 x -> marshalBuilder 8 B.putWord64be B.putWord64le x
-	T.VarBoxInt16  x -> marshalBuilder 2 B.putWord16be B.putWord16le $ fromIntegral x
-	T.VarBoxInt32  x -> marshalBuilder 4 B.putWord32be B.putWord32le $ fromIntegral x
-	T.VarBoxInt64  x -> marshalBuilder 8 B.putWord64be B.putWord64le $ fromIntegral x
-
-	T.VarBoxDouble x -> marshalDouble x
-
-	T.VarBoxBool x -> marshalWord32 $ if x then 1 else 0
-
-	T.VarBoxString x -> marshalText x
-	T.VarBoxObjectPath x -> marshalText . T.strObjectPath $ x
-
-	T.VarBoxSignature x -> marshalSignature x
-
-	T.VarBoxArray x -> marshalArray x
-
-	T.VarBoxDictionary x -> marshalArray (T.dictionaryToArray x)
-
-	T.VarBoxStructure (T.Structure vs) -> do
-		pad 8
-		mapM_ marshal vs
-
-	T.VarBoxVariant x -> do
-		let textSig = T.typeCode . T.variantType $ x
-		sig <- case T.variantSignature x of
-			Just x' -> return x'
-			Nothing -> throwError $ InvalidVariantSignature textSig
-		marshalSignature sig
-		marshal x
-
-appendS :: BS.ByteString -> Marshal
-appendS bytes = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.fromByteString bytes
-	count' = count + fromIntegral (BS.length bytes)
-	in MarshalRR () (MarshalState builder' count')
-
-appendL :: L.ByteString -> Marshal
-appendL bytes = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.fromLazyByteString bytes
-	count' = count + fromIntegral (L.length bytes)
-	in MarshalRR () (MarshalState builder' count')
-
-pad :: Word8 -> Marshal
-pad count = MarshalM $ \e s@(MarshalState _ existing) -> let
-	padding' = fromIntegral $ padding existing count
-	bytes = BS.replicate padding' 0
-	in unMarshalM (appendS bytes) e s
-
-marshalBuilder :: Word8 -> (a -> B.Builder) -> (a -> B.Builder) -> a -> Marshal
-marshalBuilder size be le x = do
-	pad size
-	MarshalM $ \e (MarshalState builder count) -> let
-		builder' = B.append builder $ case e of
-			BigEndian -> be x
-			LittleEndian -> le x
-		size' = fromIntegral size
-		in MarshalRR () (MarshalState builder' (count + size'))
-
-data MarshalError
-	= MessageTooLong Word64
-	| ArrayTooLong Word64
-	| InvalidBodySignature Text
-	| InvalidVariantSignature Text
-	| InvalidText Text
-	deriving (Eq)
-
-instance Show MarshalError where
-	show (MessageTooLong x) = concat
-		["Message too long (", show x, " bytes)."]
-	show (ArrayTooLong x) = concat
-		["Array too long (", show x, " bytes)."]
-	show (InvalidBodySignature x) = concat
-		["Invalid body signature: ", show x]
-	show (InvalidVariantSignature x) = concat
-		["Invalid variant signature: ", show x]
-	show (InvalidText x) = concat
-		["Text cannot be marshaled: ", show x]
-
-marshalWord32 :: Word32 -> Marshal
-marshalWord32 = marshalBuilder 4 B.putWord32be B.putWord32le
-
-{-# INLINE marshalWord8 #-}
-marshalWord8 :: Word8 -> Marshal
-marshalWord8 x = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.singleton x
-	in MarshalRR () (MarshalState builder' (count + 1))
-
-marshalDouble :: Double -> Marshal
-marshalDouble x = do
-	pad 8
-	MarshalM $ \e s -> let
-		put = case e of
-			BigEndian -> IEEE.putFloat64be
-			LittleEndian -> IEEE.putFloat64le
-		bytes = runPut $ put x
-		in unMarshalM (appendL bytes) e s
-
-marshalText :: Text -> Marshal
-marshalText x = do
-	bytes <- case maybeEncodeUtf8 x of
-		Just x' -> return x'
-		Nothing -> throwError $ InvalidText x
-	when (L.any (== 0) bytes) $
-		throwError $ InvalidText x
-	marshalWord32 . fromIntegral . L.length $ bytes
-	appendL bytes
-	marshalWord8 0
-
-marshalSignature :: T.Signature -> Marshal
-marshalSignature x = do
-	let bytes = T.bytesSignature x
-	let size = fromIntegral . BS.length $ bytes
-	marshalWord8 size
-	appendS bytes
-	marshalWord8 0
-
-marshalArray :: T.Array -> Marshal
-marshalArray x = do
-	(arrayPadding, arrayBytes) <- getArrayBytes (T.arrayType x) x
-	let arrayLen = L.length arrayBytes
-	when (arrayLen > fromIntegral C.arrayMaximumLength)
-		(throwError $ ArrayTooLong $ fromIntegral arrayLen)
-	marshalWord32 $ fromIntegral arrayLen
-	appendL $ L.replicate arrayPadding 0
-	appendL arrayBytes
-
-getArrayBytes :: T.Type -> T.Array -> MarshalM (Int64, L.ByteString)
-getArrayBytes T.DBusByte x = return (0, bytes) where
-	Just bytes = T.arrayToBytes x
-
-getArrayBytes itemType x = do
-	let vs = T.arrayItems x
-	s <- getState
-	(MarshalState _ afterLength) <- marshalWord32 0 >> getState
-	(MarshalState _ afterPadding) <- pad (alignment itemType) >> getState
-	
-	putState $ MarshalState B.empty afterPadding
-	(MarshalState itemBuilder _) <- mapM_ marshal vs >> getState
-	
-	let itemBytes = B.toLazyByteString itemBuilder
-	    paddingSize = fromIntegral $ afterPadding - afterLength
-	
-	putState s
-	return (paddingSize, itemBytes)
-
-encodeFlags :: Set.Set M.Flag -> Word8
-encodeFlags flags = foldr (.|.) 0 $ map flagValue $ Set.toList flags where
-	flagValue M.NoReplyExpected = 0x1
-	flagValue M.NoAutoStart     = 0x2
-
-encodeField :: M.HeaderField -> T.Structure
-encodeField (M.Path x)        = encodeField' 1 x
-encodeField (M.Interface x)   = encodeField' 2 x
-encodeField (M.Member x)      = encodeField' 3 x
-encodeField (M.ErrorName x)   = encodeField' 4 x
-encodeField (M.ReplySerial x) = encodeField' 5 x
-encodeField (M.Destination x) = encodeField' 6 x
-encodeField (M.Sender x)      = encodeField' 7 x
-encodeField (M.Signature x)   = encodeField' 8 x
-
-encodeField' :: T.Variable a => Word8 -> a -> T.Structure
-encodeField' code x = T.Structure
-	[ T.toVariant code
-	, T.toVariant $ T.toVariant x
-	]
-
-
--- | Convert a 'M.Message' into a 'L.ByteString'. Although unusual, it is
--- possible for marshaling to fail -- if this occurs, an appropriate error
--- will be returned instead.
-
-marshalMessage :: M.Message a => Endianness -> M.Serial -> a
-               -> Either MarshalError L.ByteString
-marshalMessage e serial msg = runMarshal marshaler e where
-	body = M.messageBody msg
-	marshaler = do
-		sig <- checkBodySig body
-		empty <- getState
-		mapM_ marshal body
-		(MarshalState bodyBytesB _) <- getState
-		putState empty
-		marshalEndianness e
-		let bodyBytes = B.toLazyByteString bodyBytesB
-		marshalHeader msg serial sig
-			$ fromIntegral . L.length $ bodyBytes
-		pad 8
-		appendL bodyBytes
-		checkMaximumSize
-
-checkBodySig :: [T.Variant] -> MarshalM T.Signature
-checkBodySig vs = let
-	textSig = TL.concat . map (T.typeCode . T.variantType) $ vs
-	bytesSig = BS.concat . map (T.typeCodeB . T.variantType) $ vs
-	invalid = throwError $ InvalidBodySignature textSig
-	in case T.mkBytesSignature bytesSig of
-		Just x -> return x
-		Nothing -> invalid
-
-marshalHeader :: M.Message a => a -> M.Serial -> T.Signature -> Word32
-              -> Marshal
-marshalHeader msg serial bodySig bodyLength = do
-	let fields = M.Signature bodySig : M.messageHeaderFields msg
-	marshalWord8 . M.messageTypeCode $ msg
-	marshalWord8 . encodeFlags . M.messageFlags $ msg
-	marshalWord8 C.protocolVersion
-	marshalWord32 bodyLength
-	marshalWord32 . M.serialValue $ serial
-	let fieldType = T.DBusStructure [T.DBusByte, T.DBusVariant]
-	marshalArray . fromJust . T.toArray fieldType
-	        $ map encodeField fields
-
-marshalEndianness :: Endianness -> Marshal
-marshalEndianness = marshal . T.toVariant . encodeEndianness
-
-checkMaximumSize :: Marshal
-checkMaximumSize = do
-	(MarshalState _ messageLength) <- getState
-	when (messageLength > fromIntegral C.messageMaximumLength)
-		(throwError $ MessageTooLong $ fromIntegral messageLength)
diff --git a/hs/DBus/Wire/Unicode.hs b/hs/DBus/Wire/Unicode.hs
deleted file mode 100644
--- a/hs/DBus/Wire/Unicode.hs
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-module DBus.Wire.Unicode
-	( maybeEncodeUtf8
-	, maybeDecodeUtf8) where
-import Data.ByteString.Lazy (ByteString)
-import Data.Text.Lazy (Text)
-import Data.Text.Lazy.Encoding (encodeUtf8, decodeUtf8)
-import Data.Text.Encoding.Error (UnicodeException)
-import qualified Control.Exception as Exc
-import System.IO.Unsafe (unsafePerformIO)
-
-excToMaybe :: a -> Maybe a
-excToMaybe x = unsafePerformIO $ fmap Just (Exc.evaluate x) `Exc.catch` unicodeError
-
-unicodeError :: UnicodeException -> IO (Maybe a)
-unicodeError = const $ return Nothing
-
-maybeEncodeUtf8 :: Text -> Maybe ByteString
-maybeEncodeUtf8 = excToMaybe . encodeUtf8
-
-maybeDecodeUtf8 :: ByteString -> Maybe Text
-maybeDecodeUtf8 = excToMaybe . decodeUtf8
diff --git a/hs/DBus/Wire/Unmarshal.hs b/hs/DBus/Wire/Unmarshal.hs
deleted file mode 100644
--- a/hs/DBus/Wire/Unmarshal.hs
+++ /dev/null
@@ -1,414 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-{-# LANGUAGE TypeFamilies #-}
-module DBus.Wire.Unmarshal where
-
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-
-
-import Control.Monad (liftM)
-import qualified DBus.Util.MonadError as E
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Lazy as BL
-
-import qualified Data.Binary.Get as G
-
-import qualified Data.Binary.IEEE754 as IEEE
-
-import DBus.Wire.Unicode (maybeDecodeUtf8)
-
-import qualified DBus.Message.Internal as M
-
-import Data.Bits ((.&.))
-import qualified Data.Set as Set
-
-import qualified DBus.Constants as C
-
-import Control.Monad (when, unless)
-import Data.Maybe (fromJust, listToMaybe, fromMaybe)
-import Data.Word (Word8, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-
-import DBus.Wire.Internal
-import qualified DBus.Types.Internal as T
-import DBus.Util (void)
-
-data UnmarshalState = UnmarshalState BL.ByteString {-# UNPACK #-} !Word64
-
-data UnmarshalR a = UnmarshalRL UnmarshalError | UnmarshalRR a {-# UNPACK #-} !UnmarshalState
-
-newtype Unmarshal a = Unmarshal { unUnmarshal :: Endianness -> UnmarshalState -> UnmarshalR a }
-
-instance Monad Unmarshal where
-	{-# INLINE return #-}
-	return a = Unmarshal $ \_ s -> UnmarshalRR a s
-	
-	{-# INLINE (>>=) #-}
-	m >>= k = Unmarshal $ \e s -> case unUnmarshal m e s of
-		UnmarshalRL err -> UnmarshalRL err
-		UnmarshalRR a s' -> unUnmarshal (k a) e s'
-	
-	{-# INLINE (>>) #-}
-	m >> k = Unmarshal $ \e s -> case unUnmarshal m e s of
-		UnmarshalRL err -> UnmarshalRL err
-		UnmarshalRR _ s' -> unUnmarshal k e s'
-
-throwError :: UnmarshalError -> Unmarshal a
-throwError err = Unmarshal $ \_ _ -> UnmarshalRL err
-
-{-# INLINE getState #-}
-getState :: Unmarshal UnmarshalState
-getState = Unmarshal $ \_ s -> UnmarshalRR s s
-
-{-# INLINE putState #-}
-putState :: UnmarshalState -> Unmarshal ()
-putState s = Unmarshal $ \_ _ -> UnmarshalRR () s
-
-runUnmarshal :: Unmarshal a -> Endianness -> BL.ByteString -> Either UnmarshalError a
-runUnmarshal m e bytes = case unUnmarshal m e (UnmarshalState bytes 0) of
-	UnmarshalRL err -> Left err
-	UnmarshalRR a _ -> Right a
-
-unmarshal :: T.Signature -> Unmarshal [T.Variant]
-unmarshal = mapM unmarshalType . T.signatureTypes
-
-unmarshalType :: T.Type -> Unmarshal T.Variant
-
-unmarshalType T.DBusByte = liftM (T.toVariant . BL.head) $ consume 1
-unmarshalType T.DBusWord16 = unmarshalGet' 2 G.getWord16be G.getWord16le
-unmarshalType T.DBusWord32 = unmarshalGet' 4 G.getWord32be G.getWord32le
-unmarshalType T.DBusWord64 = unmarshalGet' 8 G.getWord64be G.getWord64le
-
-unmarshalType T.DBusInt16  = do
-	x <- unmarshalGet 2 G.getWord16be G.getWord16le
-	return . T.toVariant $ (fromIntegral x :: Int16)
-
-unmarshalType T.DBusInt32  = do
-	x <- unmarshalGet 4 G.getWord32be G.getWord32le
-	return . T.toVariant $ (fromIntegral x :: Int32)
-
-unmarshalType T.DBusInt64  = do
-	x <- unmarshalGet 8 G.getWord64be G.getWord64le
-	return . T.toVariant $ (fromIntegral x :: Int64)
-
-unmarshalType T.DBusDouble = unmarshalGet' 8 IEEE.getFloat64be IEEE.getFloat64le
-
-unmarshalType T.DBusBoolean = unmarshalWord32 >>=
-	fromMaybeU' "boolean" (\x -> case x of
-		0 -> Just False
-		1 -> Just True
-		_ -> Nothing)
-
-unmarshalType T.DBusString = liftM T.toVariant unmarshalText
-
-unmarshalType T.DBusObjectPath = unmarshalText >>=
-	fromMaybeU' "object path" T.mkObjectPath
-
-unmarshalType T.DBusSignature = liftM T.toVariant unmarshalSignature
-
-unmarshalType (T.DBusArray t) = T.toVariant `liftM` unmarshalArray t
-
-unmarshalType (T.DBusDictionary kt vt) = do
-	let pairType = T.DBusStructure [kt, vt]
-	array <- unmarshalArray pairType
-	fromMaybeU' "dictionary" T.arrayToDictionary array
-
-unmarshalType (T.DBusStructure ts) = do
-	skipPadding 8
-	liftM (T.toVariant . T.Structure) $ mapM unmarshalType ts
-
-unmarshalType T.DBusVariant = do
-	let getType sig = case T.signatureTypes sig of
-		[t] -> Just t
-		_   -> Nothing
-	
-	t <- fromMaybeU "variant signature" getType =<< unmarshalSignature
-	T.toVariant `liftM` unmarshalType t
-
-{-# INLINE consume #-}
-consume :: Word64 -> Unmarshal BL.ByteString
-consume count = Unmarshal $ \_ (UnmarshalState bytes offset) -> let
-	count' = fromIntegral count
-	(x, bytes') = BL.splitAt count' bytes
-	in if BL.length x == count'
-		then UnmarshalRR x (UnmarshalState bytes' (offset + count))
-		else UnmarshalRL $ UnexpectedEOF offset
-
-skipPadding :: Word8 -> Unmarshal ()
-skipPadding count = do
-	(UnmarshalState _ offset) <- getState
-	bytes <- consume $ padding offset count
-	unless (BL.all (== 0) bytes) $
-		throwError $ InvalidPadding offset
-
-skipTerminator :: Unmarshal ()
-skipTerminator = do
-	(UnmarshalState _ offset) <- getState
-	bytes <- consume 1
-	unless (BL.all (== 0) bytes) $
-		throwError $ MissingTerminator offset
-
-fromMaybeU :: Show a => Text -> (a -> Maybe b) -> a -> Unmarshal b
-fromMaybeU label f x = case f x of
-	Just x' -> return x'
-	Nothing -> throwError . Invalid label . TL.pack . show $ x
-
-fromMaybeU' :: (Show a, T.Variable b) => Text -> (a -> Maybe b) -> a
-           -> Unmarshal T.Variant
-fromMaybeU' label f x = do
-	x' <- fromMaybeU label f x
-	return $ T.toVariant x'
-
-unmarshalGet :: Word8 -> G.Get a -> G.Get a -> Unmarshal a
-unmarshalGet count be le = do
-	skipPadding count
-	bs <- consume . fromIntegral $ count
-	
-	Unmarshal $ \e s -> let
-		get = case e of
-			BigEndian -> be
-			LittleEndian -> le
-		in UnmarshalRR (G.runGet get bs) s
-
-unmarshalGet' :: T.Variable a => Word8 -> G.Get a -> G.Get a
-              -> Unmarshal T.Variant
-unmarshalGet' count be le = T.toVariant `liftM` unmarshalGet count be le
-
-untilM :: Monad m => m Bool -> m a -> m [a]
-untilM test comp = do
-	done <- test
-	if done
-		then return []
-		else do
-			x <- comp
-			xs <- untilM test comp
-			return $ x:xs
-
-data UnmarshalError
-	= UnsupportedProtocolVersion Word8
-	| UnexpectedEOF Word64
-	| Invalid Text Text
-	| MissingHeaderField Text
-	| InvalidHeaderField Text T.Variant
-	| InvalidPadding Word64
-	| MissingTerminator Word64
-	| ArraySizeMismatch
-	deriving (Eq)
-
-instance Show UnmarshalError where
-	show (UnsupportedProtocolVersion x) = concat
-		["Unsupported protocol version: ", show x]
-	show (UnexpectedEOF pos) = concat
-		["Unexpected EOF at position ", show pos]
-	show (Invalid label x) = TL.unpack $ TL.concat
-		["Invalid ", label, ": ", x]
-	show (MissingHeaderField x) = concat
-		["Required field " , show x , " is missing."]
-	show (InvalidHeaderField x got) = concat
-		[ "Invalid header field ", show x, ": ", show got]
-	show (InvalidPadding pos) = concat
-		["Invalid padding at position ", show pos]
-	show (MissingTerminator pos) = concat
-		["Missing NUL terminator at position ", show pos]
-	show ArraySizeMismatch = "Array size mismatch"
-
-unmarshalWord32 :: Unmarshal Word32
-unmarshalWord32 = unmarshalGet 4 G.getWord32be G.getWord32le
-
-unmarshalText :: Unmarshal Text
-unmarshalText = do
-	byteCount <- unmarshalWord32
-	bytes <- consume . fromIntegral $ byteCount
-	skipTerminator
-	fromMaybeU "text" maybeDecodeUtf8 bytes
-
-unmarshalSignature :: Unmarshal T.Signature
-unmarshalSignature = do
-	byteCount <- BL.head `liftM` consume 1
-	lazy <- consume $ fromIntegral byteCount
-	skipTerminator
-	let bytes = B.concat $ BL.toChunks lazy
-	fromMaybeU "signature" T.mkBytesSignature bytes
-
-unmarshalArray :: T.Type -> Unmarshal T.Array
-unmarshalArray T.DBusByte = do
-	byteCount <- unmarshalWord32
-	T.arrayFromBytes `liftM` consume (fromIntegral byteCount)
-
-unmarshalArray itemType = do
-	let getOffset = do
-		(UnmarshalState _ o) <- getState
-		return o
-	byteCount <- unmarshalWord32
-	skipPadding (alignment itemType)
-	start <- getOffset
-	let end = start + fromIntegral byteCount
-	vs <- untilM (liftM (>= end) getOffset) (unmarshalType itemType)
-	end' <- getOffset
-	when (end' > end) $
-		throwError ArraySizeMismatch
-	fromMaybeU "array" (T.arrayFromItems itemType) vs
-
-decodeFlags :: Word8 -> Set.Set M.Flag
-decodeFlags word = Set.fromList flags where
-	flagSet = [ (0x1, M.NoReplyExpected)
-	          , (0x2, M.NoAutoStart)
-	          ]
-	flags = flagSet >>= \(x, y) -> [y | word .&. x > 0]
-
-decodeField :: T.Structure
-            -> E.ErrorM UnmarshalError [M.HeaderField]
-decodeField struct = case unpackField struct of
-	(1, x) -> decodeField' x M.Path "path"
-	(2, x) -> decodeField' x M.Interface "interface"
-	(3, x) -> decodeField' x M.Member "member"
-	(4, x) -> decodeField' x M.ErrorName "error name"
-	(5, x) -> decodeField' x M.ReplySerial "reply serial"
-	(6, x) -> decodeField' x M.Destination "destination"
-	(7, x) -> decodeField' x M.Sender "sender"
-	(8, x) -> decodeField' x M.Signature "signature"
-	_      -> return []
-
-decodeField' :: T.Variable a => T.Variant -> (a -> b) -> Text
-             -> E.ErrorM UnmarshalError [b]
-decodeField' x f label = case T.fromVariant x of
-	Just x' -> return [f x']
-	Nothing -> E.throwErrorM $ InvalidHeaderField label x
-
-unpackField :: T.Structure -> (Word8, T.Variant)
-unpackField struct = (c', v') where
-	T.Structure [c, v] = struct
-	c' = fromJust . T.fromVariant $ c
-	v' = fromJust . T.fromVariant $ v
-
-
--- | Read bytes from a monad until a complete message has been received.
-
-unmarshalMessage :: Monad m => (Word32 -> m BL.ByteString)
-                 -> m (Either UnmarshalError M.ReceivedMessage)
-unmarshalMessage getBytes' = E.runErrorT $ do
-	let getBytes = E.ErrorT . liftM Right . getBytes'
-	
-
-	let fixedSig = "yyyyuuu"
-	fixedBytes <- getBytes 16
-
-	let messageVersion = BL.index fixedBytes 3
-	when (messageVersion /= C.protocolVersion) $
-		E.throwErrorT $ UnsupportedProtocolVersion messageVersion
-
-	let eByte = BL.index fixedBytes 0
-	endianness <- case decodeEndianness eByte of
-		Just x' -> return x'
-		Nothing -> E.throwErrorT . Invalid "endianness" . TL.pack . show $ eByte
-
-	let unmarshal' x bytes = case runUnmarshal (unmarshal x) endianness bytes of
-		Right x' -> return x'
-		Left  e  -> E.throwErrorT e
-	fixed <- unmarshal' fixedSig fixedBytes
-	let typeCode = fromJust . T.fromVariant $ fixed !! 1
-	let flags = decodeFlags . fromJust . T.fromVariant $ fixed !! 2
-	let bodyLength = fromJust . T.fromVariant $ fixed !! 4
-	let serial = fromJust . T.fromVariant $ fixed !! 5
-
-	let fieldByteCount = fromJust . T.fromVariant $ fixed !! 6
-
-
-	let headerSig  = "yyyyuua(yv)"
-	fieldBytes <- getBytes fieldByteCount
-	let headerBytes = BL.append fixedBytes fieldBytes
-	header <- unmarshal' headerSig headerBytes
-
-	let fieldArray = fromJust . T.fromVariant $ header !! 6
-	let fieldStructures = fromJust . T.fromArray $ fieldArray
-	fields <- case E.runErrorM $ concat `liftM` mapM decodeField fieldStructures of
-		Left err -> E.throwErrorT err
-		Right x -> return x
-
-
-	let bodyPadding = padding (fromIntegral fieldByteCount + 16) 8
-	void (getBytes (fromIntegral bodyPadding))
-
-	let bodySig = findBodySignature fields
-
-	bodyBytes <- getBytes bodyLength
-	body <- unmarshal' bodySig bodyBytes
-
-
-	y <- case E.runErrorM $ buildReceivedMessage typeCode fields of
-		Right x -> return x
-		Left err -> E.throwErrorT $ MissingHeaderField err
-	return $ y serial flags body
-
-findBodySignature :: [M.HeaderField] -> T.Signature
-findBodySignature fields = fromMaybe "" signature where
-	signature = listToMaybe [x | M.Signature x <- fields]
-
-buildReceivedMessage :: Word8 -> [M.HeaderField] -> E.ErrorM Text
-                        (M.Serial -> (Set.Set M.Flag) -> [T.Variant]
-                         -> M.ReceivedMessage)
-
-buildReceivedMessage 1 fields = do
-	path <- require "path" [x | M.Path x <- fields]
-	member <- require "member name" [x | M.Member x <- fields]
-	return $ \serial flags body -> let
-		iface = listToMaybe [x | M.Interface x <- fields]
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.MethodCall path member iface dest flags body
-		in M.ReceivedMethodCall serial sender msg
-
-buildReceivedMessage 2 fields = do
-	replySerial <- require "reply serial" [x | M.ReplySerial x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.MethodReturn replySerial dest body
-		in M.ReceivedMethodReturn serial sender msg
-
-buildReceivedMessage 3 fields = do
-	name <- require "error name" [x | M.ErrorName x <- fields]
-	replySerial <- require "reply serial" [x | M.ReplySerial x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.Error name replySerial dest body
-		in M.ReceivedError serial sender msg
-
-buildReceivedMessage 4 fields = do
-	path <- require "path" [x | M.Path x <- fields]
-	member <- require "member name" [x | M.Member x <- fields]
-	iface <- require "interface" [x | M.Interface x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.Signal path member iface dest body
-		in M.ReceivedSignal serial sender msg
-
-buildReceivedMessage typeCode fields = return $ \serial flags body -> let
-	sender = listToMaybe [x | M.Sender x <- fields]
-	msg = M.Unknown typeCode flags body
-	in M.ReceivedUnknown serial sender msg
-
-require :: Text -> [a] -> E.ErrorM Text a
-require _     (x:_) = return x
-require label _     = E.throwErrorM label
diff --git a/hs/Tests.hs b/hs/Tests.hs
deleted file mode 100644
--- a/hs/Tests.hs
+++ /dev/null
@@ -1,520 +0,0 @@
-
-
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
--- 
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation, either version 3 of the License, or
--- any later version.
--- 
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--- GNU General Public License for more details.
--- 
--- You should have received a copy of the GNU General Public License
--- along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-{-# LANGUAGE OverloadedStrings #-}
-
-module Main (tests, main) where
-
-import Test.QuickCheck
-import qualified Test.Framework as F
-import Test.Framework.Providers.QuickCheck2 (testProperty)
-
-import Control.Arrow ((&&&))
-import Control.Monad (replicateM)
-import qualified Data.Binary.Get as G
-import Data.Char (isPrint)
-import Data.String
-import Data.List (intercalate, isInfixOf)
-import Data.Maybe (fromJust, isJust, isNothing)
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import qualified Data.Text as T
-import qualified Data.Text.Lazy as TL
-import Data.Word (Word8, Word16, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-
-import DBus.Address
-import DBus.Message.Internal
-import DBus.Types
-import DBus.Wire.Internal
-import DBus.Wire.Marshal
-import DBus.Wire.Unmarshal
-import qualified DBus.Introspection as I
-
-
-tests :: [F.Test]
-tests = [ F.testGroup "dummy" []
-
-	, F.testGroup "String"
-		[ testProperty "String -> strict Text"
-			$ funEq (fromVariant . toVariant) (Just . T.pack)
-		, testProperty "String <- strict Text"
-			$ funEq (fromVariant . toVariant) (Just . T.unpack)
-		, testProperty "String -> lazy Text"
-			$ funEq (fromVariant . toVariant) (Just . TL.pack)
-		, testProperty "String <- lazy Text"
-			$ funEq (fromVariant . toVariant) (Just . TL.unpack)
-		, testProperty "Strict Text -> lazy Text"
-			$ funEq (fromVariant . toVariant) (Just . TL.pack . T.unpack)
-		, testProperty "Strict Text <- lazy Text"
-			$ funEq (fromVariant . toVariant) (Just . T.pack . TL.unpack)
-		]
-
-	, F.testGroup "Signature"
-		[ testProperty "Signature identity"
-			$ funEq (mkSignature . strSignature) Just
-		]
-
-	, F.testGroup "ObjectPath"
-		[ testProperty "ObjectPath identity"
-			$ funEq (mkObjectPath . strObjectPath) Just
-		]
-
-	, F.testGroup "Array"
-		[ testProperty "Array identity"
-			$ \x -> Just x == arrayFromItems (arrayType x) (arrayItems x)
-		, testProperty "Array homogeneity" prop_ArrayHomogeneous
-		]
-
-	, F.testGroup "Dictionary"
-		[ testProperty "Dictionary identity"
-			$ \x -> Just x == dictionaryFromItems
-				(dictionaryKeyType x)
-				(dictionaryValueType x)
-				(dictionaryItems x)
-		, testProperty "Dictionary homogeneity" prop_DictionaryHomogeneous
-		, testProperty "Dictionary must have atomic keys" 
-			$ \vt -> forAll containerType $ \kt ->
-				isNothing (dictionaryFromItems kt vt [])
-		, testProperty "Dictionary <-> Array conversion"
-			$ funEq (arrayToDictionary . dictionaryToArray) Just
-		]
-
-	, F.testGroup "BusName"
-		[ testProperty "BusName identity"
-			$ funEq (mkBusName . strBusName) Just
-		]
-
-	, F.testGroup "InterfaceName"
-		[ testProperty "InterfaceName identity"
-			$ funEq (mkInterfaceName . strInterfaceName) Just
-		]
-
-	, F.testGroup "ErrorName"
-		[ testProperty "ErrorName identity"
-			$ funEq (mkErrorName . strErrorName) Just
-		]
-
-	, F.testGroup "MemberName"
-		[ testProperty "MemberName identity"
-			$ funEq (mkMemberName . strMemberName) Just
-		]
-
-	, F.testGroup "Wire format"
-		[ testProperty "Marshal -> Ummarshal" prop_Unmarshal
-		, F.testGroup "Messages"
-			[ testProperty "Method calls" prop_WireMethodCall
-			, testProperty "Method returns" prop_WireMethodReturn
-			, testProperty "Errors" prop_WireError
-			, testProperty "Signals" prop_WireSignal
-			]
-		]
-
-	, F.testGroup "Addresses"
-		[ testProperty "Address identity"
-			$ \x -> mkAddresses (strAddress x) == Just [x]
-		, testProperty "Multiple addresses"
-			$ \x y -> let
-			joined = TL.concat [strAddress x, ";", strAddress y]
-			in mkAddresses joined == Just [x, y]
-		, testProperty "Ignore trailing semicolon"
-			$ \x -> mkAddresses (TL.append (strAddress x) ";") == Just [x]
-		, testProperty "Ignore trailing comma"
-			$ \x -> let
-			hasParams = not . Map.null . addressParameters $ x
-			parsed = mkAddresses (TL.append (strAddress x) ",")
-			in hasParams ==> parsed == Just [x]
-		, F.testGroup "Valid addresses"
-			[ test "colon" $ isJust . mkAddresses $ ":"
-			, test "just scheme" $ isJust . mkAddresses $ "a:"
-			, test "param" $ isJust . mkAddresses $ "a:b=c"
-			, test "trailing semicolon" $ isJust . mkAddresses $ "a:;"
-			, test "two schemes" $ isJust . mkAddresses $ "a:;b:"
-			, test "trailing comma" $ isJust . mkAddresses $ "a:b=c,"
-			]
-		, F.testGroup "Invalid addresses"
-			[ test "empty" $ isNothing . mkAddresses $ ""
-			, test "no colon" $ isNothing . mkAddresses $ "a"
-			, test "no equals" $ isNothing . mkAddresses $ "a:b"
-			, test "no param" $ isNothing . mkAddresses $ "a:b="
-			, test "no param" $ isNothing . mkAddresses $ "a:,"
-			]
-		]
-
-	, F.testGroup "Introspection"
-		[ testProperty "Generate -> Parse"
-			$ \x@(I.Object path _ _) -> let
-			xml = I.toXML x
-			Just xml' = xml
-			parsed = I.fromXML path xml'
-			in isJust xml ==> I.fromXML path xml' == Just x
-		]
-
-	]
-
-main :: IO ()
-main = F.defaultMain tests
-
-instance Arbitrary Type where
-	arbitrary = oneof [atomicType, containerType]
-
-atomicType :: Gen Type
-atomicType = elements
-	[ DBusBoolean
-	, DBusByte
-	, DBusWord16
-	, DBusWord32
-	, DBusWord64
-	, DBusInt16
-	, DBusInt32
-	, DBusInt64
-	, DBusDouble
-	, DBusString
-	, DBusObjectPath
-	, DBusSignature
-	]
-
-containerType :: Gen Type
-containerType = do
-	c <- choose (0,3) :: Gen Int
-	case c of
-		0 -> fmap DBusArray arbitrary
-		1 -> do
-			kt <- atomicType
-			vt <- arbitrary
-			return $ DBusDictionary kt vt
-		2 -> fmap DBusStructure $ halfSized arbitrary
-		3 -> return DBusVariant
-
-instance Arbitrary Variant where
-	arbitrary = arbitrary >>= genVariant
-
-genVariant :: Type -> Gen Variant
-genVariant t = case t of
-	DBusBoolean          -> fmap toVariant (arbitrary :: Gen Bool)
-	DBusByte             -> fmap toVariant (arbitrary :: Gen Word8)
-	DBusWord16           -> fmap toVariant (arbitrary :: Gen Word16)
-	DBusWord32           -> fmap toVariant (arbitrary :: Gen Word32)
-	DBusWord64           -> fmap toVariant (arbitrary :: Gen Word64)
-	DBusInt16            -> fmap toVariant (arbitrary :: Gen Int16)
-	DBusInt32            -> fmap toVariant (arbitrary :: Gen Int32)
-	DBusInt64            -> fmap toVariant (arbitrary :: Gen Int64)
-	DBusDouble           -> fmap toVariant (arbitrary :: Gen Double)
-	DBusString           -> fmap toVariant (arbitrary :: Gen String)
-	DBusObjectPath       -> fmap toVariant (arbitrary :: Gen ObjectPath)
-	DBusSignature        -> fmap toVariant (arbitrary :: Gen Signature)
-	(DBusArray _)        -> fmap toVariant (arbitrary :: Gen Array)
-	(DBusDictionary _ _) -> fmap toVariant (arbitrary :: Gen Dictionary)
-	(DBusStructure _)    -> fmap toVariant (arbitrary :: Gen Structure)
-	DBusVariant          -> fmap toVariant (arbitrary :: Gen Variant)
-
-instance Arbitrary Signature where
-	arbitrary = sizedText 255 $ fmap (TL.concat . map typeCode) arbitrary
-
-instance Arbitrary ObjectPath where
-	arbitrary = fmap (mkObjectPath_ . TL.pack) path' where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "_"
-		path = fmap (intercalate "/" . ([] :)) genElements
-		path' = frequency [(1, return "/"), (9, path)]
-		genElements = atLeast 1 (atLeast 1 (elements c))
-
-instance Arbitrary Array where
-	arbitrary = do
-		t <- atomicType
-		xs <- listOf $ genVariant t
-		return . fromJust $ arrayFromItems t xs
-
-prop_ArrayHomogeneous vs = isJust array == homogeneousTypes where
-	array = arrayFromItems firstType vs
-	homogeneousTypes = all (== firstType) types
-	types = map variantType vs
-	firstType = if null types
-		then DBusByte
-		else head types
-
-instance Arbitrary Dictionary where
-	arbitrary = do
-		kt <- atomicType
-		vt <- atomicType
-		ks <- listOf $ genVariant kt
-		vs <- vectorOf (length ks) $ genVariant vt
-		
-		return . fromJust $ dictionaryFromItems kt vt $ zip ks vs
-
-prop_DictionaryHomogeneous x = all correctType pairs where
-	pairs = dictionaryItems x
-	kType = dictionaryKeyType x
-	vType = dictionaryValueType x
-	correctType (k, v) = variantType k == kType &&
-	                     variantType v == vType
-
-instance Arbitrary Structure where
-	arbitrary = fmap Structure $ halfSized arbitrary
-
-instance Arbitrary BusName where
-	arbitrary = sizedText 255 (oneof [unique, wellKnown]) where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
-		c' = c ++ ['0'..'9']
-		
-		unique = do
-			elems' <- atLeast 2 $ elems c'
-			return . TL.pack $ ':' : intercalate "." elems'
-		
-		wellKnown = do
-			elems' <- atLeast 2 $ elems c
-			return . TL.pack $ intercalate "." elems'
-		
-		elems start = do
-			x <- elements start
-			xs <- atLeast 0 (elements c')
-			return (x:xs)
-
-instance Arbitrary InterfaceName where
-	arbitrary = sizedText 255 genName where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-		c' = c ++ ['0'..'9']
-		
-		genName = fmap (TL.pack . intercalate ".") genElements
-		genElements = atLeast 2 genElement
-		genElement = do
-			x <- elements c
-			xs <- atLeast 0 (elements c')
-			return (x:xs)
-
-instance Arbitrary ErrorName where
-	arbitrary = fmap (mkErrorName_ . strInterfaceName) arbitrary
-
-instance Arbitrary MemberName where
-	arbitrary = sizedText 255 genName where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-		c' = c ++ ['0'..'9']
-		
-		genName = do
-			x <- elements c
-			xs <- atLeast 0 (elements c')
-			return . TL.pack $ (x:xs)
-
-instance Arbitrary Flag where
-	arbitrary = elements [NoReplyExpected, NoAutoStart]
-
-instance Arbitrary Serial where
-	arbitrary = fmap Serial arbitrary
-
-instance Arbitrary MethodCall where
-	arbitrary = do
-		path   <- arbitrary
-		member <- arbitrary
-		iface  <- arbitrary
-		dest   <- arbitrary
-		flags  <- fmap Set.fromList arbitrary
-		Structure body <- arbitrary
-		return $ MethodCall path member iface dest flags body
-
-instance Arbitrary MethodReturn where
-	arbitrary = do
-		serial <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ MethodReturn serial dest body
-
-instance Arbitrary Error where
-	arbitrary = do
-		name   <- arbitrary
-		serial <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ Error name serial dest body
-
-instance Arbitrary Signal where
-	arbitrary = do
-		path   <- arbitrary
-		member <- arbitrary
-		iface  <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ Signal path member iface dest body
-
-instance Arbitrary Endianness where
-	arbitrary = elements [LittleEndian, BigEndian]
-
-prop_Unmarshal :: Endianness -> Variant -> Property
-prop_Unmarshal e x = valid ==> unmarshaled == Right [x] where
-	sig = mkSignature . typeCode . variantType $ x
-	Just sig' = sig
-	
-	bytes = runMarshal (marshal x) e
-	Right bytes' = bytes
-	
-	valid = isJust sig && isRight bytes
-	unmarshaled = runUnmarshal (unmarshal sig') e bytes'
-
-prop_MarshalMessage e serial msg expected = valid ==> correct where
-	bytes = marshalMessage e serial msg
-	Right bytes' = bytes
-	
-	getBytes = G.getLazyByteString . fromIntegral
-	unmarshaled = G.runGet (unmarshalMessage getBytes) bytes'
-	
-	valid = isRight bytes
-	correct = unmarshaled == Right expected
-
-prop_WireMethodCall e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedMethodCall serial Nothing msg
-
-prop_WireMethodReturn e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedMethodReturn serial Nothing msg
-
-prop_WireError e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedError serial Nothing msg
-
-prop_WireSignal e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedSignal serial Nothing msg
-
-instance Arbitrary Address where
-	arbitrary = genAddress where
-		optional = ['0'..'9'] ++ ['a'..'z'] ++ ['A'..'Z'] ++ "-_/\\*."
-		methodChars = filter (flip notElem ":;") ['!'..'~']
-		keyChars = filter (flip notElem "=;,") ['!'..'~']
-		
-		genMethod = atLeast 0 $ elements methodChars
-		genParam = do
-			key <- genKey
-			value <- genValue
-			return . concat $ [key, "=", value]
-		
-		genKey = atLeast 1 $ elements keyChars
-		genValue = oneof [encodedValue, plainValue]
-		genHex = elements $ ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F']
-		encodedValue = do
-			x1 <- genHex
-			x2 <- genHex
-			return ['%', x1, x2]
-		plainValue = atLeast 1 $ elements optional
-		
-		genParams = do
-			params <- atLeast 0 genParam
-			let params' = intercalate "," params
-			extraComma <- if null params
-				then return ""
-				else elements ["", ","]
-			return $ concat [params', extraComma]
-		
-		genAddress = do
-			m <- genMethod
-			params <- genParams
-			extraSemicolon <- elements ["", ";"]
-			let addrStr = concat [m, ":", params, extraSemicolon]
-			let Just [addr] = mkAddresses $ TL.pack addrStr
-			return addr
-
-subObject :: ObjectPath -> Gen I.Object
-subObject parentPath = sized $ \n -> resize (min n 4) $ do
-	let nonRoot = do
-		x <- arbitrary
-		case strObjectPath x of
-			"/" -> nonRoot
-			x'  -> return x'
-	
-	thisPath <- nonRoot
-	let path' = case strObjectPath parentPath of
-		"/" -> thisPath
-		x   -> TL.append x thisPath
-	let path = mkObjectPath_ path'
-	ifaces <- arbitrary
-	children <- halfSized . listOf . subObject $ path
-	return $ I.Object path ifaces children
-
-instance Arbitrary I.Object where
-	arbitrary = arbitrary >>= subObject
-
-instance Arbitrary I.Interface where
-	arbitrary = do
-		name <- arbitrary
-		methods <- arbitrary
-		signals <- arbitrary
-		properties <- arbitrary
-		return $ I.Interface name methods signals properties
-
-instance Arbitrary I.Method where
-	arbitrary = do
-		name <- arbitrary
-		inParams <- arbitrary
-		outParams <- arbitrary
-		return $ I.Method name inParams outParams
-
-instance Arbitrary I.Signal where
-	arbitrary = do
-		name <- arbitrary
-		params <- arbitrary
-		return $ I.Signal name params
-
-singleType :: Gen Signature
-singleType = do
-	t <- arbitrary
-	case mkSignature $ typeCode t of
-		Just x -> return x
-		Nothing -> singleType
-
-instance Arbitrary I.Parameter where
-	arbitrary = do
-		name <- listOf $ arbitrary `suchThat` isPrint
-		sig <- singleType
-		return $ I.Parameter (TL.pack name) sig
-
-instance Arbitrary I.Property where
-	arbitrary = do
-		name <- listOf $ arbitrary `suchThat` isPrint
-		sig <- singleType
-		access <- elements
-			[[], [I.Read], [I.Write],
-			 [I.Read, I.Write]]
-		return $ I.Property (TL.pack name) sig access
-
-halfSized :: Gen a -> Gen a
-halfSized gen = sized $ \n -> if n > 0 then
-	resize (n `div` 2) gen
-	else gen
-
-funEq :: Eq b => (a -> b) -> (a -> b) -> a -> Bool
-funEq f g x = f x == g x
-
-sizedText :: (IsString a, Arbitrary a) => Integer -> Gen TL.Text -> Gen a
-sizedText maxSize gen = step where
-	step = do
-		s <- gen
-		if toInteger (TL.length s) > maxSize
-			then halfSized step
-			else return . fromString . TL.unpack $ s
-
-atLeast :: Int -> Gen a -> Gen [a]
-atLeast minSize g = sized $ \n -> do
-	count <- choose (minSize, max minSize n)
-	replicateM count g
-
-isRight :: Either a b -> Bool
-isRight = either (const False) (const True)
-
-test :: Testable a => F.TestName -> a -> F.Test
-test name prop = F.plusTestOptions options (testProperty name prop) where
-	options = F.TestOptions Nothing (Just 1) Nothing Nothing
-
-instance Arbitrary T.Text where
-	arbitrary = fmap T.pack arbitrary
-
-instance Arbitrary TL.Text where
-	arbitrary = fmap TL.pack arbitrary
diff --git a/latex/figure_1.svg b/latex/figure_1.svg
new file mode 100644
--- /dev/null
+++ b/latex/figure_1.svg
@@ -0,0 +1,4840 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.1 r9760"
+   sodipodi:docname="figure_1.svg">
+  <defs
+     id="defs4">
+    <radialGradient
+       gradientTransform="matrix(2.382716e-8,-0.296405,1.43676,4.683673e-7,-128.544,150.5202)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2795"
+       id="radialGradient1480"
+       fy="132.28575"
+       fx="61.518883"
+       r="29.036913"
+       cy="132.28575"
+       cx="61.518883" />
+    <linearGradient
+       gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4689"
+       id="linearGradient1478"
+       y2="114.39767"
+       x2="135.66525"
+       y1="20.603781"
+       x1="26.648937" />
+    <linearGradient
+       gradientTransform="matrix(0.562541,0,0,0.567972,-9.399749,-5.305317)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4671"
+       id="linearGradient1475"
+       y2="137.27299"
+       x2="112.03144"
+       y1="192.35176"
+       x1="150.96111" />
+    <radialGradient
+       gradientTransform="matrix(1,0,0,0.177966,0,108.7434)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient2795"
+       id="radialGradient2801"
+       fy="132.28575"
+       fx="61.518883"
+       r="29.036913"
+       cy="132.28575"
+       cx="61.518883" />
+    <linearGradient
+       gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4689"
+       id="linearGradient2258"
+       y2="76.313133"
+       x2="26.670298"
+       y1="76.176224"
+       x1="172.94208" />
+    <linearGradient
+       gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4671"
+       id="linearGradient2255"
+       y2="144.75717"
+       x2="-65.308502"
+       y1="144.75717"
+       x1="224.23996" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4671"
+       id="linearGradient2250"
+       y2="144.75717"
+       x2="-65.308502"
+       y1="144.75717"
+       x1="224.23996" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4689"
+       id="linearGradient2248"
+       y2="76.313133"
+       x2="26.670298"
+       y1="77.475983"
+       x1="172.94208" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4671"
+       id="linearGradient2589"
+       y2="144.75717"
+       x2="-65.308502"
+       y1="144.75717"
+       x1="224.23996" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4689"
+       id="linearGradient2587"
+       y2="76.313133"
+       x2="26.670298"
+       y1="77.475983"
+       x1="172.94208" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4689"
+       id="linearGradient2990"
+       y2="76.313133"
+       x2="26.670298"
+       y1="77.475983"
+       x1="172.94208" />
+    <linearGradient
+       gradientTransform="translate(100.2702,99.61116)"
+       gradientUnits="userSpaceOnUse"
+       xlink:href="#linearGradient4671"
+       id="linearGradient2987"
+       y2="144.75717"
+       x2="-65.308502"
+       y1="144.75717"
+       x1="224.23996" />
+    <linearGradient
+       id="linearGradient4689">
+      <stop
+         id="stop4691"
+         offset="0"
+         style="stop-color:#5a9fd4;stop-opacity:1" />
+      <stop
+         id="stop4693"
+         offset="1"
+         style="stop-color:#306998;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4671">
+      <stop
+         id="stop4673"
+         offset="0"
+         style="stop-color:#ffd43b;stop-opacity:1" />
+      <stop
+         id="stop4675"
+         offset="1"
+         style="stop-color:#ffe873;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3236">
+      <stop
+         id="stop3244"
+         offset="0"
+         style="stop-color:#f4f4f4;stop-opacity:1" />
+      <stop
+         id="stop3240"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3676">
+      <stop
+         id="stop3678"
+         offset="0"
+         style="stop-color:#b2b2b2;stop-opacity:0.5" />
+      <stop
+         id="stop3680"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2787">
+      <stop
+         id="stop2789"
+         offset="0"
+         style="stop-color:#7f7f7f;stop-opacity:0.5" />
+      <stop
+         id="stop2791"
+         offset="1"
+         style="stop-color:#7f7f7f;stop-opacity:0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2795">
+      <stop
+         id="stop2797"
+         offset="0"
+         style="stop-color:#b8b8b8;stop-opacity:0.49803922" />
+      <stop
+         id="stop2799"
+         offset="1"
+         style="stop-color:#7f7f7f;stop-opacity:0" />
+    </linearGradient>
+    <clipPath
+       id="clip1">
+      <path
+         id="path4204"
+         d="M 0 340.15625 L 481.890625 340.15625 L 481.890625 0 L 0 0 L 0 340.15625 Z M 0 340.15625 " />
+    </clipPath>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_3_"
+       id="linearGradient9566"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.342"
+       y1="259.30521"
+       x2="195.5984"
+       y2="259.30521" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_4_"
+       id="linearGradient9568"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.2932"
+       y1="259.311"
+       x2="195.5535"
+       y2="259.311" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_5_"
+       id="linearGradient9570"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.24541"
+       y1="259.31689"
+       x2="195.50951"
+       y2="259.31689" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_6_"
+       id="linearGradient9572"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.1965"
+       y1="259.32181"
+       x2="195.4646"
+       y2="259.32181" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_7_"
+       id="linearGradient9574"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.14771"
+       y1="259.32669"
+       x2="195.4216"
+       y2="259.32669" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_8_"
+       id="linearGradient9576"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.09891"
+       y1="259.33151"
+       x2="195.37869"
+       y2="259.33151" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_9_"
+       id="linearGradient9578"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.05099"
+       y1="259.3364"
+       x2="195.3376"
+       y2="259.3364" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_10_"
+       id="linearGradient9580"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="129.0032"
+       y1="259.3403"
+       x2="195.2957"
+       y2="259.3403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_11_"
+       id="linearGradient9582"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.9543"
+       y1="259.34329"
+       x2="195.25459"
+       y2="259.34329" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_12_"
+       id="linearGradient9584"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.90649"
+       y1="259.34811"
+       x2="195.21561"
+       y2="259.34811" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_13_"
+       id="linearGradient9586"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.8567"
+       y1="259.3501"
+       x2="195.17551"
+       y2="259.3501" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_14_"
+       id="linearGradient9588"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.80881"
+       y1="259.354"
+       x2="195.13651"
+       y2="259.354" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_15_"
+       id="linearGradient9590"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.75999"
+       y1="259.35599"
+       x2="195.0994"
+       y2="259.35599" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_16_"
+       id="linearGradient9592"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.7122"
+       y1="259.35791"
+       x2="195.0623"
+       y2="259.35791" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_17_"
+       id="linearGradient9594"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.6633"
+       y1="259.35989"
+       x2="195.0251"
+       y2="259.35989" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_18_"
+       id="linearGradient9596"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.61549"
+       y1="259.36179"
+       x2="194.989"
+       y2="259.36179" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_19_"
+       id="linearGradient9598"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.5667"
+       y1="259.3638"
+       x2="194.9539"
+       y2="259.3638" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_20_"
+       id="linearGradient9600"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.51781"
+       y1="259.36569"
+       x2="194.91769"
+       y2="259.36569" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_21_"
+       id="linearGradient9602"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.47"
+       y1="259.3667"
+       x2="194.8855"
+       y2="259.3667" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#SVGID_22_"
+       id="linearGradient9604"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)"
+       x1="128.4211"
+       y1="259.36871"
+       x2="194.8503"
+       y2="259.36871" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4689"
+       id="linearGradient9615"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.562541,0,0,0.567972,-553.41687,573.86291)"
+       x1="26.648937"
+       y1="20.603781"
+       x2="135.66525"
+       y2="114.39767" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4671"
+       id="linearGradient9617"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.562541,0,0,0.567972,-553.41687,573.86291)"
+       x1="150.96111"
+       y1="192.35176"
+       x2="112.03144"
+       y2="137.27299" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.98994949"
+     inkscape:cx="391.89513"
+     inkscape:cy="493.0542"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="2560"
+     inkscape:window-height="1575"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="fill:none;stroke:#000000;stroke-width:0.875036;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3019"
+       width="451.72684"
+       height="44.777618"
+       x="144.81699"
+       y="67.943985"
+       rx="18.096676"
+       ry="18.096676" />
+    <g
+       id="g9606"
+       transform="matrix(0.5834591,0,0,0.5834591,436.21466,-237.52698)">
+      <rect
+         ry="32.344883"
+         rx="24.748741"
+         y="752.36218"
+         x="0"
+         height="300"
+         width="250"
+         id="rect2989-2"
+         style="fill:#a8e8a8;fill-opacity:1;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none" />
+      <g
+         transform="matrix(1.3493899,0,0,1.3493899,776.54627,90.549724)"
+         id="g3993">
+        <path
+           inkscape:connector-curvature="0"
+           id="path1948"
+           style="fill:url(#linearGradient9615);fill-opacity:1"
+           d="m -483.50696,585.5662 c -4.58366,0.0213 -8.96094,0.41222 -12.8125,1.09375 -11.34622,2.00451 -13.40625,6.2001 -13.40625,13.9375 l 0,10.21875 26.8125,0 0,3.40625 -26.8125,0 -10.0625,0 c -7.79246,0 -14.61576,4.68372 -16.75,13.59375 -2.46182,10.21297 -2.57102,16.58603 0,27.25 1.90592,7.93785 6.45754,13.59375 14.25,13.59375 l 9.21875,0 0,-12.25 c 0,-8.8499 7.65714,-16.65625 16.75,-16.65625 l 26.78125,0 c 7.45495,0 13.40625,-6.13816 13.40625,-13.625 l 0,-25.53125 c 0,-7.26634 -6.12998,-12.72477 -13.40625,-13.9375 -4.60599,-0.76672 -9.3851,-1.11505 -13.96875,-1.09375 z m -14.5,8.21875 c 2.76954,0 5.03125,2.29865 5.03125,5.125 -1e-5,2.81634 -2.26171,5.09375 -5.03125,5.09375 -2.77948,0 -5.03125,-2.27741 -5.03125,-5.09375 0,-2.82635 2.25177,-5.125 5.03125,-5.125 z" />
+        <path
+           inkscape:connector-curvature="0"
+           id="path1950"
+           style="fill:url(#linearGradient9617);fill-opacity:1"
+           d="m -452.78821,614.22245 0,11.90625 c 0,9.23076 -7.8259,17 -16.75,17 l -26.78125,0 c -7.33584,0 -13.40625,6.27849 -13.40625,13.625 l 0,25.53125 c 0,7.26634 6.31858,11.54032 13.40625,13.625 8.48733,2.49561 16.62623,2.94663 26.78125,0 6.75015,-1.95439 13.40625,-5.88761 13.40625,-13.625 l 0,-10.21875 -26.78125,0 0,-3.40625 26.78125,0 13.40625,0 c 7.79246,0 10.69625,-5.4354 13.40624,-13.59375 2.79933,-8.39888 2.68022,-16.47577 0,-27.25 -1.92578,-7.75744 -5.60387,-13.59375 -13.40624,-13.59375 l -10.0625,0 z m -15.0625,64.65625 c 2.77947,10e-6 5.03125,2.27742 5.03125,5.09375 -1e-5,2.82635 -2.25178,5.125 -5.03125,5.125 -2.76955,0 -5.03125,-2.29865 -5.03125,-5.125 0,-2.81633 2.26169,-5.09375 5.03125,-5.09375 z" />
+      </g>
+      <text
+         sodipodi:linespacing="125%"
+         id="text4001"
+         y="814.11102"
+         x="123.97265"
+         style="font-size:48px;font-style:normal;font-weight:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+         xml:space="preserve"><tspan
+           y="814.11102"
+           x="123.97265"
+           id="tspan4003"
+           sodipodi:role="line">Exaile</tspan><tspan
+           style="font-size:20px;text-align:center;text-anchor:middle"
+           id="tspan8676"
+           y="846.20203"
+           x="123.97265"
+           sodipodi:role="line">(via dbus-python)</tspan></text>
+    </g>
+    <text
+       xml:space="preserve"
+       style="font-size:28.00603485px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="262.47293"
+       y="100.05665"
+       id="text4274"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4276"
+         x="262.47293"
+         y="100.05665">D-Bus Server</tspan></text>
+    <rect
+       style="fill:#a8c2e8;fill-opacity:1;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none"
+       id="rect2989"
+       width="145.86478"
+       height="175.03773"
+       x="126.98133"
+       y="201.44559"
+       rx="12.707091"
+       ry="23.531624" />
+    <text
+       xml:space="preserve"
+       style="font-size:28.00600433px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="197.34752"
+       y="233.69444"
+       id="text3021"
+       sodipodi:linespacing="125%"
+       transform="scale(0.99999881,1.0000012)"><tspan
+         sodipodi:role="line"
+         id="tspan3023"
+         x="197.34752"
+         y="233.69444"
+         style="text-align:center;text-anchor:middle">XMonad</tspan><tspan
+         sodipodi:role="line"
+         x="197.34752"
+         y="252.41823"
+         id="tspan8674"
+         style="font-size:11.66916943px;text-align:center;text-anchor:middle">(via dbus-core)</tspan></text>
+    <g
+       id="g4268"
+       transform="matrix(0.49752567,0,0,0.58735981,131.10316,234.82886)">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#4b5457;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 50.351448,211.37074 41.390427,-62.08493 -41.390427,-62.084927 31.042464,0 41.390428,62.084927 -41.390428,62.08493 -31.042464,0 z m 0,0"
+         id="path4209" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#717f81;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="M 91.741875,211.37074 133.1323,149.28581 91.741875,87.200883 l 31.042465,0 82.77943,124.169857 -31.04247,0 -25.86777,-38.80237 -25.86919,38.80237 -31.042465,0 z m 0,0"
+         id="path4211" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#4b5457;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 191.76791,175.155 -13.79586,-20.69449 48.28764,-0.001 0,20.69592 -34.49178,0 z m 0,0"
+         id="path4213" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#4b5457;fill-opacity:1;fill-rule:nonzero;stroke:none"
+         d="m 171.07341,144.11254 -13.79729,-20.6945 68.98357,-0.001 0,20.69593 -55.18628,0 z m 0,0"
+         id="path4215" />
+    </g>
+    <text
+       xml:space="preserve"
+       style="font-size:28.00603485px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="246.07811"
+       y="365.35306"
+       id="text8668"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan8670"
+         x="246.07811"
+         y="365.35306"> </tspan></text>
+    <g
+       id="g8691"
+       transform="matrix(0.5834591,0,0,0.5834591,281.59799,-237.52698)">
+      <rect
+         ry="30.495037"
+         rx="22.873447"
+         y="752.36218"
+         x="0"
+         height="300"
+         width="250"
+         id="rect8672"
+         style="opacity:0.62000002;fill:#b4a8e8;fill-opacity:1;stroke:none" />
+      <text
+         sodipodi:linespacing="125%"
+         id="text4278"
+         y="817.63446"
+         x="124.97656"
+         style="font-size:48px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+         xml:space="preserve"><tspan
+           style="text-align:center;text-anchor:middle"
+           y="817.63446"
+           x="124.97656"
+           id="tspan4280"
+           sodipodi:role="line">Linux</tspan><tspan
+           style="font-size:20px;text-align:center;text-anchor:middle"
+           id="tspan8666"
+           y="849.72546"
+           x="124.97656"
+           sodipodi:role="line">(via HAL)</tspan></text>
+      <g
+         transform="matrix(0.45142651,0,0,0.45142651,49.089473,865.50319)"
+         id="g7796">
+        <path
+           style="fill:url(#SVGID_1_)"
+           inkscape:connector-curvature="0"
+           d="m 334.297,344.885 c 0,25.898 -41.989,46.893 -93.785,46.893 -51.795,0 -93.784,-20.994 -93.784,-46.893 0,-25.899 41.989,-46.893 93.784,-46.893 51.795,10e-4 93.785,20.995 93.785,46.893 z"
+           id="path6069" />
+        <path
+           style="fill:url(#SVGID_2_)"
+           inkscape:connector-curvature="0"
+           d="m 194.628,344.381 c 0,25.897 -43.117,46.892 -96.306,46.892 -53.188,0 -96.305,-20.994 -96.305,-46.892 0,-25.898 43.117,-46.893 96.305,-46.893 53.188,10e-4 96.306,20.995 96.306,46.893 z"
+           id="path6076" />
+        <g
+           id="g6078">
+          <path
+             inkscape:connector-curvature="0"
+             d="m 304.732,246.606 c -4.752,19.584 -28.872,60.48 -41.688,78.48 -12.815,18.072 -11.231,34.344 -34.92,28.008 -23.616,-6.336 -30.24,-5.184 -54.647,-3.744 -24.265,1.439 -19.009,-0.721 -34.2,6.12 -15.12,6.84 -65.88,-82.944 -69.984,-99.647 -4.031,-16.705 -5.976,-14.689 4.536,-32.761 10.513,-18.071 12.024,-35.928 25.92,-57.816 13.896,-21.96 29.952,-33.12 28.8,-49.896 -4.535,-62.28 -8.136,-93.384 19.513,-107.784 26.352,-13.68 48.384,-5.544 57.096,-0.864 3.744,2.016 11.376,5.904 17.064,12.744 5.688,6.696 10.8,16.848 13.68,29.664 5.904,25.704 -2.448,17.208 4.248,46.656 6.624,29.375 20.088,43.775 36.504,67.031 16.414,23.257 33.55,61.633 28.078,83.809 z"
+             id="path6080" />
+          <g
+             id="g6082">
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 148.47,94.049 c 4.319,-1.728 3.592,-1.958 6.472,-8.222 2.304,-4.824 4.328,-6.898 4.256,-14.242 0,-7.2 -2.232,-9.648 -5.616,-14.328 -3.24,-4.464 -8.424,-4.68 -11.664,-4.104 -1.872,0.288 -4.319,2.664 -5.976,6.192 -1.08,2.376 -1.944,5.4 -2.017,8.568 -0.216,8.496 0.505,11.736 2.448,17.496 2.305,6.769 7.921,10.297 12.097,8.64 z"
+               id="path6084" />
+            <g
+               id="g6086">
+              <path
+                 style="fill:#6d6d6d"
+                 inkscape:connector-curvature="0"
+                 d="m 148.47,94.023 c 4.293,-1.717 3.563,-1.954 6.425,-8.178 2.289,-4.793 4.312,-6.861 4.271,-14.164 0.027,-7.152 -2.162,-9.702 -5.488,-14.201 -3.296,-4.345 -8.376,-4.509 -11.593,-3.953 -1.916,0.283 -4.354,2.569 -6.038,5.968 -1.159,2.31 -2.016,5.353 -2.087,8.535 -0.212,8.438 0.547,11.691 2.46,17.417 2.268,6.731 7.901,10.221 12.05,8.576 z"
+                 id="path6088" />
+              <path
+                 style="fill:#757575"
+                 inkscape:connector-curvature="0"
+                 d="m 148.471,93.996 c 4.264,-1.706 3.533,-1.95 6.377,-8.133 2.273,-4.762 4.296,-6.823 4.288,-14.085 0.053,-7.105 -2.093,-9.756 -5.363,-14.075 -3.35,-4.225 -8.327,-4.338 -11.52,-3.801 -1.961,0.278 -4.389,2.474 -6.099,5.744 -1.242,2.245 -2.089,5.305 -2.16,8.501 -0.207,8.38 0.591,11.647 2.473,17.34 2.231,6.691 7.881,10.144 12.004,8.509 z"
+                 id="path6090" />
+              <path
+                 style="fill:#7c7c7c"
+                 inkscape:connector-curvature="0"
+                 d="m 148.471,93.969 c 4.235,-1.694 3.506,-1.946 6.329,-8.089 2.26,-4.731 4.28,-6.786 4.304,-14.006 0.081,-7.058 -2.021,-9.811 -5.236,-13.948 -3.403,-4.105 -8.278,-4.167 -11.446,-3.649 -2.006,0.273 -4.424,2.379 -6.16,5.519 -1.322,2.179 -2.161,5.257 -2.232,8.468 -0.202,8.323 0.636,11.603 2.486,17.261 2.191,6.654 7.859,10.068 11.955,8.444 z"
+                 id="path6092" />
+              <path
+                 style="fill:#848484"
+                 inkscape:connector-curvature="0"
+                 d="m 148.471,93.943 c 4.209,-1.684 3.477,-1.942 6.282,-8.045 2.245,-4.7 4.266,-6.749 4.319,-13.928 0.107,-7.01 -1.95,-9.864 -5.109,-13.821 -3.458,-3.985 -8.23,-3.996 -11.375,-3.498 -2.049,0.268 -4.458,2.284 -6.222,5.295 -1.403,2.114 -2.233,5.21 -2.303,8.435 -0.198,8.265 0.679,11.559 2.498,17.183 2.156,6.615 7.842,9.992 11.91,8.379 z"
+                 id="path6094" />
+              <path
+                 style="fill:#8c8c8c"
+                 inkscape:connector-curvature="0"
+                 d="m 148.471,93.916 c 4.181,-1.672 3.448,-1.938 6.235,-8 2.23,-4.668 4.249,-6.711 4.335,-13.85 0.134,-6.962 -1.88,-9.918 -4.982,-13.695 -3.513,-3.865 -8.183,-3.825 -11.303,-3.347 -2.094,0.263 -4.492,2.189 -6.283,5.07 -1.484,2.049 -2.306,5.163 -2.375,8.401 -0.193,8.207 0.723,11.515 2.511,17.105 2.118,6.58 7.821,9.919 11.862,8.316 z"
+                 id="path6096" />
+              <path
+                 style="fill:#939393"
+                 inkscape:connector-curvature="0"
+                 d="m 148.472,93.889 c 4.152,-1.661 3.419,-1.934 6.188,-7.956 2.215,-4.638 4.233,-6.674 4.35,-13.771 0.161,-6.915 -1.809,-9.972 -4.854,-13.568 -3.567,-3.746 -8.134,-3.654 -11.23,-3.195 -2.138,0.259 -4.527,2.094 -6.345,4.847 -1.564,1.983 -2.378,5.115 -2.447,8.368 -0.188,8.149 0.767,11.47 2.523,17.026 2.079,6.54 7.8,9.841 11.815,8.249 z"
+                 id="path6098" />
+              <path
+                 style="fill:#9b9b9b"
+                 inkscape:connector-curvature="0"
+                 d="m 148.472,93.863 c 4.125,-1.65 3.391,-1.93 6.141,-7.912 2.2,-4.607 4.217,-6.637 4.366,-13.693 0.188,-6.868 -1.739,-10.026 -4.729,-13.441 -3.621,-3.626 -8.085,-3.484 -11.157,-3.044 -2.183,0.253 -4.562,1.999 -6.406,4.622 -1.646,1.918 -2.45,5.068 -2.52,8.335 -0.185,8.091 0.811,11.426 2.535,16.948 2.044,6.502 7.782,9.766 11.77,8.185 z"
+                 id="path6100" />
+              <path
+                 style="fill:#a3a3a3"
+                 inkscape:connector-curvature="0"
+                 d="m 148.472,93.836 c 4.097,-1.639 3.361,-1.926 6.094,-7.867 2.185,-4.576 4.201,-6.599 4.382,-13.614 0.214,-6.82 -1.669,-10.081 -4.603,-13.315 -3.676,-3.506 -8.036,-3.313 -11.084,-2.893 -2.229,0.249 -4.598,1.904 -6.47,4.398 -1.726,1.852 -2.521,5.021 -2.591,8.301 -0.18,8.034 0.854,11.382 2.548,16.87 2.008,6.465 7.763,9.691 11.724,8.12 z"
+                 id="path6102" />
+              <path
+                 style="fill:#aaaaaa"
+                 inkscape:connector-curvature="0"
+                 d="m 148.472,93.809 c 4.069,-1.628 3.334,-1.922 6.047,-7.823 2.17,-4.544 4.185,-6.562 4.396,-13.536 0.242,-6.772 -1.597,-10.134 -4.475,-13.188 -3.73,-3.387 -7.989,-3.142 -11.013,-2.741 -2.271,0.243 -4.632,1.809 -6.53,4.173 -1.808,1.787 -2.594,4.974 -2.662,8.268 -0.176,7.976 0.897,11.337 2.56,16.792 1.97,6.427 7.743,9.615 11.677,8.055 z"
+                 id="path6104" />
+              <path
+                 style="fill:#b2b2b2"
+                 inkscape:connector-curvature="0"
+                 d="m 148.473,93.782 c 4.041,-1.617 3.304,-1.918 5.999,-7.778 2.154,-4.514 4.169,-6.524 4.412,-13.458 0.269,-6.725 -1.526,-10.188 -4.349,-13.062 -3.784,-3.267 -7.939,-2.971 -10.939,-2.589 -2.316,0.238 -4.666,1.714 -6.592,3.949 -1.888,1.721 -2.667,4.926 -2.734,8.234 -0.171,7.918 0.941,11.293 2.572,16.713 1.933,6.391 7.723,9.541 11.631,7.991 z"
+                 id="path6106" />
+              <path
+                 style="fill:#bababa"
+                 inkscape:connector-curvature="0"
+                 d="m 148.473,93.756 c 4.014,-1.606 3.275,-1.914 5.951,-7.734 2.141,-4.482 4.153,-6.487 4.43,-13.379 0.295,-6.678 -1.457,-10.243 -4.223,-12.935 -3.839,-3.147 -7.892,-2.8 -10.867,-2.438 -2.36,0.233 -4.701,1.619 -6.653,3.725 -1.969,1.656 -2.739,4.879 -2.806,8.201 -0.167,7.86 0.984,11.249 2.585,16.636 1.895,6.35 7.702,9.462 11.583,7.924 z"
+                 id="path6108" />
+              <path
+                 style="fill:#c1c1c1"
+                 inkscape:connector-curvature="0"
+                 d="m 148.473,93.729 c 3.985,-1.595 3.247,-1.91 5.904,-7.69 2.125,-4.451 4.138,-6.45 4.445,-13.3 0.321,-6.63 -1.387,-10.297 -4.096,-12.808 -3.894,-3.028 -7.844,-2.629 -10.795,-2.287 -2.405,0.229 -4.735,1.524 -6.716,3.5 -2.049,1.59 -2.811,4.831 -2.878,8.167 -0.161,7.802 1.029,11.205 2.599,16.557 1.859,6.314 7.683,9.389 11.537,7.861 z"
+                 id="path6110" />
+              <path
+                 style="fill:#c9c9c9"
+                 inkscape:connector-curvature="0"
+                 d="m 148.473,93.702 c 3.958,-1.583 3.219,-1.906 5.857,-7.646 2.11,-4.42 4.121,-6.412 4.46,-13.222 0.35,-6.583 -1.315,-10.351 -3.969,-12.682 -3.947,-2.908 -7.794,-2.458 -10.722,-2.135 -2.45,0.224 -4.771,1.429 -6.777,3.276 -2.13,1.525 -2.883,4.784 -2.95,8.135 -0.157,7.745 1.073,11.16 2.611,16.479 1.821,6.276 7.663,9.313 11.49,7.795 z"
+                 id="path6112" />
+              <path
+                 style="fill:#d1d1d1"
+                 inkscape:connector-curvature="0"
+                 d="m 148.474,93.676 c 3.93,-1.573 3.188,-1.902 5.809,-7.601 2.097,-4.389 4.107,-6.375 4.477,-13.144 0.375,-6.535 -1.245,-10.404 -3.842,-12.555 -4.002,-2.788 -7.747,-2.287 -10.65,-1.984 -2.493,0.219 -4.805,1.334 -6.837,3.052 -2.213,1.459 -2.957,4.736 -3.022,8.101 -0.153,7.687 1.116,11.116 2.623,16.401 1.782,6.237 7.642,9.237 11.442,7.73 z"
+                 id="path6114" />
+              <path
+                 style="fill:#d8d8d8"
+                 inkscape:connector-curvature="0"
+                 d="m 148.474,93.649 c 3.901,-1.562 3.16,-1.898 5.762,-7.557 2.082,-4.358 4.091,-6.338 4.493,-13.065 0.401,-6.487 -1.176,-10.458 -3.716,-12.428 -4.057,-2.668 -7.698,-2.116 -10.578,-1.832 -2.538,0.214 -4.839,1.239 -6.899,2.827 -2.292,1.394 -3.029,4.689 -3.094,8.068 -0.148,7.629 1.16,11.072 2.636,16.322 1.746,6.2 7.623,9.161 11.396,7.665 z"
+                 id="path6116" />
+              <path
+                 style="fill:#e0e0e0"
+                 inkscape:connector-curvature="0"
+                 d="m 148.474,93.622 c 3.875,-1.55 3.132,-1.894 5.715,-7.512 2.066,-4.327 4.075,-6.3 4.508,-12.987 0.429,-6.44 -1.104,-10.513 -3.588,-12.302 -4.111,-2.549 -7.65,-1.945 -10.506,-1.681 -2.582,0.209 -4.874,1.144 -6.961,2.604 -2.373,1.328 -3.102,4.642 -3.165,8.034 -0.145,7.571 1.204,11.027 2.647,16.244 1.709,6.162 7.604,9.086 11.35,7.6 z"
+                 id="path6118" />
+              <path
+                 style="fill:#e8e8e8"
+                 inkscape:connector-curvature="0"
+                 d="m 148.474,93.596 c 3.847,-1.54 3.104,-1.89 5.668,-7.468 2.052,-4.296 4.059,-6.263 4.523,-12.908 0.456,-6.393 -1.034,-10.567 -3.462,-12.175 -4.165,-2.429 -7.601,-1.774 -10.433,-1.529 -2.627,0.204 -4.908,1.049 -7.023,2.379 -2.453,1.263 -3.173,4.594 -3.236,8.001 -0.141,7.514 1.247,10.983 2.659,16.166 1.673,6.123 7.585,9.008 11.304,7.534 z"
+                 id="path6120" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 148.475,93.569 c 3.817,-1.528 3.073,-1.886 5.62,-7.424 2.036,-4.265 4.043,-6.226 4.539,-12.83 0.482,-6.345 -0.964,-10.621 -3.336,-12.048 -4.219,-2.31 -7.552,-1.604 -10.359,-1.378 -2.672,0.199 -4.943,0.954 -7.084,2.155 -2.535,1.197 -3.246,4.546 -3.311,7.967 -0.135,7.456 1.292,10.939 2.673,16.087 1.636,6.087 7.565,8.935 11.258,7.471 z"
+                 id="path6122" />
+              <path
+                 style="fill:#f7f7f7"
+                 inkscape:connector-curvature="0"
+                 d="m 148.475,93.542 c 3.791,-1.517 3.046,-1.882 5.572,-7.379 2.022,-4.234 4.027,-6.188 4.556,-12.751 0.51,-6.297 -0.894,-10.675 -3.208,-11.921 -4.274,-2.19 -7.505,-1.433 -10.289,-1.227 -2.715,0.194 -4.978,0.859 -7.146,1.93 -2.614,1.132 -3.317,4.5 -3.381,7.935 -0.131,7.398 1.335,10.895 2.686,16.009 1.597,6.047 7.544,8.858 11.21,7.404 z"
+                 id="path6124" />
+            </g>
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 148.475,93.516 c 3.763,-1.506 3.017,-1.878 5.525,-7.335 2.007,-4.203 4.012,-6.151 4.571,-12.673 0.536,-6.25 -0.823,-10.729 -3.082,-11.795 -4.328,-2.07 -7.456,-1.262 -10.216,-1.075 -2.76,0.189 -5.012,0.764 -7.207,1.706 -2.696,1.066 -3.39,4.452 -3.453,7.901 -0.126,7.34 1.379,10.85 2.698,15.931 1.561,6.01 7.525,8.782 11.164,7.34 z"
+               id="path6126" />
+          </g>
+          <path
+             inkscape:connector-curvature="0"
+             d="m 144.438,64.746 c 2.16,0 4.896,1.44 6.191,3.384 1.368,1.944 2.376,4.68 2.376,7.776 0,4.608 -0.504,9.72 -3.239,11.304 -0.864,0.504 -2.736,0.936 -3.816,0.936 -2.448,0 -2.664,-1.584 -4.968,-3.96 -0.792,-0.864 -3.168,-5.04 -3.168,-8.496 0,-2.16 -0.504,-5.256 1.368,-7.992 1.296,-2.016 2.952,-2.952 5.256,-2.952 z"
+             id="path6128" />
+          <g
+             id="g6130">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 143.862,68.608 c 0.844,-1.305 4.222,-0.69 5.45,1.996 1.229,2.687 0.998,8.522 0.153,8.829 -2.226,0.691 -1.535,-2.534 -3.454,-5.451 -1.919,-2.762 -2.994,-4.067 -2.149,-5.374 z"
+               id="path6132" />
+            <g
+               id="g6134">
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 143.916,68.664 c 0.833,-1.289 4.169,-0.681 5.381,1.971 1.215,2.653 0.985,8.414 0.152,8.717 -2.198,0.682 -1.516,-2.502 -3.411,-5.382 -1.895,-2.728 -2.956,-4.017 -2.122,-5.306 z"
+                 id="path6136" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 143.97,68.719 c 0.822,-1.272 4.114,-0.673 5.312,1.945 1.198,2.619 0.973,8.306 0.15,8.605 -2.169,0.673 -1.497,-2.47 -3.367,-5.313 -1.871,-2.692 -2.918,-3.964 -2.095,-5.237 z"
+                 id="path6138" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 144.024,68.774 c 0.812,-1.255 4.062,-0.664 5.243,1.92 1.182,2.585 0.96,8.198 0.147,8.493 -2.141,0.665 -1.477,-2.438 -3.323,-5.244 -1.846,-2.657 -2.88,-3.913 -2.067,-5.169 z"
+                 id="path6140" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 144.078,68.829 c 0.801,-1.239 4.008,-0.655 5.174,1.895 1.167,2.551 0.947,8.09 0.146,8.381 -2.113,0.656 -1.458,-2.405 -3.28,-5.174 -1.821,-2.623 -2.842,-3.863 -2.04,-5.102 z"
+                 id="path6142" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 144.132,68.884 c 0.791,-1.222 3.955,-0.646 5.105,1.87 1.151,2.517 0.935,7.982 0.144,8.27 -2.085,0.647 -1.438,-2.374 -3.235,-5.105 -1.798,-2.589 -2.805,-3.812 -2.014,-5.035 z"
+                 id="path6144" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 144.186,68.939 c 0.779,-1.206 3.9,-0.638 5.036,1.844 1.135,2.483 0.922,7.874 0.142,8.158 -2.057,0.639 -1.419,-2.341 -3.192,-5.037 -1.773,-2.552 -2.766,-3.758 -1.986,-4.965 z"
+                 id="path6146" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 144.24,68.994 c 0.769,-1.189 3.848,-0.629 4.967,1.819 1.12,2.449 0.909,7.766 0.141,8.046 -2.028,0.629 -1.399,-2.31 -3.148,-4.967 -1.75,-2.518 -2.73,-3.708 -1.96,-4.898 z"
+                 id="path6148" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 144.294,69.049 c 0.76,-1.172 3.794,-0.621 4.898,1.793 1.104,2.415 0.896,7.658 0.138,7.934 -2,0.621 -1.38,-2.277 -3.104,-4.898 -1.725,-2.482 -2.691,-3.655 -1.932,-4.829 z"
+                 id="path6150" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 144.348,69.104 c 0.748,-1.156 3.74,-0.612 4.829,1.768 1.088,2.38 0.884,7.55 0.136,7.822 -1.973,0.612 -1.36,-2.245 -3.062,-4.829 -1.699,-2.448 -2.651,-3.604 -1.903,-4.761 z"
+                 id="path6152" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 144.402,69.16 c 0.737,-1.14 3.687,-0.603 4.76,1.743 1.073,2.347 0.871,7.442 0.134,7.71 -1.943,0.604 -1.341,-2.213 -3.017,-4.76 -1.676,-2.414 -2.614,-3.554 -1.877,-4.693 z"
+                 id="path6154" />
+              <path
+                 style="fill:#545454"
+                 inkscape:connector-curvature="0"
+                 d="m 144.456,69.215 c 0.727,-1.123 3.634,-0.595 4.691,1.717 1.057,2.313 0.857,7.334 0.132,7.598 -1.916,0.595 -1.321,-2.181 -2.973,-4.691 -1.652,-2.378 -2.577,-3.501 -1.85,-4.624 z"
+                 id="path6156" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 144.51,69.27 c 0.717,-1.106 3.58,-0.585 4.622,1.692 1.041,2.278 0.847,7.226 0.131,7.486 -1.888,0.586 -1.303,-2.149 -2.93,-4.622 -1.628,-2.343 -2.539,-3.45 -1.823,-4.556 z"
+                 id="path6158" />
+              <path
+                 style="fill:#636363"
+                 inkscape:connector-curvature="0"
+                 d="m 144.564,69.325 c 0.705,-1.09 3.526,-0.577 4.553,1.667 1.026,2.245 0.833,7.118 0.128,7.375 -1.858,0.577 -1.282,-2.117 -2.885,-4.553 -1.604,-2.309 -2.501,-3.399 -1.796,-4.489 z"
+                 id="path6160" />
+              <path
+                 style="fill:#6b6b6b"
+                 inkscape:connector-curvature="0"
+                 d="m 144.618,69.38 c 0.694,-1.073 3.473,-0.568 4.483,1.642 1.011,2.21 0.82,7.01 0.127,7.263 -1.831,0.568 -1.264,-2.084 -2.842,-4.484 -1.578,-2.274 -2.462,-3.347 -1.768,-4.421 z"
+                 id="path6162" />
+              <path
+                 style="fill:#727272"
+                 inkscape:connector-curvature="0"
+                 d="m 144.672,69.435 c 0.685,-1.057 3.42,-0.56 4.414,1.617 0.995,2.176 0.81,6.902 0.125,7.15 -1.803,0.56 -1.243,-2.053 -2.798,-4.415 -1.554,-2.238 -2.425,-3.295 -1.741,-4.352 z"
+                 id="path6164" />
+              <path
+                 style="fill:#7a7a7a"
+                 inkscape:connector-curvature="0"
+                 d="m 144.726,69.49 c 0.673,-1.041 3.365,-0.551 4.345,1.591 0.979,2.143 0.796,6.794 0.123,7.039 -1.775,0.551 -1.224,-2.021 -2.754,-4.346 -1.53,-2.203 -2.387,-3.244 -1.714,-4.284 z"
+                 id="path6166" />
+              <path
+                 style="fill:#828282"
+                 inkscape:connector-curvature="0"
+                 d="m 144.78,69.545 c 0.662,-1.023 3.313,-0.542 4.276,1.566 0.964,2.108 0.782,6.686 0.121,6.926 -1.746,0.542 -1.204,-1.988 -2.711,-4.276 -1.505,-2.167 -2.348,-3.192 -1.686,-4.216 z"
+                 id="path6168" />
+              <path
+                 style="fill:#898989"
+                 inkscape:connector-curvature="0"
+                 d="m 144.834,69.6 c 0.652,-1.007 3.259,-0.533 4.207,1.541 0.948,2.074 0.771,6.578 0.119,6.815 -1.718,0.534 -1.185,-1.956 -2.666,-4.207 -1.482,-2.134 -2.311,-3.142 -1.66,-4.149 z"
+                 id="path6170" />
+              <path
+                 style="fill:#919191"
+                 inkscape:connector-curvature="0"
+                 d="m 144.888,69.655 c 0.641,-0.99 3.206,-0.524 4.138,1.516 0.933,2.04 0.758,6.47 0.117,6.703 -1.69,0.525 -1.165,-1.924 -2.623,-4.138 -1.457,-2.098 -2.273,-3.09 -1.632,-4.081 z"
+                 id="path6172" />
+            </g>
+            <path
+               style="fill:#999999"
+               inkscape:connector-curvature="0"
+               d="m 144.942,69.71 c 0.63,-0.974 3.152,-0.516 4.069,1.49 0.917,2.006 0.744,6.362 0.114,6.591 -1.662,0.516 -1.146,-1.892 -2.579,-4.069 -1.432,-2.062 -2.234,-3.037 -1.604,-4.012 z"
+               id="path6174" />
+          </g>
+          <g
+             id="g6176">
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 193.11,94.985 c 10.8,-1.152 14.616,-5.328 16.56,-12.6 1.729,-6.48 1.801,-13.68 -3.023,-22.104 -4.536,-8.063 -7.128,-9.36 -13.681,-9.864 -10.079,-0.864 -14.832,6.192 -17.063,11.232 -2.376,5.472 -1.872,4.68 -1.729,11.592 0.145,7.272 4.245,9.299 6.766,13.835 2.519,4.465 10.946,7.982 12.17,7.909 z"
+               id="path6178" />
+            <g
+               id="g6180">
+              <path
+                 style="fill:#6d6d6d"
+                 inkscape:connector-curvature="0"
+                 d="m 193.115,94.944 c 10.759,-1.131 14.618,-5.354 16.515,-12.569 1.701,-6.525 1.785,-13.686 -3.002,-21.912 -4.434,-7.797 -7.038,-9.081 -13.512,-9.581 -10.049,-0.861 -14.941,5.873 -17.181,10.874 -2.304,5.28 -1.878,4.718 -1.726,11.539 0.16,7.268 4.268,9.223 6.784,13.76 2.521,4.475 10.898,7.962 12.122,7.889 z"
+                 id="path6182" />
+              <path
+                 style="fill:#757575"
+                 inkscape:connector-curvature="0"
+                 d="m 193.12,94.902 c 10.718,-1.11 14.62,-5.379 16.469,-12.538 1.676,-6.57 1.771,-13.692 -2.979,-21.721 -4.331,-7.53 -6.947,-8.801 -13.344,-9.297 -10.018,-0.858 -15.05,5.553 -17.298,10.516 -2.229,5.087 -1.885,4.757 -1.722,11.487 0.176,7.264 4.289,9.146 6.803,13.686 2.52,4.485 10.848,7.942 12.071,7.867 z"
+                 id="path6184" />
+              <path
+                 style="fill:#7c7c7c"
+                 inkscape:connector-curvature="0"
+                 d="m 193.126,94.861 c 10.675,-1.09 14.621,-5.405 16.423,-12.507 1.648,-6.616 1.756,-13.698 -2.958,-21.529 -4.229,-7.263 -6.856,-8.522 -13.176,-9.014 -9.985,-0.854 -15.158,5.234 -17.414,10.158 -2.156,4.895 -1.891,4.795 -1.719,11.434 0.193,7.26 4.31,9.07 6.822,13.611 2.52,4.495 10.798,7.922 12.022,7.847 z"
+                 id="path6186" />
+              <path
+                 style="fill:#848484"
+                 inkscape:connector-curvature="0"
+                 d="m 193.131,94.82 c 10.635,-1.069 14.623,-5.431 16.377,-12.476 1.622,-6.661 1.741,-13.704 -2.936,-21.337 -4.126,-6.996 -6.767,-8.242 -13.008,-8.73 -9.955,-0.852 -15.267,4.915 -17.53,9.8 -2.084,4.703 -1.896,4.833 -1.716,11.38 0.209,7.256 4.332,8.995 6.841,13.537 2.52,4.505 10.748,7.902 11.972,7.826 z"
+                 id="path6188" />
+              <path
+                 style="fill:#8c8c8c"
+                 inkscape:connector-curvature="0"
+                 d="m 193.136,94.778 c 10.593,-1.048 14.625,-5.457 16.331,-12.445 1.596,-6.706 1.726,-13.709 -2.913,-21.145 -4.025,-6.729 -6.678,-7.963 -12.841,-8.447 -9.924,-0.848 -15.375,4.595 -17.647,9.441 -2.01,4.51 -1.903,4.872 -1.712,11.328 0.225,7.251 4.354,8.918 6.858,13.462 2.521,4.517 10.7,7.883 11.924,7.806 z"
+                 id="path6190" />
+              <path
+                 style="fill:#939393"
+                 inkscape:connector-curvature="0"
+                 d="m 193.141,94.737 c 10.552,-1.027 14.627,-5.482 16.286,-12.414 1.568,-6.751 1.711,-13.715 -2.893,-20.954 -3.922,-6.462 -6.586,-7.683 -12.672,-8.163 -9.892,-0.845 -15.483,4.276 -17.764,9.083 -1.938,4.318 -1.909,4.91 -1.709,11.275 0.24,7.247 4.375,8.842 6.878,13.387 2.521,4.528 10.651,7.863 11.874,7.786 z"
+                 id="path6192" />
+              <path
+                 style="fill:#9b9b9b"
+                 inkscape:connector-curvature="0"
+                 d="m 193.146,94.695 c 10.51,-1.007 14.63,-5.508 16.241,-12.382 1.542,-6.796 1.694,-13.721 -2.87,-20.762 -3.82,-6.195 -6.496,-7.404 -12.504,-7.879 -9.861,-0.842 -15.592,3.956 -17.882,8.725 -1.863,4.126 -1.915,4.949 -1.706,11.223 0.258,7.243 4.397,8.766 6.897,13.313 2.521,4.535 10.601,7.841 11.824,7.762 z"
+                 id="path6194" />
+              <path
+                 style="fill:#a3a3a3"
+                 inkscape:connector-curvature="0"
+                 d="m 193.151,94.654 c 10.469,-0.986 14.632,-5.534 16.196,-12.351 1.515,-6.842 1.68,-13.727 -2.85,-20.57 -3.717,-5.928 -6.405,-7.125 -12.335,-7.596 -9.83,-0.839 -15.7,3.637 -17.998,8.367 -1.791,3.933 -1.922,4.987 -1.703,11.169 0.273,7.239 4.419,8.689 6.916,13.238 2.521,4.547 10.551,7.822 11.774,7.743 z"
+                 id="path6196" />
+              <path
+                 style="fill:#aaaaaa"
+                 inkscape:connector-curvature="0"
+                 d="m 193.157,94.612 c 10.427,-0.965 14.633,-5.56 16.149,-12.32 1.488,-6.887 1.666,-13.733 -2.826,-20.379 -3.615,-5.661 -6.316,-6.845 -12.168,-7.313 -9.799,-0.835 -15.809,3.317 -18.114,8.009 -1.718,3.741 -1.928,5.025 -1.7,11.117 0.29,7.235 4.44,8.613 6.936,13.163 2.519,4.558 10.499,7.804 11.723,7.723 z"
+                 id="path6198" />
+              <path
+                 style="fill:#b2b2b2"
+                 inkscape:connector-curvature="0"
+                 d="m 193.162,94.571 c 10.386,-0.944 14.635,-5.585 16.104,-12.289 1.462,-6.932 1.649,-13.739 -2.806,-20.188 -3.512,-5.394 -6.225,-6.565 -11.999,-7.029 -9.768,-0.833 -15.917,2.998 -18.23,7.651 -1.646,3.549 -1.935,5.064 -1.697,11.064 0.306,7.231 4.462,8.537 6.954,13.088 2.52,4.569 10.451,7.784 11.674,7.703 z"
+                 id="path6200" />
+              <path
+                 style="fill:#bababa"
+                 inkscape:connector-curvature="0"
+                 d="m 193.167,94.529 c 10.345,-0.923 14.638,-5.611 16.059,-12.258 1.436,-6.977 1.636,-13.744 -2.782,-19.995 -3.41,-5.127 -6.135,-6.286 -11.832,-6.746 -9.736,-0.829 -16.025,2.679 -18.347,7.293 -1.572,3.356 -1.941,5.103 -1.694,11.011 0.322,7.227 4.484,8.461 6.973,13.014 2.519,4.579 10.4,7.764 11.623,7.681 z"
+                 id="path6202" />
+              <path
+                 style="fill:#c1c1c1"
+                 inkscape:connector-curvature="0"
+                 d="m 193.172,94.488 c 10.304,-0.903 14.64,-5.637 16.014,-12.227 1.409,-7.022 1.62,-13.75 -2.762,-19.804 -3.308,-4.86 -6.044,-6.006 -11.662,-6.462 -9.705,-0.826 -16.135,2.359 -18.466,6.935 -1.498,3.164 -1.945,5.141 -1.689,10.958 0.338,7.223 4.506,8.385 6.991,12.939 2.519,4.59 10.351,7.744 11.574,7.661 z"
+                 id="path6204" />
+              <path
+                 style="fill:#c9c9c9"
+                 inkscape:connector-curvature="0"
+                 d="m 193.177,94.447 c 10.262,-0.882 14.641,-5.663 15.967,-12.196 1.383,-7.068 1.605,-13.756 -2.738,-19.612 -3.206,-4.593 -5.954,-5.727 -11.496,-6.179 -9.673,-0.823 -16.242,2.04 -18.581,6.577 -1.425,2.972 -1.952,5.179 -1.687,10.906 0.354,7.219 4.526,8.308 7.01,12.865 2.52,4.598 10.302,7.723 11.525,7.639 z"
+                 id="path6206" />
+              <path
+                 style="fill:#d1d1d1"
+                 inkscape:connector-curvature="0"
+                 d="m 193.182,94.405 c 10.221,-0.861 14.643,-5.688 15.922,-12.165 1.355,-7.113 1.591,-13.762 -2.717,-19.42 -3.104,-4.326 -5.864,-5.448 -11.327,-5.895 -9.644,-0.82 -16.352,1.721 -18.698,6.219 -1.353,2.779 -1.959,5.217 -1.684,10.853 0.369,7.214 4.549,8.232 7.028,12.79 2.521,4.609 10.254,7.703 11.476,7.618 z"
+                 id="path6208" />
+              <path
+                 style="fill:#d8d8d8"
+                 inkscape:connector-curvature="0"
+                 d="m 193.187,94.364 c 10.179,-0.841 14.645,-5.714 15.876,-12.133 1.33,-7.158 1.576,-13.768 -2.694,-19.229 -3.001,-4.059 -5.773,-5.168 -11.16,-5.612 -9.61,-0.817 -16.459,1.401 -18.813,5.861 -1.279,2.586 -1.965,5.256 -1.682,10.8 0.387,7.21 4.571,8.156 7.049,12.715 2.519,4.619 10.202,7.684 11.424,7.598 z"
+                 id="path6210" />
+              <path
+                 style="fill:#e0e0e0"
+                 inkscape:connector-curvature="0"
+                 d="m 193.193,94.322 c 10.137,-0.82 14.646,-5.74 15.83,-12.103 1.303,-7.203 1.561,-13.773 -2.673,-19.037 -2.898,-3.792 -5.684,-4.889 -10.991,-5.328 -9.58,-0.813 -16.568,1.082 -18.931,5.502 -1.206,2.395 -1.972,5.294 -1.679,10.747 0.403,7.207 4.592,8.08 7.067,12.641 2.521,4.631 10.154,7.666 11.377,7.578 z"
+                 id="path6212" />
+              <path
+                 style="fill:#e8e8e8"
+                 inkscape:connector-curvature="0"
+                 d="m 193.198,94.281 c 10.096,-0.799 14.648,-5.766 15.785,-12.071 1.275,-7.249 1.545,-13.779 -2.651,-18.845 -2.796,-3.525 -5.593,-4.609 -10.823,-5.044 -9.549,-0.81 -16.677,0.762 -19.048,5.145 -1.133,2.202 -1.978,5.333 -1.675,10.694 0.419,7.202 4.614,8.003 7.086,12.566 2.52,4.638 10.103,7.643 11.326,7.555 z"
+                 id="path6214" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 193.203,94.239 c 10.055,-0.778 14.65,-5.792 15.739,-12.04 1.25,-7.293 1.531,-13.785 -2.629,-18.653 -2.694,-3.258 -5.502,-4.33 -10.655,-4.761 -9.517,-0.807 -16.785,0.443 -19.165,4.786 -1.059,2.01 -1.983,5.372 -1.671,10.642 0.435,7.198 4.636,7.928 7.104,12.492 2.52,4.649 10.055,7.624 11.277,7.534 z"
+                 id="path6216" />
+              <path
+                 style="fill:#f7f7f7"
+                 inkscape:connector-curvature="0"
+                 d="m 193.208,94.198 c 10.014,-0.757 14.652,-5.817 15.694,-12.009 1.223,-7.339 1.516,-13.792 -2.607,-18.462 -2.592,-2.991 -5.413,-4.05 -10.486,-4.478 -9.487,-0.804 -16.895,0.124 -19.282,4.428 -0.986,1.817 -1.989,5.41 -1.668,10.589 0.451,7.194 4.657,7.851 7.123,12.417 2.519,4.661 10.004,7.605 11.226,7.515 z"
+                 id="path6218" />
+            </g>
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 193.213,94.156 c 9.973,-0.737 14.654,-5.843 15.648,-11.978 1.197,-7.384 1.501,-13.797 -2.585,-18.27 -2.489,-2.724 -5.322,-3.771 -10.319,-4.194 -9.455,-0.801 -17.002,-0.196 -19.397,4.07 -0.913,1.625 -1.996,5.448 -1.665,10.536 0.467,7.19 4.679,7.775 7.142,12.342 2.519,4.671 9.954,7.586 11.176,7.494 z"
+               id="path6220" />
+          </g>
+          <path
+             inkscape:connector-curvature="0"
+             d="m 192.246,64.458 c 5.4,0 8.568,4.824 9.648,11.016 0.432,2.808 -0.216,6.048 -1.944,8.28 -1.944,2.592 -5.4,4.176 -8.208,4.176 -2.664,0 -5.688,0.432 -7.271,-1.728 -1.584,-2.232 -1.944,-7.2 -1.944,-10.728 0,-3.96 1.152,-6.768 3.168,-9 1.511,-1.657 4.247,-2.016 6.551,-2.016 z"
+             id="path6222" />
+          <g
+             id="g6224">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 192.591,66.68 c 0.98,-0.653 2.612,0 4.489,2.122 2.039,2.285 2.938,4.08 0.489,5.385 -1.877,0.98 -2.448,-1.958 -3.59,-3.182 -1.795,-1.959 -3.346,-3.02 -1.388,-4.325 z"
+               id="path6226" />
+            <g
+               id="g6228">
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 192.631,66.738 c 0.96,-0.649 2.573,0 4.423,2.09 2.009,2.251 2.864,4.02 0.481,5.305 -1.837,0.977 -2.403,-1.929 -3.525,-3.135 -1.768,-1.925 -3.296,-2.965 -1.379,-4.26 z"
+                 id="path6230" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 192.671,66.797 c 0.939,-0.645 2.534,0 4.356,2.059 1.978,2.217 2.792,3.958 0.474,5.225 -1.798,0.974 -2.357,-1.9 -3.46,-3.087 -1.742,-1.895 -3.247,-2.913 -1.37,-4.197 z"
+                 id="path6232" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 192.711,66.855 c 0.919,-0.641 2.495,0 4.289,2.027 1.948,2.184 2.721,3.898 0.467,5.146 -1.759,0.971 -2.313,-1.871 -3.396,-3.041 -1.715,-1.861 -3.197,-2.858 -1.36,-4.132 z"
+                 id="path6234" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 192.751,66.914 c 0.899,-0.637 2.457,0 4.223,1.996 1.918,2.149 2.647,3.838 0.46,5.065 -1.72,0.968 -2.269,-1.842 -3.331,-2.993 -1.689,-1.83 -3.148,-2.805 -1.352,-4.068 z"
+                 id="path6236" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 192.791,66.973 c 0.878,-0.633 2.418,0 4.155,1.964 1.888,2.116 2.576,3.777 0.453,4.986 -1.68,0.965 -2.224,-1.813 -3.267,-2.946 -1.661,-1.798 -3.097,-2.752 -1.341,-4.004 z"
+                 id="path6238" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 192.831,67.031 c 0.858,-0.629 2.379,0 4.089,1.933 1.857,2.082 2.503,3.717 0.445,4.906 -1.641,0.961 -2.178,-1.784 -3.201,-2.898 -1.636,-1.767 -3.048,-2.7 -1.333,-3.941 z"
+                 id="path6240" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 192.87,67.09 c 0.838,-0.625 2.341,0 4.023,1.902 1.827,2.047 2.431,3.656 0.438,4.826 -1.601,0.958 -2.133,-1.755 -3.137,-2.852 -1.608,-1.735 -2.998,-2.646 -1.324,-3.876 z"
+                 id="path6242" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 192.91,67.148 c 0.818,-0.621 2.302,0 3.956,1.87 1.797,2.014 2.359,3.596 0.431,4.746 -1.562,0.956 -2.088,-1.726 -3.071,-2.804 -1.583,-1.702 -2.95,-2.592 -1.316,-3.812 z"
+                 id="path6244" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 192.95,67.207 c 0.798,-0.617 2.263,0 3.889,1.839 1.768,1.98 2.287,3.535 0.425,4.666 -1.523,0.952 -2.043,-1.697 -3.008,-2.757 -1.556,-1.671 -2.899,-2.539 -1.306,-3.748 z"
+                 id="path6246" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 192.99,67.266 c 0.777,-0.614 2.224,0 3.823,1.807 1.735,1.946 2.214,3.474 0.416,4.586 -1.483,0.949 -1.998,-1.667 -2.942,-2.709 -1.529,-1.639 -2.85,-2.486 -1.297,-3.684 z"
+                 id="path6248" />
+              <path
+                 style="fill:#545454"
+                 inkscape:connector-curvature="0"
+                 d="m 193.03,67.325 c 0.757,-0.61 2.185,0 3.756,1.775 1.706,1.912 2.143,3.414 0.409,4.506 -1.444,0.946 -1.953,-1.639 -2.878,-2.663 -1.502,-1.606 -2.799,-2.431 -1.287,-3.618 z"
+                 id="path6250" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 193.07,67.383 c 0.736,-0.605 2.146,0 3.688,1.744 1.677,1.878 2.07,3.353 0.402,4.426 -1.405,0.943 -1.908,-1.609 -2.813,-2.615 -1.475,-1.575 -2.749,-2.378 -1.277,-3.555 z"
+                 id="path6252" />
+              <path
+                 style="fill:#636363"
+                 inkscape:connector-curvature="0"
+                 d="m 193.11,67.442 c 0.716,-0.602 2.106,0 3.622,1.712 1.646,1.844 1.998,3.293 0.395,4.347 -1.364,0.94 -1.862,-1.581 -2.748,-2.568 -1.449,-1.543 -2.701,-2.326 -1.269,-3.491 z"
+                 id="path6254" />
+              <path
+                 style="fill:#6b6b6b"
+                 inkscape:connector-curvature="0"
+                 d="m 193.15,67.5 c 0.696,-0.598 2.069,0 3.556,1.681 1.615,1.811 1.925,3.232 0.387,4.267 -1.325,0.937 -1.818,-1.552 -2.683,-2.521 -1.423,-1.511 -2.651,-2.272 -1.26,-3.427 z"
+                 id="path6256" />
+              <path
+                 style="fill:#727272"
+                 inkscape:connector-curvature="0"
+                 d="m 193.19,67.559 c 0.675,-0.594 2.03,0 3.489,1.649 1.585,1.777 1.853,3.172 0.38,4.187 -1.287,0.935 -1.774,-1.522 -2.619,-2.473 -1.396,-1.48 -2.601,-2.219 -1.25,-3.363 z"
+                 id="path6258" />
+              <path
+                 style="fill:#7a7a7a"
+                 inkscape:connector-curvature="0"
+                 d="m 193.23,67.618 c 0.654,-0.59 1.991,0 3.422,1.618 1.555,1.743 1.781,3.111 0.373,4.107 -1.247,0.931 -1.729,-1.494 -2.554,-2.426 -1.369,-1.448 -2.551,-2.166 -1.241,-3.299 z"
+                 id="path6260" />
+              <path
+                 style="fill:#828282"
+                 inkscape:connector-curvature="0"
+                 d="m 193.269,67.677 c 0.635,-0.586 1.953,0 3.355,1.586 1.525,1.708 1.709,3.05 0.366,4.026 -1.208,0.928 -1.684,-1.464 -2.489,-2.378 -1.342,-1.416 -2.501,-2.112 -1.232,-3.234 z"
+                 id="path6262" />
+              <path
+                 style="fill:#898989"
+                 inkscape:connector-curvature="0"
+                 d="m 193.309,67.735 c 0.614,-0.582 1.914,0 3.29,1.555 1.493,1.675 1.636,2.99 0.357,3.947 -1.169,0.925 -1.639,-1.435 -2.424,-2.332 -1.316,-1.384 -2.452,-2.058 -1.223,-3.17 z"
+                 id="path6264" />
+              <path
+                 style="fill:#919191"
+                 inkscape:connector-curvature="0"
+                 d="m 193.349,67.794 c 0.595,-0.578 1.875,0 3.223,1.523 1.464,1.641 1.564,2.93 0.351,3.867 -1.129,0.922 -1.594,-1.406 -2.359,-2.284 -1.29,-1.352 -2.403,-2.005 -1.215,-3.106 z"
+                 id="path6266" />
+            </g>
+            <path
+               style="fill:#999999"
+               inkscape:connector-curvature="0"
+               d="m 193.389,67.853 c 0.573,-0.574 1.836,0 3.155,1.492 1.435,1.607 1.492,2.869 0.345,3.787 -1.091,0.919 -1.55,-1.377 -2.295,-2.237 -1.263,-1.32 -2.353,-1.953 -1.205,-3.042 z"
+               id="path6268" />
+          </g>
+          <g
+             id="g6270">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 165.498,69.906 c 1.693,-0.654 3.012,-0.69 5.63,1.036 3.166,2.088 1.705,5.245 -0.779,4.601 -2.146,-0.556 -2.417,-0.681 -4.391,-1.086 -3.101,-0.648 -3.641,-3.322 -0.46,-4.551 z"
+               id="path6272" />
+            <g
+               id="g6274">
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 165.564,70.033 c 1.658,-0.629 2.973,-0.656 5.555,1.026 3.066,2.009 1.654,5.012 -0.805,4.38 -2.131,-0.547 -2.345,-0.656 -4.284,-1.052 -3.055,-0.634 -3.587,-3.173 -0.466,-4.354 z"
+                 id="path6276" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 165.63,70.16 c 1.623,-0.604 2.935,-0.622 5.481,1.015 2.965,1.93 1.602,4.779 -0.83,4.159 -2.119,-0.539 -2.274,-0.63 -4.179,-1.018 -3.009,-0.618 -3.533,-3.022 -0.472,-4.156 z"
+                 id="path6278" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 165.696,70.287 c 1.587,-0.579 2.895,-0.587 5.406,1.005 2.864,1.851 1.551,4.546 -0.855,3.938 -2.105,-0.53 -2.203,-0.605 -4.073,-0.983 -2.963,-0.604 -3.48,-2.873 -0.478,-3.96 z"
+                 id="path6280" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 165.761,70.413 c 1.553,-0.553 2.856,-0.553 5.331,0.995 2.766,1.772 1.5,4.313 -0.88,3.717 -2.092,-0.521 -2.131,-0.58 -3.967,-0.949 -2.916,-0.588 -3.425,-2.723 -0.484,-3.763 z"
+                 id="path6282" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 165.827,70.54 c 1.519,-0.528 2.818,-0.519 5.258,0.984 2.664,1.693 1.448,4.079 -0.905,3.497 -2.079,-0.513 -2.06,-0.554 -3.861,-0.915 -2.873,-0.573 -3.373,-2.573 -0.492,-3.566 z"
+                 id="path6284" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 165.893,70.667 c 1.482,-0.503 2.778,-0.484 5.183,0.974 2.564,1.614 1.397,3.846 -0.93,3.276 -2.067,-0.504 -1.989,-0.529 -3.756,-0.88 -2.826,-0.559 -3.319,-2.425 -0.497,-3.37 z"
+                 id="path6286" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 165.959,70.793 c 1.447,-0.478 2.74,-0.45 5.108,0.964 2.464,1.535 1.345,3.613 -0.955,3.055 -2.053,-0.496 -1.917,-0.503 -3.651,-0.846 -2.779,-0.543 -3.264,-2.274 -0.502,-3.173 z"
+                 id="path6288" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 166.025,70.92 c 1.412,-0.453 2.701,-0.416 5.034,0.954 2.362,1.456 1.293,3.38 -0.981,2.834 -2.04,-0.487 -1.845,-0.478 -3.545,-0.812 -2.733,-0.528 -3.21,-2.125 -0.508,-2.976 z"
+                 id="path6290" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 166.09,71.047 c 1.378,-0.428 2.663,-0.382 4.96,0.943 2.264,1.377 1.242,3.146 -1.006,2.613 -2.026,-0.478 -1.773,-0.453 -3.438,-0.777 -2.688,-0.513 -3.158,-1.974 -0.516,-2.779 z"
+                 id="path6292" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 166.156,71.173 c 1.343,-0.402 2.624,-0.347 4.885,0.933 2.163,1.298 1.191,2.914 -1.029,2.392 -2.015,-0.47 -1.703,-0.428 -3.334,-0.743 -2.642,-0.498 -3.104,-1.824 -0.522,-2.582 z"
+                 id="path6294" />
+              <path
+                 style="fill:#383838"
+                 inkscape:connector-curvature="0"
+                 d="m 166.222,71.3 c 1.307,-0.377 2.585,-0.313 4.81,0.922 2.063,1.219 1.14,2.681 -1.055,2.171 -2.001,-0.461 -1.631,-0.402 -3.229,-0.708 -2.594,-0.483 -3.048,-1.674 -0.526,-2.385 z"
+                 id="path6296" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 166.288,71.427 c 1.272,-0.352 2.546,-0.279 4.736,0.913 1.962,1.14 1.088,2.447 -1.081,1.95 -1.988,-0.452 -1.56,-0.377 -3.122,-0.674 -2.55,-0.469 -2.995,-1.526 -0.533,-2.189 z"
+                 id="path6298" />
+              <path
+                 style="fill:#424242"
+                 inkscape:connector-curvature="0"
+                 d="m 166.354,71.554 c 1.236,-0.327 2.507,-0.245 4.661,0.902 1.861,1.061 1.037,2.214 -1.106,1.729 -1.974,-0.444 -1.488,-0.352 -3.016,-0.64 -2.504,-0.453 -2.942,-1.375 -0.539,-1.991 z"
+                 id="path6300" />
+              <path
+                 style="fill:#474747"
+                 inkscape:connector-curvature="0"
+                 d="m 166.419,71.68 c 1.203,-0.302 2.469,-0.21 4.587,0.892 1.762,0.982 0.986,1.98 -1.13,1.508 -1.962,-0.435 -1.417,-0.326 -2.911,-0.606 -2.458,-0.437 -2.888,-1.224 -0.546,-1.794 z"
+                 id="path6302" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 166.485,71.807 c 1.167,-0.276 2.429,-0.176 4.513,0.882 1.66,0.903 0.935,1.748 -1.156,1.288 -1.948,-0.426 -1.345,-0.301 -2.805,-0.572 -2.412,-0.423 -2.834,-1.076 -0.552,-1.598 z"
+                 id="path6304" />
+              <path
+                 style="fill:#515151"
+                 inkscape:connector-curvature="0"
+                 d="m 166.551,71.934 c 1.133,-0.251 2.391,-0.142 4.438,0.871 1.56,0.824 0.883,1.515 -1.181,1.067 -1.936,-0.417 -1.274,-0.275 -2.699,-0.537 -2.366,-0.408 -2.781,-0.926 -0.558,-1.401 z"
+                 id="path6306" />
+              <path
+                 style="fill:#565656"
+                 inkscape:connector-curvature="0"
+                 d="m 166.617,72.061 c 1.097,-0.227 2.351,-0.108 4.363,0.861 1.46,0.745 0.831,1.281 -1.206,0.846 -1.922,-0.409 -1.202,-0.25 -2.594,-0.503 -2.319,-0.393 -2.726,-0.777 -0.563,-1.204 z"
+                 id="path6308" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 166.683,72.187 c 1.062,-0.201 2.312,-0.073 4.289,0.851 1.358,0.666 0.778,1.048 -1.231,0.625 -1.91,-0.4 -1.131,-0.225 -2.489,-0.469 -2.274,-0.377 -2.672,-0.626 -0.569,-1.007 z"
+                 id="path6310" />
+              <path
+                 style="fill:#606060"
+                 inkscape:connector-curvature="0"
+                 d="m 166.748,72.314 c 1.027,-0.176 2.274,-0.04 4.215,0.84 1.26,0.587 0.729,0.815 -1.256,0.404 -1.896,-0.392 -1.06,-0.2 -2.383,-0.435 -2.228,-0.361 -2.619,-0.475 -0.576,-0.809 z"
+                 id="path6312" />
+            </g>
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 166.814,72.44 c 0.992,-0.151 2.234,-0.005 4.14,0.83 1.159,0.508 0.677,0.582 -1.281,0.183 -1.883,-0.383 -0.987,-0.174 -2.276,-0.4 -2.183,-0.346 -2.566,-0.325 -0.583,-0.613 z"
+               id="path6314" />
+          </g>
+          <g
+             id="g6316">
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 159.99,128.249 c -9.36,0.36 -24.192,-25.848 -24.552,-14.976 -0.288,9.216 0.216,9.072 0.216,18 0,5.976 -2.736,6.408 -8.64,15.408 -3.024,4.752 -5.4,9.864 -7.272,15.048 -1.152,3.096 -2.232,6.336 -3.096,9.504 -0.36,1.584 -1.008,3.24 -1.368,4.824 -2.952,10.872 -13.464,24.264 -15.912,35.136 -2.448,10.8 -5.328,17.712 -4.968,32.185 0.36,14.472 0.504,10.295 4.896,13.896 4.32,3.601 8.784,6.983 15.624,13.032 7.2,6.264 22.177,17.208 24.192,20.592 2.16,3.456 2.088,11.232 0.792,13.752 -1.296,2.448 -12.6,3.816 -12.528,3.816 -0.071,0 9.864,13.68 11.809,15.623 1.872,1.873 9.936,10.873 42.768,4.752 18.504,-3.455 32.832,-13.823 43.2,-23.832 13.392,-13.031 6.624,-16.775 8.352,-23.327 2.521,-9.433 10.729,-12.96 12.601,-23.616 0.216,-1.512 0.72,-2.664 2.088,-4.896 2.088,-3.168 1.584,-9.432 1.584,-15.191 0,-14.977 -1.729,-30.24 -5.185,-41.472 -3.168,-10.512 -8.208,-17.856 -12.527,-27.36 -8.641,-18.936 -8.208,-27.432 -15.912,-39.528 -8.784,-13.968 -4.464,-23.256 -16.128,-22.68 -14.546,0.79 -26.282,20.734 -40.034,21.31 z"
+               id="path6318" />
+            <g
+               id="g6320">
+              <path
+                 style="fill:#6d6d6d"
+                 inkscape:connector-curvature="0"
+                 d="m 159.973,129.334 c -9.281,0.353 -23.746,-25.511 -24.242,-15.179 -0.316,8.755 0.1,8.678 0.03,17.247 -0.15,5.87 -2.953,6.637 -8.727,15.481 -3.013,4.763 -5.273,9.812 -6.993,14.877 -0.968,3.253 -1.56,6.422 -2.43,9.526 -0.415,1.642 -1.497,3.187 -2.185,5.042 -3.254,10.78 -13.545,24.182 -15.961,34.877 -2.466,10.81 -5.37,17.694 -4.961,32.141 0.366,14 0.395,10.177 4.773,13.816 4.283,3.616 8.839,7.069 15.662,13.103 7.183,6.248 22.237,17.216 24.243,20.588 2.149,3.444 2.131,11.317 0.844,13.823 -1.284,2.439 -12.579,3.875 -12.508,3.875 -0.071,0 9.815,13.566 11.757,15.508 1.87,1.87 9.902,10.809 42.678,4.704 18.524,-3.455 33.124,-13.753 43.078,-23.856 12.789,-12.762 6.107,-16.773 7.826,-23.291 2.513,-9.416 11.277,-12.961 13.143,-23.602 0.216,-1.508 0.754,-2.654 2.113,-4.876 2.096,-3.202 1.561,-9.447 1.582,-15.185 0.067,-15.027 -1.705,-30.234 -5.159,-41.434 -3.171,-10.483 -8.204,-17.817 -12.515,-27.305 -8.624,-18.906 -8.221,-27.415 -15.933,-39.474 -8.586,-13.613 -4.601,-22.583 -16.011,-21.99 -14.374,0.826 -26.375,21.016 -40.104,21.584 z"
+                 id="path6322" />
+              <path
+                 style="fill:#757575"
+                 inkscape:connector-curvature="0"
+                 d="m 159.955,130.419 c -9.201,0.346 -23.299,-25.175 -23.931,-15.383 -0.344,8.295 -0.017,8.284 -0.156,16.494 -0.301,5.764 -3.17,6.867 -8.812,15.555 -3.002,4.774 -5.148,9.76 -6.714,14.706 -0.784,3.41 -0.889,6.508 -1.764,9.548 -0.471,1.699 -1.986,3.133 -3.003,5.259 -3.554,10.688 -13.624,24.1 -16.009,34.619 -2.483,10.82 -5.411,17.678 -4.954,32.097 0.373,13.528 0.285,10.058 4.651,13.739 4.244,3.632 8.893,7.154 15.699,13.171 7.167,6.233 22.299,17.224 24.294,20.585 2.142,3.432 2.175,11.404 0.896,13.896 -1.271,2.428 -12.558,3.932 -12.486,3.932 -0.071,0 9.768,13.453 11.705,15.392 1.867,1.867 9.867,10.744 42.588,4.655 18.545,-3.453 33.415,-13.682 42.956,-23.879 12.187,-12.492 5.591,-16.771 7.3,-23.258 2.507,-9.398 11.826,-12.959 13.687,-23.586 0.215,-1.5 0.788,-2.643 2.138,-4.854 2.104,-3.235 1.538,-9.462 1.58,-15.178 0.133,-15.076 -1.681,-30.228 -5.135,-41.394 -3.173,-10.455 -8.199,-17.779 -12.501,-27.25 -8.609,-18.877 -8.234,-27.399 -15.952,-39.42 -8.389,-13.258 -4.739,-21.911 -15.895,-21.301 -14.21,0.859 -26.474,21.295 -40.182,21.855 z"
+                 id="path6324" />
+              <path
+                 style="fill:#7c7c7c"
+                 inkscape:connector-curvature="0"
+                 d="m 159.938,131.504 c -9.122,0.338 -22.854,-24.838 -23.622,-15.586 -0.37,7.833 -0.131,7.89 -0.341,15.741 -0.452,5.657 -3.388,7.096 -8.899,15.628 -2.99,4.785 -5.021,9.708 -6.433,14.535 -0.602,3.566 -0.218,6.594 -1.099,9.57 -0.526,1.756 -2.475,3.08 -3.82,5.477 -3.854,10.596 -13.703,24.016 -16.057,34.361 -2.501,10.829 -5.453,17.66 -4.948,32.052 0.38,13.059 0.177,9.939 4.529,13.66 4.208,3.648 8.948,7.239 15.739,13.242 7.149,6.217 22.358,17.232 24.345,20.581 2.13,3.42 2.216,11.489 0.946,13.968 -1.259,2.417 -12.538,3.99 -12.466,3.99 -0.072,0 9.718,13.34 11.653,15.275 1.865,1.864 9.833,10.681 42.498,4.607 18.565,-3.453 33.706,-13.609 42.834,-23.902 11.583,-12.223 5.074,-16.771 6.774,-23.223 2.499,-9.382 12.375,-12.959 14.229,-23.57 0.215,-1.496 0.821,-2.633 2.162,-4.834 2.111,-3.271 1.516,-9.478 1.578,-15.173 0.199,-15.125 -1.657,-30.221 -5.109,-41.354 -3.177,-10.427 -8.196,-17.741 -12.488,-27.195 -8.594,-18.848 -8.247,-27.383 -15.972,-39.366 -8.192,-12.903 -4.877,-21.239 -15.779,-20.612 -14.041,0.894 -26.569,21.576 -40.254,22.128 z"
+                 id="path6326" />
+              <path
+                 style="fill:#848484"
+                 inkscape:connector-curvature="0"
+                 d="m 159.921,132.589 c -9.043,0.331 -22.406,-24.502 -23.312,-15.79 -0.398,7.373 -0.247,7.496 -0.527,14.988 -0.602,5.551 -3.604,7.326 -8.984,15.702 -2.98,4.796 -4.896,9.656 -6.154,14.364 -0.417,3.723 0.455,6.679 -0.432,9.592 -0.582,1.813 -2.964,3.026 -4.639,5.694 -4.153,10.504 -13.782,23.936 -16.104,34.104 -2.519,10.838 -5.495,17.643 -4.941,32.008 0.387,12.586 0.067,9.819 4.407,13.582 4.171,3.664 9.002,7.324 15.777,13.311 7.132,6.201 22.419,17.24 24.396,20.576 2.12,3.41 2.259,11.578 0.998,14.041 -1.247,2.408 -12.517,4.049 -12.446,4.049 -0.07,0 9.67,13.227 11.604,15.16 1.861,1.861 9.798,10.615 42.409,4.558 18.584,-3.45 33.996,-13.538 42.711,-23.926 10.979,-11.952 4.557,-16.769 6.248,-23.187 2.491,-9.367 12.924,-12.959 14.771,-23.557 0.215,-1.49 0.856,-2.622 2.188,-4.813 2.118,-3.305 1.491,-9.494 1.575,-15.166 0.267,-15.174 -1.635,-30.215 -5.086,-41.314 -3.179,-10.399 -8.19,-17.703 -12.473,-27.141 -8.579,-18.818 -8.262,-27.366 -15.994,-39.312 -7.993,-12.547 -5.013,-20.565 -15.661,-19.922 -13.876,0.927 -26.669,21.855 -40.331,22.399 z"
+                 id="path6328" />
+              <path
+                 style="fill:#8c8c8c"
+                 inkscape:connector-curvature="0"
+                 d="m 159.903,133.674 c -8.963,0.323 -21.961,-24.165 -23.001,-15.994 -0.426,6.912 -0.363,7.102 -0.713,14.236 -0.753,5.445 -3.821,7.554 -9.071,15.775 -2.969,4.807 -4.768,9.604 -5.875,14.192 -0.232,3.881 1.128,6.766 0.234,9.615 -0.638,1.87 -3.452,2.972 -5.455,5.911 -4.455,10.413 -13.862,23.853 -16.153,33.845 -2.537,10.849 -5.537,17.625 -4.935,31.963 0.393,12.115 -0.042,9.701 4.285,13.505 4.133,3.68 9.057,7.409 15.814,13.38 7.116,6.188 22.48,17.248 24.447,20.574 2.109,3.398 2.301,11.662 1.049,14.113 -1.235,2.396 -12.496,4.104 -12.425,4.104 -0.071,0 9.622,13.114 11.552,15.045 1.86,1.858 9.763,10.552 42.319,4.509 18.604,-3.449 34.288,-13.467 42.589,-23.949 10.377,-11.682 4.04,-16.766 5.721,-23.15 2.486,-9.35 13.474,-12.959 15.316,-23.542 0.214,-1.483 0.89,-2.611 2.213,-4.793 2.126,-3.339 1.468,-9.507 1.573,-15.158 0.333,-15.224 -1.611,-30.208 -5.062,-41.276 -3.181,-10.37 -8.186,-17.664 -12.459,-27.085 -8.563,-18.789 -8.275,-27.35 -16.014,-39.258 -7.796,-12.192 -5.151,-19.893 -15.545,-19.233 -13.707,0.961 -26.763,22.134 -40.404,22.671 z"
+                 id="path6330" />
+              <path
+                 style="fill:#939393"
+                 inkscape:connector-curvature="0"
+                 d="m 159.886,134.759 c -8.885,0.316 -21.516,-23.829 -22.691,-16.197 -0.454,6.451 -0.479,6.708 -0.899,13.482 -0.903,5.339 -4.038,7.784 -9.157,15.849 -2.957,4.818 -4.642,9.552 -5.595,14.021 -0.05,4.037 1.799,6.852 0.9,9.637 -0.693,1.928 -3.941,2.919 -6.273,6.129 -4.756,10.32 -13.941,23.77 -16.201,33.587 -2.555,10.858 -5.579,17.608 -4.928,31.92 0.399,11.644 -0.151,9.581 4.162,13.424 4.096,3.697 9.111,7.494 15.854,13.451 7.099,6.17 22.541,17.256 24.498,20.569 2.1,3.387 2.344,11.75 1.101,14.186 -1.223,2.387 -12.476,4.163 -12.404,4.163 -0.071,0 9.573,13.001 11.5,14.929 1.857,1.856 9.729,10.488 42.229,4.461 18.625,-3.449 34.579,-13.396 42.467,-23.973 9.774,-11.412 3.523,-16.764 5.195,-23.115 2.479,-9.334 14.022,-12.959 15.858,-23.527 0.214,-1.479 0.924,-2.601 2.238,-4.772 2.134,-3.373 1.445,-9.522 1.571,-15.151 0.399,-15.273 -1.587,-30.201 -5.036,-41.237 -3.185,-10.342 -8.184,-17.625 -12.446,-27.03 -8.548,-18.76 -8.288,-27.333 -16.034,-39.204 -7.598,-11.837 -5.289,-19.221 -15.428,-18.544 -13.543,0.994 -26.863,22.413 -40.481,22.942 z"
+                 id="path6332" />
+              <path
+                 style="fill:#9b9b9b"
+                 inkscape:connector-curvature="0"
+                 d="m 159.868,135.844 c -8.805,0.308 -21.068,-23.492 -22.381,-16.401 -0.481,5.991 -0.594,6.314 -1.085,12.73 -1.053,5.232 -4.253,8.013 -9.243,15.922 -2.946,4.829 -4.515,9.5 -5.314,13.85 0.133,4.194 2.471,6.937 1.565,9.658 -0.749,1.986 -4.43,2.866 -7.091,6.347 -5.056,10.229 -14.021,23.689 -16.249,33.329 -2.572,10.868 -5.621,17.591 -4.921,31.876 0.405,11.172 -0.261,9.463 4.04,13.346 4.058,3.713 9.166,7.58 15.892,13.521 7.082,6.155 22.601,17.265 24.548,20.567 2.092,3.373 2.388,11.834 1.152,14.256 -1.21,2.377 -12.454,4.222 -12.383,4.222 -0.071,0 9.523,12.888 11.45,14.813 1.854,1.854 9.692,10.424 42.138,4.412 18.645,-3.447 34.871,-13.324 42.345,-23.996 9.171,-11.143 3.007,-16.762 4.669,-23.08 2.472,-9.317 14.572,-12.959 16.401,-23.514 0.214,-1.473 0.958,-2.588 2.265,-4.75 2.142,-3.408 1.421,-9.539 1.568,-15.145 0.466,-15.324 -1.564,-30.196 -5.012,-41.198 -3.187,-10.313 -8.179,-17.587 -12.433,-26.976 -8.533,-18.73 -8.301,-27.316 -16.054,-39.149 -7.401,-11.482 -5.426,-18.548 -15.313,-17.855 -13.373,1.029 -26.958,22.694 -40.554,23.215 z"
+                 id="path6334" />
+              <path
+                 style="fill:#a3a3a3"
+                 inkscape:connector-curvature="0"
+                 d="m 159.851,136.929 c -8.727,0.301 -20.622,-23.156 -22.071,-16.604 -0.509,5.529 -0.71,5.919 -1.271,11.976 -1.203,5.126 -4.47,8.243 -9.328,15.996 -2.936,4.84 -4.39,9.448 -5.036,13.679 0.316,4.351 3.143,7.023 2.231,9.68 -0.804,2.043 -4.919,2.812 -7.908,6.563 -5.356,10.137 -14.101,23.607 -16.298,33.072 -2.589,10.877 -5.661,17.574 -4.913,31.832 0.412,10.699 -0.37,9.342 3.918,13.268 4.021,3.729 9.221,7.664 15.93,13.59 7.064,6.139 22.661,17.271 24.599,20.563 2.081,3.363 2.43,11.922 1.204,14.33 -1.198,2.365 -12.434,4.278 -12.363,4.278 -0.07,0 9.477,12.774 11.399,14.697 1.851,1.851 9.659,10.36 42.048,4.364 18.666,-3.447 35.162,-13.254 42.223,-24.021 8.568,-10.873 2.49,-16.761 4.144,-23.045 2.464,-9.301 15.121,-12.958 16.943,-23.498 0.215,-1.467 0.992,-2.579 2.29,-4.729 2.148,-3.441 1.398,-9.553 1.566,-15.139 0.532,-15.373 -1.541,-30.189 -4.987,-41.158 -3.188,-10.285 -8.174,-17.549 -12.419,-26.921 -8.518,-18.701 -8.313,-27.3 -16.073,-39.096 -7.204,-11.126 -5.564,-17.875 -15.196,-17.165 -13.21,1.064 -27.058,22.975 -40.632,23.488 z"
+                 id="path6336" />
+              <path
+                 style="fill:#aaaaaa"
+                 inkscape:connector-curvature="0"
+                 d="m 159.834,138.014 c -8.646,0.293 -20.176,-22.819 -21.761,-16.808 -0.536,5.069 -0.826,5.526 -1.457,11.224 -1.354,5.02 -4.687,8.472 -9.416,16.069 -2.924,4.851 -4.262,9.396 -4.756,13.508 0.501,4.507 3.814,7.109 2.897,9.702 -0.858,2.1 -5.406,2.759 -8.725,6.782 -5.657,10.045 -14.181,23.524 -16.347,32.812 -2.606,10.888 -5.703,17.557 -4.906,31.787 0.418,10.229 -0.479,9.225 3.795,13.189 3.984,3.745 9.275,7.749 15.968,13.66 7.048,6.124 22.723,17.279 24.651,20.559 2.07,3.352 2.472,12.008 1.255,14.402 -1.186,2.355 -12.414,4.337 -12.343,4.337 -0.071,0 9.428,12.66 11.348,14.581 1.85,1.848 9.624,10.297 41.958,4.314 18.687,-3.444 35.453,-13.18 42.102,-24.043 7.965,-10.602 1.973,-16.758 3.616,-23.01 2.457,-9.283 15.67,-12.957 17.487,-23.482 0.214,-1.461 1.026,-2.568 2.315,-4.709 2.155,-3.477 1.375,-9.568 1.563,-15.131 0.6,-15.424 -1.518,-30.184 -4.963,-41.119 -3.192,-10.257 -8.17,-17.511 -12.405,-26.866 -8.502,-18.672 -8.328,-27.284 -16.095,-39.042 -7.005,-10.771 -5.701,-17.203 -15.078,-16.476 -13.04,1.098 -27.152,23.255 -40.703,23.76 z"
+                 id="path6338" />
+              <path
+                 style="fill:#b2b2b2"
+                 inkscape:connector-curvature="0"
+                 d="m 159.816,139.099 c -8.567,0.286 -19.729,-22.483 -21.45,-17.012 -0.563,4.608 -0.942,5.132 -1.643,10.471 -1.506,4.914 -4.904,8.701 -9.502,16.143 -2.913,4.862 -4.137,9.344 -4.477,13.336 0.685,4.665 4.486,7.195 3.564,9.725 -0.915,2.157 -5.897,2.705 -9.543,6.999 -5.958,9.953 -14.262,23.443 -16.396,32.554 -2.624,10.898 -5.745,17.54 -4.9,31.744 0.426,9.757 -0.588,9.105 3.674,13.111 3.945,3.761 9.33,7.834 16.006,13.729 7.032,6.109 22.783,17.288 24.702,20.557 2.06,3.338 2.515,12.094 1.306,14.473 -1.173,2.346 -12.392,4.395 -12.321,4.395 -0.07,0 9.379,12.549 11.296,14.465 1.847,1.848 9.591,10.234 41.868,4.268 18.706,-3.444 35.745,-13.11 41.979,-24.066 7.361,-10.332 1.456,-16.757 3.091,-22.974 2.45,-9.269 16.219,-12.958 18.03,-23.47 0.213,-1.455 1.06,-2.557 2.34,-4.688 2.164,-3.509 1.352,-9.583 1.562,-15.124 0.665,-15.473 -1.494,-30.177 -4.938,-41.08 -3.195,-10.228 -8.166,-17.472 -12.393,-26.811 -8.486,-18.642 -8.341,-27.267 -16.114,-38.987 -6.809,-10.416 -5.838,-16.531 -14.962,-15.787 -12.873,1.129 -27.25,23.531 -40.779,24.029 z"
+                 id="path6340" />
+              <path
+                 style="fill:#bababa"
+                 inkscape:connector-curvature="0"
+                 d="m 159.799,140.184 c -8.487,0.279 -19.282,-22.146 -21.141,-17.215 -0.591,4.147 -1.057,4.737 -1.828,9.717 -1.656,4.808 -5.121,8.931 -9.588,16.217 -2.902,4.873 -4.01,9.292 -4.197,13.165 0.868,4.822 5.158,7.281 4.23,9.747 -0.971,2.215 -6.385,2.651 -10.361,7.216 -6.258,9.861 -14.339,23.36 -16.442,32.297 -2.643,10.906 -5.787,17.521 -4.894,31.699 0.432,9.285 -0.697,8.986 3.552,13.032 3.908,3.776 9.384,7.919 16.043,13.799 7.016,6.093 22.845,17.296 24.753,20.552 2.051,3.328 2.559,12.18 1.358,14.547 -1.161,2.334 -12.372,4.451 -12.301,4.451 -0.071,0 9.33,12.436 11.245,14.35 1.844,1.844 9.555,10.17 41.777,4.219 18.727,-3.443 36.036,-13.039 41.857,-24.09 6.759,-10.063 0.939,-16.756 2.565,-22.939 2.442,-9.25 16.768,-12.957 18.572,-23.453 0.213,-1.451 1.095,-2.547 2.365,-4.668 2.171,-3.543 1.329,-9.599 1.56,-15.117 0.732,-15.522 -1.471,-30.172 -4.913,-41.042 -3.197,-10.2 -8.161,-17.433 -12.379,-26.756 -8.471,-18.612 -8.354,-27.25 -16.135,-38.933 -6.609,-10.061 -5.976,-15.858 -14.845,-15.098 -12.706,1.165 -27.347,23.813 -40.853,24.303 z"
+                 id="path6342" />
+              <path
+                 style="fill:#c1c1c1"
+                 inkscape:connector-curvature="0"
+                 d="m 159.781,141.269 c -8.408,0.271 -18.837,-21.81 -20.83,-17.419 -0.619,3.687 -1.173,4.344 -2.014,8.965 -1.808,4.701 -5.338,9.16 -9.674,16.29 -2.892,4.884 -3.885,9.24 -3.918,12.994 1.052,4.978 5.829,7.367 4.896,9.769 -1.026,2.272 -6.874,2.598 -11.178,7.434 -6.56,9.769 -14.419,23.277 -16.491,32.039 -2.66,10.916 -5.829,17.504 -4.887,31.656 0.438,8.813 -0.807,8.867 3.43,12.953 3.87,3.793 9.438,8.004 16.082,13.868 6.997,6.077 22.904,17.304 24.803,20.55 2.041,3.314 2.601,12.266 1.409,14.617 -1.149,2.324 -12.351,4.51 -12.28,4.51 -0.07,0 9.282,12.321 11.194,14.233 1.841,1.842 9.521,10.106 41.688,4.17 18.746,-3.44 36.326,-12.967 41.734,-24.112 6.156,-9.793 0.423,-16.754 2.038,-22.904 2.438,-9.235 17.318,-12.957 19.117,-23.438 0.212,-1.444 1.128,-2.536 2.39,-4.647 2.18,-3.578 1.306,-9.613 1.558,-15.11 0.799,-15.571 -1.447,-30.165 -4.889,-41.002 -3.2,-10.172 -8.156,-17.395 -12.364,-26.701 -8.456,-18.583 -8.367,-27.234 -16.155,-38.88 -6.413,-9.705 -6.114,-15.185 -14.729,-14.408 -12.541,1.197 -27.445,24.091 -40.93,24.573 z"
+                 id="path6344" />
+              <path
+                 style="fill:#c9c9c9"
+                 inkscape:connector-curvature="0"
+                 d="m 159.764,142.354 c -8.329,0.264 -18.392,-21.473 -20.521,-17.622 -0.646,3.225 -1.289,3.949 -2.2,8.211 -1.957,4.596 -5.555,9.39 -9.761,16.364 -2.879,4.895 -3.757,9.188 -3.638,12.823 1.235,5.135 6.502,7.453 5.562,9.791 -1.081,2.329 -7.362,2.544 -11.995,7.651 -6.859,9.677 -14.499,23.195 -16.54,31.78 -2.677,10.927 -5.87,17.488 -4.879,31.611 0.444,8.344 -0.916,8.748 3.307,12.875 3.834,3.81 9.492,8.09 16.121,13.939 6.98,6.061 22.965,17.311 24.854,20.545 2.031,3.303 2.643,12.352 1.461,14.69 -1.137,2.313 -12.33,4.567 -12.26,4.567 -0.07,0 9.233,12.209 11.143,14.117 1.839,1.84 9.486,10.043 41.599,4.122 18.767,-3.44 36.618,-12.896 41.612,-24.137 5.554,-9.522 -0.094,-16.751 1.513,-22.868 2.43,-9.219 17.866,-12.957 19.659,-23.424 0.213,-1.439 1.162,-2.525 2.415,-4.627 2.188,-3.612 1.282,-9.629 1.556,-15.104 0.865,-15.621 -1.424,-30.158 -4.864,-40.962 -3.202,-10.144 -8.153,-17.357 -12.351,-26.646 -8.441,-18.554 -8.381,-27.218 -16.176,-38.826 -6.216,-9.35 -6.251,-14.513 -14.612,-13.719 -12.374,1.235 -27.543,24.375 -41.005,24.849 z"
+                 id="path6346" />
+              <path
+                 style="fill:#d1d1d1"
+                 inkscape:connector-curvature="0"
+                 d="m 159.747,143.439 c -8.25,0.256 -17.944,-21.137 -20.21,-17.826 -0.675,2.765 -1.406,3.555 -2.386,7.459 -2.108,4.489 -5.772,9.619 -9.847,16.437 -2.869,4.906 -3.631,9.136 -3.358,12.652 1.419,5.292 7.174,7.538 6.228,9.812 -1.137,2.387 -7.852,2.491 -12.813,7.869 -7.161,9.586 -14.579,23.114 -16.588,31.522 -2.695,10.938 -5.912,17.471 -4.873,31.568 0.451,7.871 -1.025,8.629 3.185,12.797 3.796,3.824 9.547,8.174 16.158,14.008 6.964,6.047 23.026,17.32 24.905,20.541 2.021,3.292 2.686,12.439 1.513,14.764 -1.125,2.303 -12.31,4.625 -12.239,4.625 -0.07,0 9.186,12.094 11.092,14.002 1.836,1.836 9.45,9.978 41.509,4.072 18.786,-3.439 36.909,-12.824 41.49,-24.16 4.948,-9.252 -0.611,-16.748 0.985,-22.832 2.423,-9.203 18.415,-12.957 20.203,-23.41 0.212,-1.434 1.196,-2.514 2.44,-4.605 2.193,-3.646 1.259,-9.645 1.553,-15.098 0.932,-15.67 -1.4,-30.151 -4.84,-40.922 -3.205,-10.115 -8.148,-17.319 -12.336,-26.592 -8.427,-18.524 -8.396,-27.201 -16.197,-38.771 -6.017,-8.995 -6.388,-13.84 -14.495,-13.03 -12.207,1.266 -27.64,24.652 -41.079,25.118 z"
+                 id="path6348" />
+              <path
+                 style="fill:#d8d8d8"
+                 inkscape:connector-curvature="0"
+                 d="m 159.729,144.524 c -8.17,0.249 -17.498,-20.8 -19.9,-18.03 -0.702,2.304 -1.521,3.162 -2.571,6.706 -2.259,4.383 -5.988,9.848 -9.933,16.511 -2.858,4.917 -3.504,9.084 -3.079,12.48 1.604,5.449 7.846,7.625 6.895,9.835 -1.193,2.444 -8.342,2.438 -13.631,8.087 -7.461,9.493 -14.658,23.031 -16.637,31.262 -2.712,10.947 -5.953,17.455 -4.865,31.524 0.458,7.399 -1.135,8.511 3.063,12.718 3.758,3.842 9.601,8.26 16.196,14.078 6.946,6.031 23.087,17.328 24.956,20.538 2.011,3.28 2.729,12.524 1.563,14.835 -1.112,2.293 -12.289,4.684 -12.218,4.684 -0.071,0 9.136,11.981 11.04,13.886 1.834,1.834 9.417,9.913 41.419,4.024 18.807,-3.438 37.2,-12.752 41.368,-24.184 4.346,-8.982 -1.128,-16.747 0.46,-22.798 2.416,-9.187 18.964,-12.956 20.746,-23.394 0.211,-1.429 1.229,-2.504 2.465,-4.586 2.202,-3.681 1.236,-9.658 1.551,-15.091 0.998,-15.72 -1.377,-30.146 -4.814,-40.884 -3.208,-10.086 -8.145,-17.28 -12.323,-26.536 -8.411,-18.495 -8.408,-27.185 -16.217,-38.717 -5.82,-8.64 -6.526,-13.168 -14.38,-12.341 -12.04,1.303 -27.736,24.934 -41.154,25.393 z"
+                 id="path6350" />
+              <path
+                 style="fill:#e0e0e0"
+                 inkscape:connector-curvature="0"
+                 d="m 159.712,145.609 c -8.091,0.241 -17.052,-20.464 -19.59,-18.233 -0.729,1.843 -1.637,2.767 -2.757,5.953 -2.409,4.276 -6.206,10.077 -10.02,16.584 -2.847,4.928 -3.378,9.032 -2.8,12.309 1.787,5.606 8.519,7.711 7.561,9.857 -1.248,2.502 -8.829,2.384 -14.448,8.304 -7.761,9.402 -14.738,22.95 -16.684,31.006 -2.731,10.955 -5.996,17.436 -4.859,31.48 0.464,6.928 -1.244,8.389 2.939,12.639 3.722,3.857 9.656,8.344 16.234,14.148 6.932,6.014 23.148,17.336 25.008,20.533 2,3.268 2.771,12.611 1.615,14.907 -1.1,2.282 -12.268,4.741 -12.198,4.741 -0.069,0 9.089,11.867 10.989,13.77 1.831,1.831 9.382,9.85 41.329,3.977 18.827,-3.438 37.492,-12.683 41.246,-24.207 3.743,-8.715 -1.646,-16.746 -0.066,-22.762 2.409,-9.171 19.514,-12.957 21.289,-23.381 0.211,-1.422 1.265,-2.494 2.49,-4.564 2.21,-3.715 1.213,-9.674 1.549,-15.084 1.065,-15.77 -1.354,-30.139 -4.791,-40.844 -3.21,-10.058 -8.14,-17.241 -12.309,-26.481 -8.396,-18.466 -8.421,-27.168 -16.237,-38.664 -5.622,-8.284 -6.663,-12.495 -14.262,-11.651 -11.872,1.335 -27.833,25.212 -41.228,25.663 z"
+                 id="path6352" />
+              <path
+                 style="fill:#e8e8e8"
+                 inkscape:connector-curvature="0"
+                 d="m 159.694,146.694 c -8.012,0.234 -16.605,-20.127 -19.279,-18.437 -0.757,1.383 -1.753,2.373 -2.943,5.2 -2.56,4.171 -6.423,10.307 -10.105,16.658 -2.835,4.939 -3.251,8.979 -2.52,12.138 1.97,5.763 9.189,7.796 8.226,9.879 -1.303,2.559 -9.318,2.33 -15.265,8.521 -8.063,9.31 -14.818,22.867 -16.733,30.748 -2.748,10.967 -6.037,17.419 -4.853,31.436 0.472,6.457 -1.353,8.271 2.818,12.562 3.685,3.873 9.711,8.429 16.273,14.218 6.913,6 23.207,17.344 25.058,20.529 1.991,3.257 2.814,12.697 1.666,14.98 -1.087,2.271 -12.247,4.799 -12.177,4.799 -0.07,0 9.04,11.755 10.938,13.654 1.829,1.828 9.349,9.785 41.239,3.926 18.847,-3.435 37.783,-12.609 41.124,-24.229 3.14,-8.444 -2.161,-16.743 -0.592,-22.728 2.401,-9.152 20.062,-12.955 21.831,-23.364 0.211,-1.417 1.298,-2.483 2.516,-4.544 2.217,-3.748 1.19,-9.689 1.547,-15.076 1.132,-15.82 -1.331,-30.133 -4.766,-40.806 -3.213,-10.03 -8.136,-17.203 -12.296,-26.427 -8.38,-18.436 -8.435,-27.151 -16.257,-38.609 -5.425,-7.929 -6.802,-11.822 -14.146,-10.962 -11.706,1.368 -27.931,25.491 -41.304,25.934 z"
+                 id="path6354" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 159.677,147.779 c -7.934,0.226 -16.16,-19.791 -18.97,-18.64 -0.785,0.921 -1.869,1.979 -3.13,4.447 -2.71,4.064 -6.639,10.536 -10.19,16.731 -2.824,4.95 -3.125,8.928 -2.24,11.967 2.152,5.919 9.86,7.882 8.892,9.901 -1.358,2.616 -9.808,2.277 -16.083,8.739 -8.363,9.218 -14.896,22.784 -16.781,30.489 -2.766,10.977 -6.079,17.402 -4.846,31.393 0.478,5.984 -1.462,8.152 2.696,12.482 3.646,3.889 9.765,8.514 16.311,14.287 6.896,5.983 23.269,17.352 25.109,20.526 1.98,3.245 2.855,12.782 1.718,15.052 -1.076,2.262 -12.227,4.857 -12.156,4.857 -0.07,0 8.991,11.641 10.887,13.537 1.826,1.826 9.313,9.723 41.148,3.879 18.868,-3.434 38.074,-12.538 41.002,-24.254 2.537,-8.174 -2.678,-16.741 -1.119,-22.69 2.396,-9.138 20.612,-12.957 22.375,-23.351 0.212,-1.412 1.332,-2.473 2.541,-4.523 2.226,-3.783 1.166,-9.704 1.545,-15.07 1.197,-15.869 -1.307,-30.125 -4.741,-40.766 -3.215,-10.002 -8.131,-17.165 -12.282,-26.372 -8.365,-18.407 -8.447,-27.135 -16.277,-38.555 -5.228,-7.574 -6.938,-11.15 -14.029,-10.272 -11.541,1.402 -28.029,25.771 -41.38,26.206 z"
+                 id="path6356" />
+              <path
+                 style="fill:#f7f7f7"
+                 inkscape:connector-curvature="0"
+                 d="m 159.66,148.864 c -7.854,0.219 -15.714,-19.454 -18.66,-18.844 -0.812,0.461 -1.983,1.585 -3.314,3.694 -2.86,3.958 -6.856,10.766 -10.278,16.805 -2.813,4.961 -2.998,8.876 -1.96,11.796 2.337,6.076 10.533,7.968 9.558,9.923 -1.415,2.673 -10.296,2.223 -16.899,8.956 -8.664,9.126 -14.978,22.702 -16.83,30.23 -2.783,10.986 -6.121,17.386 -4.839,31.349 0.484,5.515 -1.571,8.033 2.573,12.403 3.609,3.906 9.82,8.6 16.35,14.357 6.88,5.969 23.329,17.36 25.16,20.523 1.971,3.232 2.898,12.869 1.77,15.124 -1.063,2.252 -12.206,4.915 -12.136,4.915 -0.07,0 8.942,11.527 10.835,13.422 1.824,1.822 9.279,9.658 41.059,3.83 18.889,-3.434 38.366,-12.467 40.881,-24.278 1.934,-7.903 -3.195,-16.739 -1.646,-22.655 2.388,-9.121 21.161,-12.955 22.918,-23.336 0.211,-1.404 1.366,-2.461 2.566,-4.502 2.232,-3.816 1.143,-9.719 1.542,-15.063 1.265,-15.92 -1.283,-30.12 -4.717,-40.727 -3.219,-9.974 -8.128,-17.127 -12.269,-26.317 -8.349,-18.378 -8.461,-27.119 -16.298,-38.501 -5.029,-7.219 -7.075,-10.478 -13.912,-9.584 -11.373,1.438 -28.126,26.053 -41.454,26.48 z"
+                 id="path6358" />
+            </g>
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 159.642,149.949 c -7.774,0.211 -15.268,-19.118 -18.35,-19.048 -0.84,0 -2.1,1.191 -3.501,2.941 -3.011,3.852 -7.072,10.995 -10.363,16.878 -2.803,4.972 -2.872,8.824 -1.682,11.625 2.521,6.233 11.205,8.054 10.225,9.945 -1.471,2.731 -10.785,2.17 -17.719,9.174 -8.964,9.034 -15.056,22.621 -16.877,29.973 -2.801,10.995 -6.163,17.368 -4.832,31.304 0.49,5.043 -1.681,7.914 2.451,12.325 3.571,3.923 9.874,8.685 16.387,14.427 6.863,5.953 23.391,17.368 25.211,20.521 1.962,3.221 2.942,12.954 1.821,15.196 -1.051,2.24 -12.185,4.972 -12.115,4.972 -0.069,0 8.895,11.416 10.784,13.307 1.821,1.82 9.244,9.595 40.97,3.781 18.907,-3.431 38.656,-12.396 40.758,-24.302 1.331,-7.633 -3.712,-16.736 -2.171,-22.619 2.381,-9.104 21.71,-12.956 23.461,-23.321 0.21,-1.399 1.399,-2.45 2.591,-4.481 2.24,-3.852 1.12,-9.734 1.54,-15.057 1.331,-15.968 -1.26,-30.113 -4.692,-40.688 -3.221,-9.945 -8.123,-17.088 -12.255,-26.262 -8.334,-18.348 -8.474,-27.102 -16.318,-38.447 -4.832,-6.863 -7.213,-9.805 -13.796,-8.894 -11.205,1.469 -28.222,26.33 -41.528,26.75 z"
+               id="path6360" />
+          </g>
+          <path
+             style="fill:#995900"
+             inkscape:connector-curvature="0"
+             d="m 164.958,78.857 c 5.256,-0.648 12.456,0.648 15.769,3.096 3.096,2.304 5.256,3.528 8.063,4.464 9.433,3.096 21.816,4.536 21.24,13.032 -0.648,10.151 -3.6,14.688 -12.024,17.351 -6.768,2.088 -18.863,13.824 -28.224,13.824 -4.176,0 -10.008,0.216 -13.392,-1.008 -3.24,-1.152 -7.776,-6.624 -13.104,-11.016 -5.328,-4.32 -10.296,-8.928 -10.439,-14.976 -0.217,-6.407 3.96,-8.496 9.863,-13.607 3.097,-2.736 8.712,-7.272 12.601,-9.288 3.599,-1.799 5.903,-1.439 9.647,-1.872 z"
+             id="path6362" />
+          <g
+             id="g6364">
+            <path
+               style="fill:#9e5f00"
+               inkscape:connector-curvature="0"
+               d="m 165.068,78.951 c 5.225,-0.644 12.384,0.645 15.677,3.079 3.078,2.29 5.227,3.51 8.018,4.438 9.375,3.078 21.729,4.529 21.159,12.973 -0.641,10.09 -3.669,14.581 -12.041,17.223 -6.723,2.073 -18.768,13.589 -28.07,13.64 -4.21,0.032 -9.926,0.234 -13.287,-0.977 -3.215,-1.142 -7.737,-6.608 -13.031,-10.969 -5.291,-4.292 -10.26,-8.774 -10.317,-14.765 -0.153,-6.252 3.912,-8.411 9.773,-13.488 3.071,-2.71 8.594,-7.303 12.463,-9.333 3.563,-1.803 5.933,-1.392 9.656,-1.821 z"
+               id="path6366" />
+            <path
+               style="fill:#a36400"
+               inkscape:connector-curvature="0"
+               d="m 165.177,79.044 c 5.195,-0.641 12.313,0.64 15.587,3.06 3.06,2.278 5.194,3.494 7.971,4.413 9.317,3.06 21.641,4.522 21.078,12.914 -0.634,10.027 -3.737,14.474 -12.058,17.094 -6.678,2.057 -18.673,13.352 -27.919,13.454 -4.241,0.064 -9.842,0.252 -13.18,-0.945 -3.19,-1.133 -7.7,-6.592 -12.96,-10.921 -5.254,-4.264 -10.222,-8.622 -10.192,-14.555 -0.093,-6.099 3.863,-8.329 9.681,-13.369 3.048,-2.685 8.478,-7.335 12.328,-9.379 3.526,-1.804 5.963,-1.338 9.664,-1.766 z"
+               id="path6368" />
+            <path
+               style="fill:#a86a00"
+               inkscape:connector-curvature="0"
+               d="m 165.287,79.138 c 5.165,-0.637 12.241,0.637 15.496,3.043 3.042,2.264 5.165,3.476 7.924,4.387 9.26,3.042 21.556,4.515 20.998,12.854 -0.627,9.968 -3.805,14.368 -12.074,16.967 -6.633,2.042 -18.576,13.117 -27.766,13.27 -4.276,0.096 -9.759,0.27 -13.075,-0.914 -3.165,-1.123 -7.661,-6.577 -12.887,-10.874 -5.217,-4.236 -10.187,-8.468 -10.069,-14.345 -0.03,-5.943 3.815,-8.244 9.589,-13.249 3.023,-2.66 8.36,-7.366 12.191,-9.424 3.49,-1.808 5.993,-1.291 9.673,-1.715 z"
+               id="path6370" />
+            <path
+               style="fill:#ad7000"
+               inkscape:connector-curvature="0"
+               d="m 165.396,79.23 c 5.135,-0.633 12.17,0.633 15.404,3.025 3.025,2.251 5.137,3.46 7.88,4.361 9.201,3.025 21.467,4.508 20.917,12.796 -0.62,9.905 -3.874,14.26 -12.093,16.837 -6.586,2.027 -18.479,12.882 -27.611,13.086 -4.311,0.127 -9.677,0.287 -12.971,-0.883 -3.14,-1.113 -7.622,-6.561 -12.814,-10.826 -5.18,-4.208 -10.148,-8.315 -9.945,-14.135 0.031,-5.789 3.768,-8.16 9.497,-13.129 2.999,-2.635 8.244,-7.398 12.055,-9.47 3.454,-1.808 6.023,-1.24 9.681,-1.662 z"
+               id="path6372" />
+            <path
+               style="fill:#b27600"
+               inkscape:connector-curvature="0"
+               d="m 165.506,79.325 c 5.105,-0.63 12.099,0.629 15.314,3.007 3.007,2.237 5.104,3.442 7.832,4.335 9.145,3.007 21.38,4.501 20.837,12.737 -0.614,9.844 -3.943,14.154 -12.109,16.709 -6.541,2.011 -18.385,12.645 -27.46,12.9 -4.342,0.16 -9.592,0.306 -12.862,-0.851 -3.115,-1.103 -7.584,-6.545 -12.743,-10.779 -5.144,-4.18 -10.112,-8.162 -9.821,-13.924 0.092,-5.634 3.718,-8.076 9.405,-13.009 2.975,-2.609 8.126,-7.429 11.919,-9.514 3.416,-1.812 6.052,-1.192 9.688,-1.611 z"
+               id="path6374" />
+            <path
+               style="fill:#b77b00"
+               inkscape:connector-curvature="0"
+               d="m 165.615,79.417 c 5.075,-0.626 12.026,0.626 15.224,2.989 2.989,2.225 5.075,3.425 7.786,4.31 9.087,2.989 21.292,4.494 20.756,12.678 -0.606,9.781 -4.012,14.046 -12.126,16.581 -6.496,1.997 -18.289,12.41 -27.307,12.716 -4.376,0.191 -9.51,0.323 -12.758,-0.82 -3.09,-1.094 -7.546,-6.53 -12.671,-10.732 -5.106,-4.152 -10.074,-8.008 -9.697,-13.713 0.155,-5.479 3.67,-7.992 9.313,-12.889 2.951,-2.585 8.011,-7.461 11.783,-9.56 3.38,-1.814 6.083,-1.143 9.697,-1.56 z"
+               id="path6376" />
+            <path
+               style="fill:#bc8100"
+               inkscape:connector-curvature="0"
+               d="m 165.725,79.511 c 5.044,-0.622 11.954,0.622 15.133,2.972 2.971,2.211 5.045,3.408 7.739,4.284 9.029,2.971 21.205,4.487 20.675,12.619 -0.6,9.719 -4.079,13.939 -12.143,16.451 -6.45,1.982 -18.192,12.175 -27.153,12.532 -4.41,0.223 -9.428,0.341 -12.653,-0.789 -3.065,-1.084 -7.507,-6.514 -12.598,-10.684 -5.069,-4.124 -10.038,-7.855 -9.574,-13.504 0.217,-5.324 3.622,-7.908 9.222,-12.77 2.926,-2.559 7.894,-7.492 11.646,-9.605 3.344,-1.816 6.113,-1.092 9.706,-1.506 z"
+               id="path6378" />
+            <path
+               style="fill:#c18700"
+               inkscape:connector-curvature="0"
+               d="m 165.834,79.604 c 5.015,-0.618 11.883,0.619 15.043,2.954 2.953,2.198 5.015,3.391 7.693,4.259 8.972,2.953 21.118,4.48 20.594,12.559 -0.593,9.66 -4.147,13.833 -12.159,16.324 -6.405,1.967 -18.098,11.94 -27.002,12.347 -4.441,0.255 -9.343,0.359 -12.546,-0.757 -3.04,-1.074 -7.469,-6.498 -12.526,-10.637 -5.032,-4.096 -10,-7.701 -9.45,-13.293 0.278,-5.169 3.574,-7.823 9.13,-12.649 2.903,-2.534 7.776,-7.524 11.511,-9.651 3.306,-1.821 6.141,-1.044 9.712,-1.456 z"
+               id="path6380" />
+            <path
+               style="fill:#c68d00"
+               inkscape:connector-curvature="0"
+               d="m 165.944,79.697 c 4.984,-0.615 11.811,0.614 14.952,2.936 2.935,2.184 4.983,3.374 7.646,4.233 8.915,2.935 21.031,4.473 20.515,12.5 -0.586,9.597 -4.218,13.726 -12.177,16.195 -6.36,1.951 -18.002,11.703 -26.849,12.162 -4.476,0.287 -9.261,0.377 -12.441,-0.726 -3.015,-1.064 -7.431,-6.482 -12.453,-10.589 -4.995,-4.068 -9.965,-7.549 -9.326,-13.083 0.34,-5.015 3.524,-7.741 9.038,-12.531 2.878,-2.508 7.658,-7.555 11.374,-9.696 3.269,-1.82 6.171,-0.992 9.721,-1.401 z"
+               id="path6382" />
+            <path
+               style="fill:#cc9200"
+               inkscape:connector-curvature="0"
+               d="m 166.054,79.791 c 4.952,-0.61 11.738,0.611 14.86,2.918 2.918,2.172 4.954,3.357 7.601,4.207 8.857,2.918 20.942,4.466 20.432,12.442 -0.578,9.536 -4.285,13.62 -12.192,16.066 -6.314,1.936 -17.906,11.468 -26.696,11.978 -4.509,0.319 -9.178,0.394 -12.335,-0.696 -2.989,-1.054 -7.393,-6.466 -12.382,-10.541 -4.959,-4.04 -9.928,-7.395 -9.202,-12.873 0.401,-4.859 3.477,-7.655 8.945,-12.411 2.854,-2.482 7.542,-7.586 11.239,-9.741 3.233,-1.824 6.201,-0.943 9.73,-1.349 z"
+               id="path6384" />
+            <path
+               style="fill:#d19800"
+               inkscape:connector-curvature="0"
+               d="m 166.163,79.883 c 4.923,-0.606 11.668,0.608 14.771,2.901 2.9,2.158 4.924,3.339 7.554,4.181 8.801,2.9 20.855,4.459 20.352,12.383 -0.571,9.474 -4.353,13.512 -12.21,15.938 -6.269,1.921 -17.81,11.233 -26.543,11.793 -4.542,0.351 -9.094,0.413 -12.229,-0.664 -2.965,-1.044 -7.354,-6.45 -12.311,-10.494 -4.921,-4.012 -9.89,-7.241 -9.079,-12.662 0.465,-4.705 3.431,-7.571 8.855,-12.29 2.83,-2.458 7.425,-7.618 11.102,-9.787 3.197,-1.827 6.231,-0.893 9.738,-1.299 z"
+               id="path6386" />
+            <path
+               style="fill:#d69e00"
+               inkscape:connector-curvature="0"
+               d="m 166.273,79.978 c 4.893,-0.603 11.596,0.603 14.679,2.882 2.883,2.145 4.895,3.323 7.507,4.156 8.744,2.882 20.77,4.452 20.272,12.324 -0.565,9.412 -4.422,13.406 -12.228,15.81 -6.224,1.905 -17.714,10.996 -26.39,11.608 -4.576,0.383 -9.012,0.431 -12.124,-0.633 -2.94,-1.034 -7.316,-6.434 -12.237,-10.446 -4.884,-3.984 -9.854,-7.089 -8.955,-12.452 0.525,-4.551 3.382,-7.489 8.764,-12.171 2.805,-2.432 7.307,-7.649 10.965,-9.832 3.16,-1.829 6.261,-0.845 9.747,-1.246 z"
+               id="path6388" />
+            <path
+               style="fill:#dba300"
+               inkscape:connector-curvature="0"
+               d="m 166.382,80.07 c 4.863,-0.599 11.525,0.6 14.59,2.865 2.864,2.131 4.862,3.305 7.461,4.13 8.686,2.864 20.682,4.445 20.19,12.264 -0.559,9.352 -4.491,13.299 -12.244,15.681 -6.179,1.89 -17.619,10.761 -26.237,11.423 -4.608,0.415 -8.929,0.449 -12.018,-0.601 -2.915,-1.024 -7.277,-6.418 -12.166,-10.399 -4.847,-3.956 -9.815,-6.935 -8.831,-12.241 0.587,-4.396 3.333,-7.404 8.671,-12.051 2.782,-2.407 7.191,-7.681 10.83,-9.878 3.123,-1.829 6.29,-0.793 9.754,-1.193 z"
+               id="path6390" />
+            <path
+               style="fill:#e0a900"
+               inkscape:connector-curvature="0"
+               d="m 166.492,80.164 c 4.832,-0.595 11.453,0.596 14.498,2.847 2.847,2.118 4.833,3.289 7.414,4.104 8.629,2.846 20.595,4.438 20.111,12.205 -0.553,9.29 -4.56,13.193 -12.262,15.553 -6.134,1.875 -17.522,10.526 -26.085,11.239 -4.642,0.447 -8.845,0.467 -11.912,-0.57 -2.89,-1.015 -7.238,-6.402 -12.093,-10.351 -4.81,-3.928 -9.78,-6.782 -8.708,-12.032 0.649,-4.241 3.285,-7.32 8.58,-11.932 2.757,-2.381 7.073,-7.712 10.693,-9.923 3.088,-1.831 6.321,-0.743 9.764,-1.14 z"
+               id="path6392" />
+            <path
+               style="fill:#e5af00"
+               inkscape:connector-curvature="0"
+               d="m 166.601,80.257 c 4.803,-0.592 11.382,0.592 14.407,2.829 2.829,2.105 4.804,3.271 7.368,4.079 8.571,2.828 20.507,4.431 20.029,12.146 -0.544,9.228 -4.627,13.085 -12.277,15.423 -6.089,1.861 -17.427,10.29 -25.932,11.055 -4.676,0.478 -8.763,0.484 -11.807,-0.539 -2.865,-1.005 -7.2,-6.387 -12.021,-10.304 -4.772,-3.9 -9.742,-6.629 -8.583,-11.821 0.711,-4.085 3.236,-7.236 8.487,-11.812 2.732,-2.357 6.957,-7.744 10.557,-9.968 3.052,-1.834 6.351,-0.694 9.772,-1.088 z"
+               id="path6394" />
+            <path
+               style="fill:#eab500"
+               inkscape:connector-curvature="0"
+               d="m 166.711,80.351 c 4.772,-0.588 11.31,0.589 14.317,2.811 2.811,2.092 4.771,3.254 7.321,4.054 8.514,2.81 20.42,4.424 19.948,12.087 -0.538,9.165 -4.695,12.979 -12.294,15.295 -6.044,1.845 -17.332,10.054 -25.779,10.869 -4.708,0.511 -8.68,0.503 -11.7,-0.507 -2.84,-0.995 -7.163,-6.371 -11.949,-10.257 -4.736,-3.872 -9.706,-6.475 -8.46,-11.61 0.773,-3.931 3.188,-7.152 8.396,-11.692 2.709,-2.331 6.839,-7.775 10.421,-10.013 3.013,-1.839 6.38,-0.645 9.779,-1.037 z"
+               id="path6396" />
+            <path
+               style="fill:#efba00"
+               inkscape:connector-curvature="0"
+               d="m 166.82,80.443 c 4.742,-0.584 11.238,0.585 14.226,2.794 2.794,2.078 4.743,3.237 7.276,4.027 8.456,2.793 20.332,4.417 19.868,12.029 -0.531,9.104 -4.766,12.872 -12.313,15.167 -5.997,1.83 -17.234,9.819 -25.626,10.685 -4.742,0.542 -8.596,0.52 -11.595,-0.476 -2.815,-0.985 -7.124,-6.355 -11.877,-10.209 -4.699,-3.844 -9.668,-6.322 -8.336,-11.4 0.835,-3.778 3.14,-7.068 8.304,-11.573 2.686,-2.306 6.724,-7.807 10.285,-10.059 2.978,-1.84 6.411,-0.595 9.788,-0.985 z"
+               id="path6398" />
+            <path
+               style="fill:#f4c000"
+               inkscape:connector-curvature="0"
+               d="m 166.93,80.537 c 4.711,-0.58 11.166,0.582 14.135,2.776 2.775,2.066 4.713,3.22 7.229,4.002 8.399,2.775 20.246,4.41 19.787,11.969 -0.522,9.043 -4.832,12.765 -12.328,15.039 -5.952,1.815 -17.139,9.584 -25.473,10.501 -4.776,0.574 -8.513,0.538 -11.49,-0.445 -2.79,-0.976 -7.085,-6.34 -11.804,-10.162 -4.662,-3.816 -9.632,-6.168 -8.213,-11.189 0.896,-3.623 3.092,-6.984 8.213,-11.454 2.66,-2.281 6.604,-7.838 10.147,-10.104 2.942,-1.844 6.441,-0.547 9.797,-0.933 z"
+               id="path6400" />
+            <path
+               style="fill:#f9c600"
+               inkscape:connector-curvature="0"
+               d="m 167.039,80.63 c 4.683,-0.577 11.095,0.577 14.045,2.758 2.758,2.052 4.683,3.203 7.184,3.976 8.341,2.757 20.157,4.403 19.706,11.91 -0.518,8.981 -4.901,12.659 -12.346,14.911 -5.906,1.799 -17.044,9.347 -25.32,10.315 -4.809,0.606 -8.431,0.556 -11.384,-0.413 -2.765,-0.966 -7.048,-6.324 -11.732,-10.114 -4.625,-3.788 -9.594,-6.016 -8.088,-10.98 0.958,-3.467 3.043,-6.9 8.12,-11.333 2.637,-2.256 6.488,-7.87 10.013,-10.15 2.902,-1.844 6.468,-0.495 9.802,-0.88 z"
+               id="path6402" />
+          </g>
+          <path
+             style="fill:#ffcc00"
+             inkscape:connector-curvature="0"
+             d="m 167.149,80.724 c 4.65,-0.573 11.022,0.574 13.954,2.74 2.739,2.039 4.651,3.186 7.136,3.951 8.284,2.739 20.071,4.396 19.626,11.851 -0.51,8.919 -4.97,12.551 -12.362,14.781 -5.861,1.784 -16.947,9.112 -25.168,10.131 -4.842,0.638 -8.347,0.574 -11.277,-0.382 -2.74,-0.956 -7.01,-6.308 -11.66,-10.067 -4.588,-3.76 -9.559,-5.862 -7.965,-10.769 1.02,-3.313 2.995,-6.816 8.028,-11.213 2.612,-2.23 6.371,-7.901 9.876,-10.195 2.867,-1.847 6.499,-0.447 9.812,-0.828 z"
+             id="path6404" />
+          <g
+             id="g6406">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 167.982,83.609 c 1.008,2.088 3.6,2.376 5.328,3.312 1.655,0.936 2.592,1.152 3.239,0.792 1.44,-0.792 0.36,-3.384 -1.079,-4.32 -1.368,-0.935 -8.064,-1.151 -7.488,0.216 z"
+               id="path6408" />
+            <g
+               id="g6410">
+              <path
+                 style="fill:#f9c600"
+                 inkscape:connector-curvature="0"
+                 d="m 168.125,83.631 c 0.982,2.035 3.508,2.316 5.193,3.229 1.614,0.912 2.526,1.123 3.158,0.771 1.402,-0.771 0.35,-3.298 -1.054,-4.21 -1.332,-0.913 -7.859,-1.123 -7.297,0.21 z"
+                 id="path6412" />
+              <path
+                 style="fill:#f4c000"
+                 inkscape:connector-curvature="0"
+                 d="m 168.267,83.653 c 0.957,1.982 3.418,2.255 5.058,3.144 1.572,0.889 2.461,1.094 3.076,0.752 1.367,-0.752 0.342,-3.213 -1.025,-4.101 -1.299,-0.889 -7.656,-1.094 -7.109,0.205 z"
+                 id="path6414" />
+              <path
+                 style="fill:#efba00"
+                 inkscape:connector-curvature="0"
+                 d="m 168.409,83.674 c 0.932,1.929 3.327,2.195 4.924,3.06 1.53,0.865 2.395,1.064 2.993,0.732 1.331,-0.732 0.333,-3.127 -0.998,-3.992 -1.264,-0.864 -7.451,-1.064 -6.919,0.2 z"
+                 id="path6416" />
+              <path
+                 style="fill:#eab500"
+                 inkscape:connector-curvature="0"
+                 d="m 168.552,83.696 c 0.905,1.876 3.234,2.135 4.787,2.977 1.488,0.841 2.329,1.035 2.912,0.711 1.294,-0.711 0.323,-3.041 -0.971,-3.882 -1.228,-0.841 -7.246,-1.036 -6.728,0.194 z"
+                 id="path6418" />
+              <path
+                 style="fill:#e5af00"
+                 inkscape:connector-curvature="0"
+                 d="m 168.694,83.718 c 0.881,1.823 3.144,2.075 4.653,2.892 1.446,0.818 2.264,1.006 2.83,0.692 1.257,-0.692 0.313,-2.956 -0.943,-3.773 -1.195,-0.818 -7.043,-1.007 -6.54,0.189 z"
+                 id="path6420" />
+              <path
+                 style="fill:#e0a900"
+                 inkscape:connector-curvature="0"
+                 d="m 168.837,83.739 c 0.855,1.771 3.053,2.015 4.519,2.809 1.403,0.793 2.198,0.977 2.747,0.671 1.221,-0.671 0.306,-2.87 -0.916,-3.664 -1.161,-0.793 -6.839,-0.976 -6.35,0.184 z"
+                 id="path6422" />
+              <path
+                 style="fill:#dba300"
+                 inkscape:connector-curvature="0"
+                 d="m 168.979,83.761 c 0.829,1.718 2.962,1.955 4.383,2.725 1.363,0.77 2.132,0.948 2.666,0.651 1.184,-0.651 0.296,-2.784 -0.889,-3.554 -1.125,-0.77 -6.634,-0.948 -6.16,0.178 z"
+                 id="path6424" />
+              <path
+                 style="fill:#d69e00"
+                 inkscape:connector-curvature="0"
+                 d="m 169.121,83.782 c 0.804,1.665 2.871,1.895 4.249,2.641 1.32,0.747 2.066,0.918 2.583,0.631 1.148,-0.631 0.287,-2.698 -0.861,-3.444 -1.091,-0.746 -6.43,-0.919 -5.971,0.172 z"
+                 id="path6426" />
+              <path
+                 style="fill:#d19800"
+                 inkscape:connector-curvature="0"
+                 d="m 169.264,83.804 c 0.777,1.612 2.778,1.834 4.112,2.557 1.279,0.723 2.001,0.889 2.501,0.611 1.112,-0.611 0.278,-2.612 -0.834,-3.335 -1.055,-0.722 -6.224,-0.889 -5.779,0.167 z"
+                 id="path6428" />
+              <path
+                 style="fill:#cc9200"
+                 inkscape:connector-curvature="0"
+                 d="m 169.406,83.826 c 0.753,1.559 2.688,1.774 3.979,2.473 1.236,0.699 1.936,0.86 2.42,0.591 1.074,-0.591 0.269,-2.527 -0.808,-3.226 -1.021,-0.699 -6.021,-0.86 -5.591,0.162 z"
+                 id="path6430" />
+              <path
+                 style="fill:#c68c00"
+                 inkscape:connector-curvature="0"
+                 d="m 169.549,83.847 c 0.728,1.506 2.597,1.714 3.844,2.389 1.194,0.675 1.869,0.831 2.337,0.571 1.039,-0.571 0.26,-2.441 -0.779,-3.116 -0.988,-0.675 -5.818,-0.831 -5.402,0.156 z"
+                 id="path6432" />
+              <path
+                 style="fill:#c18700"
+                 inkscape:connector-curvature="0"
+                 d="m 169.691,83.869 c 0.702,1.453 2.506,1.654 3.709,2.305 1.152,0.652 1.803,0.802 2.254,0.551 1.002,-0.551 0.251,-2.355 -0.751,-3.006 -0.953,-0.652 -5.613,-0.802 -5.212,0.15 z"
+                 id="path6434" />
+              <path
+                 style="fill:#bc8100"
+                 inkscape:connector-curvature="0"
+                 d="m 169.833,83.89 c 0.677,1.4 2.415,1.594 3.574,2.221 1.111,0.628 1.738,0.772 2.173,0.531 0.965,-0.531 0.241,-2.27 -0.725,-2.897 -0.917,-0.627 -5.408,-0.772 -5.022,0.145 z"
+                 id="path6436" />
+              <path
+                 style="fill:#b77b00"
+                 inkscape:connector-curvature="0"
+                 d="m 169.976,83.912 c 0.65,1.347 2.322,1.533 3.438,2.137 1.069,0.604 1.673,0.743 2.091,0.511 0.93,-0.511 0.233,-2.184 -0.696,-2.788 -0.884,-0.603 -5.205,-0.743 -4.833,0.14 z"
+                 id="path6438" />
+              <path
+                 style="fill:#b27500"
+                 inkscape:connector-curvature="0"
+                 d="m 170.118,83.934 c 0.626,1.294 2.232,1.473 3.304,2.053 1.027,0.581 1.606,0.714 2.009,0.491 0.893,-0.491 0.224,-2.098 -0.669,-2.678 -0.85,-0.58 -5.001,-0.715 -4.644,0.134 z"
+                 id="path6440" />
+              <path
+                 style="fill:#ad7000"
+                 inkscape:connector-curvature="0"
+                 d="m 170.261,83.955 c 0.6,1.242 2.14,1.413 3.168,1.97 0.984,0.557 1.541,0.685 1.927,0.47 0.855,-0.47 0.214,-2.012 -0.644,-2.569 -0.812,-0.555 -4.794,-0.684 -4.451,0.129 z"
+                 id="path6442" />
+              <path
+                 style="fill:#a86a00"
+                 inkscape:connector-curvature="0"
+                 d="m 170.403,83.977 c 0.574,1.189 2.05,1.353 3.034,1.886 0.942,0.533 1.475,0.656 1.844,0.45 0.82,-0.45 0.205,-1.926 -0.615,-2.459 -0.779,-0.533 -4.591,-0.656 -4.263,0.123 z"
+                 id="path6444" />
+              <path
+                 style="fill:#a36400"
+                 inkscape:connector-curvature="0"
+                 d="m 170.545,83.998 c 0.55,1.136 1.959,1.292 2.899,1.802 0.901,0.509 1.41,0.626 1.762,0.43 0.783,-0.43 0.197,-1.841 -0.587,-2.35 -0.745,-0.508 -4.387,-0.626 -4.074,0.118 z"
+                 id="path6446" />
+              <path
+                 style="fill:#9e5e00"
+                 inkscape:connector-curvature="0"
+                 d="m 170.688,84.02 c 0.522,1.083 1.867,1.232 2.764,1.718 0.859,0.486 1.343,0.597 1.68,0.41 0.746,-0.41 0.188,-1.755 -0.561,-2.241 -0.709,-0.484 -4.182,-0.597 -3.883,0.113 z"
+                 id="path6448" />
+            </g>
+            <path
+               style="fill:#995900"
+               inkscape:connector-curvature="0"
+               d="m 170.83,84.042 c 0.498,1.03 1.776,1.172 2.629,1.634 0.817,0.462 1.278,0.568 1.599,0.39 0.71,-0.39 0.178,-1.669 -0.533,-2.131 -0.676,-0.461 -3.979,-0.568 -3.695,0.107 z"
+               id="path6450" />
+          </g>
+          <g
+             id="g6452">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 152.875,86.29 c -0.325,0.813 1.952,2.359 3.091,1.301 1.222,-1.057 2.686,-2.033 3.175,-2.359 2.195,-1.465 1.383,-2.522 -2.278,-1.871 -3.663,0.651 -3.663,2.115 -3.988,2.929 z"
+               id="path6454" />
+            <g
+               id="g6456">
+              <path
+                 style="fill:#f9c600"
+                 inkscape:connector-curvature="0"
+                 d="m 152.934,86.279 c -0.318,0.794 1.906,2.304 3.019,1.271 1.193,-1.033 2.623,-1.986 3.102,-2.305 2.145,-1.431 1.351,-2.463 -2.226,-1.828 -3.578,0.637 -3.578,2.067 -3.895,2.862 z"
+                 id="path6458" />
+              <path
+                 style="fill:#f4c000"
+                 inkscape:connector-curvature="0"
+                 d="m 152.993,86.269 c -0.31,0.775 1.861,2.25 2.948,1.241 1.164,-1.008 2.56,-1.939 3.026,-2.25 2.095,-1.397 1.319,-2.405 -2.173,-1.784 -3.491,0.62 -3.491,2.017 -3.801,2.793 z"
+                 id="path6460" />
+              <path
+                 style="fill:#efba00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.051,86.258 c -0.302,0.757 1.817,2.195 2.878,1.211 1.136,-0.984 2.497,-1.892 2.952,-2.195 2.044,-1.363 1.287,-2.347 -2.118,-1.741 -3.409,0.606 -3.409,1.968 -3.712,2.725 z"
+                 id="path6462" />
+              <path
+                 style="fill:#eab500"
+                 inkscape:connector-curvature="0"
+                 d="m 153.11,86.248 c -0.295,0.738 1.771,2.141 2.805,1.181 1.108,-0.959 2.437,-1.845 2.88,-2.141 1.993,-1.329 1.255,-2.289 -2.066,-1.698 -3.324,0.591 -3.324,1.92 -3.619,2.658 z"
+                 id="path6464" />
+              <path
+                 style="fill:#e5af00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.169,86.238 c -0.287,0.719 1.727,2.086 2.733,1.151 1.08,-0.935 2.374,-1.798 2.807,-2.086 1.942,-1.296 1.224,-2.23 -2.015,-1.655 -3.239,0.575 -3.238,1.87 -3.525,2.59 z"
+                 id="path6466" />
+              <path
+                 style="fill:#e0a900"
+                 inkscape:connector-curvature="0"
+                 d="m 153.228,86.228 c -0.28,0.7 1.681,2.032 2.661,1.121 1.052,-0.91 2.312,-1.751 2.732,-2.031 1.893,-1.262 1.191,-2.172 -1.961,-1.611 -3.152,0.559 -3.152,1.82 -3.432,2.521 z"
+                 id="path6468" />
+              <path
+                 style="fill:#dba300"
+                 inkscape:connector-curvature="0"
+                 d="m 153.286,86.217 c -0.271,0.681 1.636,1.977 2.591,1.09 1.023,-0.886 2.25,-1.704 2.659,-1.977 1.84,-1.228 1.159,-2.114 -1.909,-1.568 -3.068,0.547 -3.068,1.773 -3.341,2.455 z"
+                 id="path6470" />
+              <path
+                 style="fill:#d69e00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.345,86.207 c -0.265,0.662 1.591,1.922 2.519,1.061 0.995,-0.862 2.188,-1.657 2.586,-1.922 1.789,-1.194 1.127,-2.055 -1.855,-1.525 -2.985,0.53 -2.985,1.723 -3.25,2.386 z"
+                 id="path6472" />
+              <path
+                 style="fill:#d19800"
+                 inkscape:connector-curvature="0"
+                 d="m 153.404,86.197 c -0.257,0.643 1.546,1.868 2.447,1.03 0.967,-0.837 2.126,-1.61 2.512,-1.868 1.739,-1.16 1.095,-1.997 -1.803,-1.481 -2.899,0.516 -2.899,1.674 -3.156,2.319 z"
+                 id="path6474" />
+              <path
+                 style="fill:#cc9200"
+                 inkscape:connector-curvature="0"
+                 d="m 153.463,86.187 c -0.25,0.625 1.5,1.813 2.375,1 0.939,-0.813 2.064,-1.563 2.439,-1.813 1.688,-1.126 1.063,-1.938 -1.75,-1.438 -2.814,0.5 -2.814,1.625 -3.064,2.251 z"
+                 id="path6476" />
+              <path
+                 style="fill:#c68c00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.521,86.176 c -0.242,0.605 1.456,1.758 2.304,0.97 0.911,-0.788 2.002,-1.516 2.366,-1.758 1.637,-1.092 1.031,-1.88 -1.698,-1.395 -2.729,0.486 -2.729,1.576 -2.972,2.183 z"
+                 id="path6478" />
+              <path
+                 style="fill:#c18700"
+                 inkscape:connector-curvature="0"
+                 d="m 153.58,86.166 c -0.233,0.587 1.41,1.704 2.233,0.939 0.882,-0.763 1.938,-1.469 2.292,-1.704 1.586,-1.058 0.999,-1.822 -1.646,-1.352 -2.644,0.472 -2.644,1.529 -2.879,2.117 z"
+                 id="path6480" />
+              <path
+                 style="fill:#bc8100"
+                 inkscape:connector-curvature="0"
+                 d="m 153.639,86.156 c -0.228,0.568 1.364,1.649 2.16,0.91 0.854,-0.739 1.878,-1.422 2.219,-1.649 1.536,-1.024 0.967,-1.764 -1.593,-1.308 -2.56,0.456 -2.559,1.477 -2.786,2.047 z"
+                 id="path6482" />
+              <path
+                 style="fill:#b77b00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.698,86.146 c -0.22,0.549 1.32,1.594 2.089,0.879 0.825,-0.715 1.815,-1.375 2.146,-1.595 1.484,-0.99 0.935,-1.705 -1.54,-1.265 -2.475,0.44 -2.475,1.43 -2.695,1.981 z"
+                 id="path6484" />
+              <path
+                 style="fill:#b27500"
+                 inkscape:connector-curvature="0"
+                 d="m 153.756,86.135 c -0.211,0.53 1.275,1.54 2.019,0.85 0.797,-0.69 1.753,-1.328 2.072,-1.54 1.434,-0.957 0.902,-1.646 -1.487,-1.221 -2.389,0.425 -2.391,1.38 -2.604,1.911 z"
+                 id="path6486" />
+              <path
+                 style="fill:#ad7000"
+                 inkscape:connector-curvature="0"
+                 d="m 153.815,86.125 c -0.204,0.512 1.229,1.486 1.946,0.82 0.769,-0.666 1.69,-1.281 1.997,-1.486 1.385,-0.922 0.871,-1.588 -1.434,-1.178 -2.305,0.41 -2.304,1.331 -2.509,1.844 z"
+                 id="path6488" />
+              <path
+                 style="fill:#a86a00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.874,86.114 c -0.196,0.493 1.185,1.431 1.875,0.79 0.74,-0.642 1.628,-1.234 1.924,-1.431 1.332,-0.889 0.84,-1.53 -1.381,-1.135 -2.221,0.395 -2.221,1.283 -2.418,1.776 z"
+                 id="path6490" />
+              <path
+                 style="fill:#a36400"
+                 inkscape:connector-curvature="0"
+                 d="m 153.933,86.104 c -0.189,0.474 1.139,1.376 1.803,0.759 0.712,-0.617 1.566,-1.187 1.851,-1.376 1.281,-0.855 0.808,-1.472 -1.329,-1.092 -2.135,0.38 -2.135,1.234 -2.325,1.709 z"
+                 id="path6492" />
+              <path
+                 style="fill:#9e5e00"
+                 inkscape:connector-curvature="0"
+                 d="m 153.991,86.094 c -0.181,0.455 1.095,1.322 1.732,0.729 0.684,-0.592 1.504,-1.14 1.776,-1.321 1.231,-0.821 0.775,-1.414 -1.274,-1.048 -2.051,0.364 -2.051,1.184 -2.234,1.64 z"
+                 id="path6494" />
+            </g>
+            <path
+               style="fill:#995900"
+               inkscape:connector-curvature="0"
+               d="m 154.05,86.083 c -0.174,0.436 1.05,1.267 1.66,0.699 0.656,-0.568 1.442,-1.093 1.704,-1.267 1.181,-0.787 0.743,-1.355 -1.223,-1.005 -1.966,0.35 -1.966,1.136 -2.141,1.573 z"
+               id="path6496" />
+          </g>
+          <g
+             id="g6498">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 156.951,107.887 c -0.229,2.858 6.343,-4.286 6.743,-4.915 0.856,-1.543 3.715,-5.886 4.172,-7.715 0.857,-3.2 2.401,-5.543 1.429,-8.915 -0.343,-1.086 -2.742,-1.372 -3.829,-0.687 -3.086,1.829 -2.629,4.058 -2.972,6.115 -1.143,5.831 -5.143,11.717 -5.543,16.117 z"
+               id="path6500" />
+            <g
+               id="g6502">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 157.22,107.441 c -0.22,2.787 6.178,-4.188 6.566,-4.802 0.833,-1.506 3.614,-5.745 4.056,-7.529 0.831,-3.122 2.333,-5.408 1.382,-8.695 -0.337,-1.058 -2.678,-1.333 -3.735,-0.663 -3.006,1.788 -2.557,3.96 -2.889,5.967 -1.105,5.685 -4.997,11.431 -5.38,15.722 z"
+                 id="path6504" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 157.488,106.995 c -0.209,2.715 6.014,-4.091 6.392,-4.69 0.811,-1.469 3.513,-5.603 3.941,-7.342 0.804,-3.043 2.264,-5.273 1.331,-8.474 -0.329,-1.031 -2.61,-1.295 -3.64,-0.64 -2.927,1.747 -2.486,3.863 -2.806,5.818 -1.068,5.541 -4.851,11.146 -5.218,15.328 z"
+                 id="path6506" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 157.757,106.548 c -0.198,2.645 5.85,-3.993 6.217,-4.577 0.785,-1.431 3.409,-5.461 3.824,-7.156 0.779,-2.964 2.196,-5.138 1.282,-8.253 -0.322,-1.003 -2.543,-1.257 -3.545,-0.618 -2.847,1.706 -2.414,3.766 -2.722,5.67 -1.031,5.398 -4.706,10.862 -5.056,14.934 z"
+                 id="path6508" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 158.026,106.102 c -0.189,2.573 5.684,-3.896 6.04,-4.465 0.762,-1.394 3.309,-5.32 3.709,-6.969 0.753,-2.886 2.129,-5.004 1.233,-8.033 -0.315,-0.976 -2.478,-1.219 -3.45,-0.595 -2.768,1.665 -2.343,3.668 -2.64,5.522 -0.993,5.254 -4.558,10.577 -4.892,14.54 z"
+                 id="path6510" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 158.294,105.655 c -0.179,2.503 5.52,-3.798 5.865,-4.351 0.738,-1.357 3.207,-5.179 3.594,-6.783 0.727,-2.807 2.061,-4.869 1.185,-7.813 -0.309,-0.948 -2.411,-1.18 -3.356,-0.572 -2.687,1.623 -2.271,3.571 -2.556,5.374 -0.958,5.11 -4.414,10.291 -4.732,14.145 z"
+                 id="path6512" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 158.563,105.209 c -0.169,2.431 5.354,-3.701 5.688,-4.239 0.715,-1.319 3.106,-5.037 3.479,-6.596 0.7,-2.728 1.992,-4.734 1.135,-7.592 -0.301,-0.92 -2.344,-1.142 -3.261,-0.549 -2.608,1.583 -2.199,3.474 -2.473,5.226 -0.919,4.965 -4.267,10.005 -4.568,13.75 z"
+                 id="path6514" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 158.831,104.762 c -0.159,2.361 5.19,-3.602 5.515,-4.126 0.69,-1.282 3.004,-4.896 3.361,-6.409 0.674,-2.649 1.924,-4.599 1.087,-7.372 -0.295,-0.893 -2.277,-1.104 -3.167,-0.526 -2.527,1.541 -2.128,3.376 -2.389,5.077 -0.883,4.822 -4.122,9.721 -4.407,13.356 z"
+                 id="path6516" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 159.1,104.316 c -0.149,2.289 5.024,-3.505 5.338,-4.014 0.667,-1.244 2.901,-4.754 3.247,-6.223 0.646,-2.571 1.854,-4.464 1.037,-7.151 -0.287,-0.865 -2.211,-1.065 -3.072,-0.504 -2.448,1.5 -2.056,3.279 -2.306,4.929 -0.845,4.679 -3.976,9.437 -4.244,12.963 z"
+                 id="path6518" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 159.369,103.869 c -0.139,2.219 4.86,-3.407 5.162,-3.9 0.643,-1.208 2.801,-4.613 3.131,-6.037 0.622,-2.492 1.787,-4.329 0.988,-6.93 -0.28,-0.838 -2.146,-1.027 -2.978,-0.481 -2.368,1.459 -1.983,3.182 -2.223,4.781 -0.807,4.533 -3.829,9.151 -4.08,12.567 z"
+                 id="path6520" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 159.637,103.423 c -0.13,2.147 4.695,-3.31 4.986,-3.788 0.62,-1.17 2.699,-4.471 3.016,-5.85 0.596,-2.414 1.719,-4.195 0.939,-6.71 -0.273,-0.81 -2.079,-0.989 -2.883,-0.458 -2.289,1.418 -1.913,3.084 -2.139,4.632 -0.77,4.391 -3.684,8.866 -3.919,12.174 z"
+                 id="path6522" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 159.906,102.977 c -0.119,2.076 4.531,-3.213 4.811,-3.676 0.597,-1.133 2.599,-4.33 2.899,-5.664 0.57,-2.335 1.651,-4.06 0.891,-6.49 -0.267,-0.782 -2.012,-0.95 -2.787,-0.435 -2.21,1.377 -1.842,2.987 -2.057,4.484 -0.734,4.247 -3.539,8.582 -3.757,11.781 z"
+                 id="path6524" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 160.174,102.53 c -0.108,2.005 4.366,-3.115 4.637,-3.563 0.571,-1.096 2.496,-4.189 2.784,-5.478 0.543,-2.256 1.581,-3.925 0.841,-6.269 -0.26,-0.754 -1.945,-0.912 -2.693,-0.412 -2.129,1.336 -1.77,2.889 -1.973,4.336 -0.697,4.103 -3.394,8.297 -3.596,11.386 z"
+                 id="path6526" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 160.443,102.084 c -0.099,1.934 4.201,-3.018 4.46,-3.45 0.548,-1.059 2.394,-4.047 2.668,-5.291 0.517,-2.178 1.514,-3.79 0.793,-6.049 -0.253,-0.727 -1.879,-0.874 -2.599,-0.39 -2.051,1.295 -1.698,2.792 -1.891,4.188 -0.658,3.959 -3.246,8.012 -3.431,10.992 z"
+                 id="path6528" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 160.712,101.637 c -0.089,1.863 4.036,-2.919 4.283,-3.337 0.526,-1.021 2.294,-3.905 2.553,-5.104 0.491,-2.099 1.447,-3.655 0.744,-5.828 -0.246,-0.699 -1.813,-0.835 -2.505,-0.367 -1.969,1.253 -1.625,2.694 -1.805,4.04 -0.623,3.814 -3.101,7.726 -3.27,10.596 z"
+                 id="path6530" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 160.98,101.191 c -0.079,1.792 3.872,-2.822 4.107,-3.225 0.502,-0.984 2.192,-3.764 2.438,-4.918 0.464,-2.02 1.378,-3.52 0.694,-5.607 -0.238,-0.672 -1.746,-0.797 -2.41,-0.344 -1.89,1.212 -1.555,2.597 -1.723,3.891 -0.583,3.671 -2.953,7.442 -3.106,10.203 z"
+                 id="path6532" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 161.249,100.744 c -0.068,1.721 3.707,-2.724 3.933,-3.112 0.478,-0.947 2.091,-3.623 2.321,-4.731 0.439,-1.942 1.311,-3.386 0.646,-5.387 -0.232,-0.645 -1.68,-0.758 -2.316,-0.321 -1.81,1.171 -1.481,2.5 -1.639,3.743 -0.548,3.527 -2.809,7.156 -2.945,9.808 z"
+                 id="path6534" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 161.517,100.298 c -0.06,1.65 3.543,-2.627 3.757,-2.999 0.454,-0.91 1.989,-3.481 2.206,-4.545 0.413,-1.863 1.242,-3.25 0.597,-5.167 -0.225,-0.617 -1.613,-0.72 -2.221,-0.298 -1.73,1.13 -1.411,2.402 -1.557,3.595 -0.509,3.383 -2.662,6.871 -2.782,9.414 z"
+                 id="path6536" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 161.786,99.852 c -0.049,1.579 3.377,-2.529 3.581,-2.887 0.431,-0.872 1.887,-3.34 2.091,-4.359 0.387,-1.784 1.173,-3.116 0.547,-4.946 -0.217,-0.589 -1.546,-0.682 -2.126,-0.275 -1.649,1.089 -1.339,2.305 -1.472,3.446 -0.474,3.24 -2.518,6.587 -2.621,9.021 z"
+                 id="path6538" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 162.055,99.405 c -0.039,1.508 3.212,-2.432 3.404,-2.773 0.407,-0.835 1.786,-3.199 1.976,-4.172 0.359,-1.706 1.104,-2.981 0.499,-4.726 -0.211,-0.562 -1.481,-0.644 -2.032,-0.253 -1.571,1.048 -1.268,2.208 -1.389,3.298 -0.436,3.096 -2.372,6.302 -2.458,8.626 z"
+                 id="path6540" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 162.323,98.958 c -0.029,1.437 3.048,-2.334 3.23,-2.661 0.383,-0.798 1.684,-3.057 1.858,-3.986 0.334,-1.627 1.037,-2.846 0.45,-4.505 -0.204,-0.534 -1.414,-0.605 -1.938,-0.23 -1.49,1.007 -1.195,2.11 -1.306,3.15 -0.397,2.953 -2.224,6.018 -2.294,8.232 z"
+               id="path6542" />
+          </g>
+          <g
+             id="g6544">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 179.646,95.994 c -3.168,3.456 -5.4,6.767 -7.2,9 -1.872,2.304 -6.48,5.04 -4.176,7.704 1.943,2.376 9.936,-1.944 16.128,-6.552 6.12,-4.608 15.696,-8.711 11.016,-13.967 -2.448,-2.664 -8.208,-2.088 -10.439,-0.648 -1.729,1.078 -2.737,1.655 -5.329,4.463 z"
+               id="path6546" />
+            <g
+               id="g6548">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 179.782,96.147 c -3.118,3.378 -5.313,6.628 -7.086,8.809 -1.841,2.249 -6.375,4.945 -4.13,7.534 1.893,2.31 9.724,-1.943 15.795,-6.469 6.001,-4.525 15.38,-8.574 10.82,-13.682 -2.387,-2.588 -8.022,-1.998 -10.209,-0.584 -1.692,1.062 -2.665,1.67 -5.19,4.392 z"
+                 id="path6550" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 179.919,96.3 c -3.068,3.3 -5.227,6.488 -6.973,8.619 -1.81,2.193 -6.271,4.85 -4.085,7.364 1.843,2.243 9.513,-1.943 15.463,-6.386 5.882,-4.442 15.064,-8.437 10.623,-13.396 -2.323,-2.513 -7.835,-1.907 -9.978,-0.52 -1.655,1.044 -2.593,1.684 -5.05,4.319 z"
+                 id="path6552" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 180.055,96.454 c -3.02,3.222 -5.14,6.347 -6.859,8.428 -1.78,2.138 -6.166,4.754 -4.04,7.194 1.793,2.177 9.302,-1.942 15.131,-6.303 5.762,-4.359 14.748,-8.299 10.427,-13.11 -2.261,-2.437 -7.648,-1.817 -9.747,-0.456 -1.619,1.025 -2.522,1.698 -4.912,4.247 z"
+                 id="path6554" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 180.191,96.607 c -2.97,3.143 -5.052,6.207 -6.745,8.237 -1.749,2.082 -6.063,4.659 -3.994,7.023 1.743,2.111 9.09,-1.941 14.798,-6.219 5.644,-4.276 14.433,-8.162 10.231,-12.824 -2.199,-2.361 -7.463,-1.727 -9.518,-0.392 -1.581,1.008 -2.45,1.713 -4.772,4.175 z"
+                 id="path6556" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 180.327,96.761 c -2.92,3.065 -4.965,6.066 -6.631,8.047 -1.718,2.027 -5.957,4.564 -3.949,6.853 1.693,2.044 8.878,-1.94 14.466,-6.136 5.524,-4.194 14.116,-8.024 10.034,-12.538 -2.137,-2.286 -7.275,-1.636 -9.285,-0.328 -1.546,0.988 -2.38,1.726 -4.635,4.102 z"
+                 id="path6558" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 180.464,96.914 c -2.871,2.987 -4.879,5.926 -6.518,7.857 -1.688,1.971 -5.854,4.468 -3.903,6.683 1.643,1.978 8.666,-1.94 14.133,-6.053 5.404,-4.111 13.801,-7.887 9.839,-12.251 -2.075,-2.21 -7.091,-1.546 -9.056,-0.264 -1.509,0.969 -2.308,1.738 -4.495,4.028 z"
+                 id="path6560" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 180.6,97.067 c -2.821,2.909 -4.792,5.786 -6.404,7.667 -1.657,1.916 -5.748,4.373 -3.858,6.512 1.593,1.912 8.455,-1.938 13.802,-5.969 5.284,-4.028 13.484,-7.75 9.641,-11.966 -2.012,-2.134 -6.902,-1.456 -8.823,-0.199 -1.474,0.951 -2.238,1.752 -4.358,3.955 z"
+                 id="path6562" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 180.736,97.221 c -2.771,2.83 -4.705,5.645 -6.29,7.476 -1.626,1.86 -5.644,4.278 -3.813,6.342 1.542,1.845 8.244,-1.938 13.47,-5.886 5.166,-3.945 13.169,-7.612 9.444,-11.68 -1.949,-2.059 -6.716,-1.365 -8.592,-0.135 -1.437,0.933 -2.166,1.766 -4.219,3.883 z"
+                 id="path6564" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 180.872,97.375 c -2.722,2.752 -4.617,5.504 -6.176,7.286 -1.595,1.805 -5.539,4.182 -3.767,6.172 1.49,1.779 8.031,-1.937 13.136,-5.803 5.046,-3.862 12.853,-7.475 9.249,-11.394 -1.889,-1.983 -6.53,-1.274 -8.362,-0.071 -1.4,0.914 -2.095,1.779 -4.08,3.81 z"
+                 id="path6566" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 181.009,97.528 c -2.673,2.674 -4.53,5.364 -6.063,7.095 -1.564,1.749 -5.435,4.087 -3.722,6.001 1.44,1.713 7.82,-1.936 12.804,-5.719 4.927,-3.78 12.537,-7.338 9.052,-11.108 -1.825,-1.907 -6.343,-1.185 -8.13,-0.007 -1.364,0.896 -2.024,1.793 -3.941,3.738 z"
+                 id="path6568" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 181.145,97.682 c -2.623,2.595 -4.444,5.225 -5.949,6.904 -1.534,1.693 -5.33,3.992 -3.676,5.831 1.39,1.646 7.608,-1.935 12.471,-5.636 4.808,-3.697 12.221,-7.2 8.856,-10.822 -1.764,-1.832 -6.157,-1.094 -7.9,0.057 -1.327,0.878 -1.952,1.807 -3.802,3.666 z"
+                 id="path6570" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 181.281,97.835 c -2.573,2.517 -4.357,5.084 -5.835,6.714 -1.503,1.638 -5.226,3.896 -3.631,5.661 1.34,1.58 7.396,-1.935 12.139,-5.553 4.689,-3.614 11.905,-7.063 8.659,-10.536 -1.701,-1.756 -5.97,-1.004 -7.668,0.121 -1.291,0.86 -1.881,1.821 -3.664,3.593 z"
+                 id="path6572" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 181.417,97.988 c -2.522,2.439 -4.27,4.944 -5.721,6.524 -1.472,1.582 -5.121,3.801 -3.586,5.491 1.29,1.513 7.186,-1.934 11.807,-5.47 4.569,-3.531 11.589,-6.926 8.463,-10.25 -1.639,-1.68 -5.783,-0.914 -7.438,0.186 -1.254,0.84 -1.809,1.834 -3.525,3.519 z"
+                 id="path6574" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 181.554,98.142 c -2.476,2.361 -4.185,4.803 -5.608,6.333 -1.441,1.527 -5.017,3.706 -3.54,5.32 1.24,1.447 6.974,-1.933 11.474,-5.386 4.45,-3.448 11.273,-6.788 8.268,-9.964 -1.577,-1.605 -5.599,-0.823 -7.207,0.25 -1.22,0.822 -1.74,1.848 -3.387,3.447 z"
+                 id="path6576" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 181.69,98.295 c -2.425,2.283 -4.098,4.663 -5.494,6.143 -1.411,1.471 -4.912,3.61 -3.495,5.15 1.19,1.381 6.763,-1.932 11.142,-5.303 4.331,-3.366 10.957,-6.65 8.07,-9.679 -1.514,-1.529 -5.411,-0.732 -6.976,0.313 -1.182,0.805 -1.667,1.863 -3.247,3.376 z"
+                 id="path6578" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 181.826,98.449 c -2.375,2.204 -4.009,4.522 -5.38,5.952 -1.38,1.416 -4.808,3.515 -3.449,4.98 1.14,1.314 6.551,-1.932 10.81,-5.22 4.211,-3.283 10.641,-6.513 7.874,-9.393 -1.452,-1.454 -5.226,-0.642 -6.745,0.378 -1.147,0.786 -1.597,1.876 -3.11,3.303 z"
+                 id="path6580" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 181.962,98.602 c -2.324,2.127 -3.922,4.382 -5.266,5.762 -1.349,1.36 -4.703,3.42 -3.404,4.809 1.089,1.248 6.34,-1.93 10.478,-5.136 4.092,-3.2 10.325,-6.376 7.677,-9.106 -1.389,-1.378 -5.038,-0.552 -6.513,0.441 -1.111,0.768 -1.526,1.89 -2.972,3.23 z"
+                 id="path6582" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 182.099,98.756 c -2.276,2.048 -3.836,4.241 -5.153,5.571 -1.318,1.305 -4.599,3.324 -3.359,4.639 1.039,1.182 6.128,-1.93 10.146,-5.053 3.973,-3.117 10.009,-6.238 7.48,-8.82 -1.328,-1.303 -4.852,-0.462 -6.282,0.506 -1.074,0.748 -1.454,1.903 -2.832,3.157 z"
+                 id="path6584" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 182.235,98.909 c -2.228,1.97 -3.749,4.101 -5.039,5.381 -1.288,1.249 -4.494,3.229 -3.313,4.469 0.988,1.115 5.916,-1.929 9.813,-4.97 3.853,-3.034 9.693,-6.101 7.285,-8.535 -1.267,-1.227 -4.666,-0.371 -6.052,0.57 -1.038,0.731 -1.384,1.918 -2.694,3.085 z"
+                 id="path6586" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 182.371,99.063 c -2.177,1.892 -3.662,3.96 -4.925,5.19 -1.257,1.193 -4.39,3.133 -3.268,4.298 0.938,1.049 5.704,-1.928 9.479,-4.886 3.734,-2.952 9.377,-5.963 7.088,-8.249 -1.203,-1.151 -4.479,-0.281 -5.821,0.634 -0.999,0.713 -1.31,1.931 -2.553,3.013 z"
+               id="path6588" />
+          </g>
+          <g
+             id="g6590">
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 186.414,168.569 c 0.864,-2.808 28.872,-9.432 33.48,-7.272 4.536,2.16 26.279,33.768 22.392,35.496 -3.888,1.657 -12.24,-10.512 -24.408,-16.128 -12.168,-5.616 -32.328,-9.216 -31.464,-12.096 z"
+               id="path6592" />
+            <g
+               id="g6594">
+              <path
+                 style="fill:#f9f9f9"
+                 inkscape:connector-curvature="0"
+                 d="m 187.239,168.626 c 0.848,-2.761 28.145,-9.076 32.69,-6.997 4.476,2.079 25.768,32.897 21.943,34.591 -3.824,1.625 -11.965,-10.346 -23.94,-15.874 -11.976,-5.527 -31.541,-8.89 -30.693,-11.72 z"
+                 id="path6596" />
+              <path
+                 style="fill:#f4f4f4"
+                 inkscape:connector-curvature="0"
+                 d="m 188.063,168.683 c 0.832,-2.714 27.418,-8.72 31.899,-6.722 4.417,1.998 25.259,32.026 21.497,33.685 -3.76,1.595 -11.689,-10.18 -23.474,-15.619 -11.782,-5.438 -30.754,-8.565 -29.922,-11.344 z"
+                 id="path6598" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 188.888,168.74 c 0.814,-2.668 26.69,-8.364 31.109,-6.447 4.357,1.917 24.746,31.155 21.049,32.779 -3.695,1.563 -11.416,-10.014 -23.007,-15.364 -11.59,-5.349 -29.967,-8.239 -29.151,-10.968 z"
+                 id="path6600" />
+              <path
+                 style="fill:#eaeaea"
+                 inkscape:connector-curvature="0"
+                 d="m 189.712,168.797 c 0.801,-2.621 25.964,-8.009 30.32,-6.173 4.299,1.837 24.235,30.285 20.603,31.874 -3.633,1.532 -11.142,-9.847 -22.54,-15.109 -11.4,-5.261 -29.182,-7.914 -28.383,-10.592 z"
+                 id="path6602" />
+              <path
+                 style="fill:#e5e5e5"
+                 inkscape:connector-curvature="0"
+                 d="m 190.537,168.853 c 0.783,-2.573 25.236,-7.652 29.53,-5.897 4.239,1.756 23.723,29.414 20.155,30.968 -3.569,1.501 -10.867,-9.681 -22.074,-14.854 -11.206,-5.172 -28.395,-7.589 -27.611,-10.217 z"
+                 id="path6604" />
+              <path
+                 style="fill:#e0e0e0"
+                 inkscape:connector-curvature="0"
+                 d="m 191.361,168.91 c 0.768,-2.527 24.51,-7.296 28.74,-5.622 4.18,1.675 23.212,28.543 19.708,30.063 -3.505,1.469 -10.593,-9.516 -21.607,-14.6 -11.014,-5.083 -27.608,-7.263 -26.841,-9.841 z"
+                 id="path6606" />
+              <path
+                 style="fill:#dbdbdb"
+                 inkscape:connector-curvature="0"
+                 d="m 192.186,168.967 c 0.751,-2.48 23.781,-6.941 27.95,-5.347 4.119,1.593 22.7,27.671 19.26,29.157 -3.441,1.438 -10.318,-9.349 -21.141,-14.345 -10.821,-4.994 -26.821,-6.938 -26.069,-9.465 z"
+                 id="path6608" />
+              <path
+                 style="fill:#d6d6d6"
+                 inkscape:connector-curvature="0"
+                 d="m 193.01,169.024 c 0.735,-2.433 23.057,-6.585 27.16,-5.073 4.062,1.513 22.19,26.801 18.813,28.252 -3.377,1.407 -10.043,-9.183 -20.673,-14.09 -10.629,-4.906 -26.035,-6.612 -25.3,-9.089 z"
+                 id="path6610" />
+              <path
+                 style="fill:#d1d1d1"
+                 inkscape:connector-curvature="0"
+                 d="m 193.835,169.081 c 0.72,-2.387 22.328,-6.229 26.37,-4.798 4.001,1.432 21.678,25.93 18.365,27.346 -3.313,1.376 -9.768,-9.017 -20.206,-13.835 -10.437,-4.817 -25.248,-6.287 -24.529,-8.713 z"
+                 id="path6612" />
+              <path
+                 style="fill:#cccccc"
+                 inkscape:connector-curvature="0"
+                 d="m 194.659,169.137 c 0.703,-2.339 21.603,-5.873 25.58,-4.521 3.942,1.351 21.167,25.059 17.918,26.44 -3.249,1.345 -9.493,-8.851 -19.739,-13.58 -10.245,-4.729 -24.462,-5.963 -23.759,-8.339 z"
+                 id="path6614" />
+              <path
+                 style="fill:#c6c6c6"
+                 inkscape:connector-curvature="0"
+                 d="m 195.484,169.194 c 0.687,-2.292 20.874,-5.517 24.79,-4.247 3.882,1.27 20.655,24.188 17.47,25.535 -3.185,1.314 -9.219,-8.685 -19.271,-13.326 -10.054,-4.639 -23.676,-5.636 -22.989,-7.962 z"
+                 id="path6616" />
+              <path
+                 style="fill:#c1c1c1"
+                 inkscape:connector-curvature="0"
+                 d="m 196.308,169.251 c 0.671,-2.246 20.147,-5.161 24,-3.973 3.822,1.19 20.145,23.318 17.022,24.63 -3.121,1.283 -8.943,-8.519 -18.805,-13.071 -9.859,-4.551 -22.888,-5.311 -22.217,-7.586 z"
+                 id="path6618" />
+              <path
+                 style="fill:#bcbcbc"
+                 inkscape:connector-curvature="0"
+                 d="m 197.133,169.308 c 0.654,-2.199 19.421,-4.805 23.21,-3.698 3.764,1.109 19.634,22.447 16.575,23.724 -3.057,1.252 -8.669,-8.353 -18.338,-12.816 -9.668,-4.462 -22.102,-4.985 -21.447,-7.21 z"
+                 id="path6620" />
+              <path
+                 style="fill:#b7b7b7"
+                 inkscape:connector-curvature="0"
+                 d="m 197.957,169.365 c 0.64,-2.152 18.693,-4.45 22.42,-3.423 3.705,1.027 19.122,21.575 16.129,22.818 -2.993,1.221 -8.395,-8.186 -17.872,-12.561 -9.476,-4.373 -21.315,-4.66 -20.677,-6.834 z"
+                 id="path6622" />
+              <path
+                 style="fill:#b2b2b2"
+                 inkscape:connector-curvature="0"
+                 d="m 198.782,169.421 c 0.622,-2.105 17.966,-4.093 21.63,-3.147 3.646,0.946 18.61,20.704 15.681,21.912 -2.93,1.19 -8.12,-8.02 -17.404,-12.306 -9.284,-4.284 -20.53,-4.335 -19.907,-6.459 z"
+                 id="path6624" />
+              <path
+                 style="fill:#adadad"
+                 inkscape:connector-curvature="0"
+                 d="m 199.606,169.478 c 0.606,-2.058 17.239,-3.737 20.84,-2.873 3.586,0.866 18.099,19.834 15.234,21.008 -2.866,1.158 -7.847,-7.855 -16.938,-12.052 -9.091,-4.196 -19.742,-4.009 -19.136,-6.083 z"
+                 id="path6626" />
+              <path
+                 style="fill:#a8a8a8"
+                 inkscape:connector-curvature="0"
+                 d="m 200.431,169.535 c 0.59,-2.011 16.512,-3.382 20.05,-2.598 3.525,0.785 17.588,18.963 14.786,20.102 -2.803,1.127 -7.571,-7.688 -16.472,-11.797 -8.898,-4.107 -18.955,-3.684 -18.364,-5.707 z"
+                 id="path6628" />
+              <path
+                 style="fill:#a3a3a3"
+                 inkscape:connector-curvature="0"
+                 d="m 201.255,169.592 c 0.574,-1.965 15.785,-3.026 19.261,-2.323 3.467,0.704 17.076,18.092 14.339,19.196 -2.738,1.096 -7.296,-7.522 -16.004,-11.542 -8.707,-4.018 -18.17,-3.358 -17.596,-5.331 z"
+                 id="path6630" />
+              <path
+                 style="fill:#9e9e9e"
+                 inkscape:connector-curvature="0"
+                 d="m 202.08,169.649 c 0.559,-1.918 15.059,-2.67 18.47,-2.048 3.407,0.623 16.565,17.221 13.892,18.29 -2.674,1.065 -7.022,-7.356 -15.537,-11.287 -8.515,-3.929 -17.383,-3.033 -16.825,-4.955 z"
+                 id="path6632" />
+            </g>
+            <path
+               style="fill:#999999"
+               inkscape:connector-curvature="0"
+               d="m 202.904,169.705 c 0.542,-1.871 14.331,-2.314 17.68,-1.773 3.349,0.542 16.055,16.35 13.444,17.385 -2.61,1.034 -6.747,-7.19 -15.07,-11.032 -8.322,-3.841 -16.596,-2.708 -16.054,-4.58 z"
+               id="path6634" />
+          </g>
+          <g
+             id="g6636">
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 151.134,211.625 c 2.881,0.144 0.145,16.271 0.145,32.903 0,16.632 2.231,22.464 0.144,24.552 -2.087,2.088 -5.688,-5.399 -5.688,-22.031 -0.001,-16.632 2.519,-35.568 5.399,-35.424 z"
+               id="path6638" />
+            <g
+               id="g6640">
+              <path
+                 style="fill:#f9f9f9"
+                 inkscape:connector-curvature="0"
+                 d="m 151.105,212.016 c 2.783,0.162 0.109,16.052 0.097,32.419 -0.012,16.366 2.188,22.208 0.164,24.237 -2.02,2.029 -5.561,-5.383 -5.546,-21.752 0.012,-16.367 2.502,-35.065 5.285,-34.904 z"
+                 id="path6642" />
+              <path
+                 style="fill:#f4f4f4"
+                 inkscape:connector-curvature="0"
+                 d="m 151.075,212.407 c 2.687,0.18 0.076,15.832 0.051,31.934 -0.023,16.102 2.143,21.951 0.185,23.924 -1.953,1.968 -5.435,-5.367 -5.405,-21.473 0.024,-16.103 2.484,-34.564 5.169,-34.385 z"
+                 id="path6644" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 151.046,212.797 c 2.588,0.197 0.041,15.613 0.004,31.449 -0.036,15.836 2.098,21.694 0.204,23.609 -1.886,1.907 -5.308,-5.352 -5.263,-21.195 0.037,-15.835 2.467,-34.058 5.055,-33.863 z"
+                 id="path6646" />
+              <path
+                 style="fill:#eaeaea"
+                 inkscape:connector-curvature="0"
+                 d="m 151.017,213.189 c 2.49,0.214 0.007,15.392 -0.043,30.962 -0.05,15.571 2.052,21.439 0.224,23.297 -1.818,1.848 -5.181,-5.334 -5.122,-20.916 0.049,-15.571 2.45,-33.557 4.941,-33.343 z"
+                 id="path6648" />
+              <path
+                 style="fill:#e5e5e5"
+                 inkscape:connector-curvature="0"
+                 d="m 150.987,213.581 c 2.394,0.23 -0.027,15.17 -0.089,30.477 -0.062,15.307 2.007,21.182 0.244,22.982 -1.751,1.787 -5.055,-5.32 -4.98,-20.638 0.061,-15.305 2.431,-33.053 4.825,-32.821 z"
+                 id="path6650" />
+              <path
+                 style="fill:#e0e0e0"
+                 inkscape:connector-curvature="0"
+                 d="m 150.958,213.971 c 2.297,0.248 -0.062,14.951 -0.136,29.99 -0.074,15.041 1.962,20.927 0.264,22.668 -1.683,1.728 -4.928,-5.301 -4.839,-20.356 0.074,-15.04 2.414,-32.551 4.711,-32.302 z"
+                 id="path6652" />
+              <path
+                 style="fill:#dbdbdb"
+                 inkscape:connector-curvature="0"
+                 d="m 150.928,214.362 c 2.199,0.266 -0.096,14.73 -0.182,29.506 -0.087,14.775 1.915,20.67 0.282,22.354 -1.615,1.667 -4.8,-5.286 -4.696,-20.078 0.087,-14.776 2.397,-32.048 4.596,-31.782 z"
+                 id="path6654" />
+              <path
+                 style="fill:#d6d6d6"
+                 inkscape:connector-curvature="0"
+                 d="m 150.899,214.752 c 2.102,0.283 -0.13,14.511 -0.229,29.021 -0.099,14.511 1.87,20.413 0.303,22.04 -1.549,1.607 -4.674,-5.27 -4.556,-19.799 0.1,-14.51 2.38,-31.545 4.482,-31.262 z"
+                 id="path6656" />
+              <path
+                 style="fill:#d1d1d1"
+                 inkscape:connector-curvature="0"
+                 d="m 150.87,215.144 c 2.005,0.301 -0.165,14.29 -0.274,28.535 -0.112,14.245 1.824,20.155 0.321,21.725 -1.479,1.548 -4.547,-5.252 -4.413,-19.519 0.11,-14.245 2.361,-31.043 4.366,-30.741 z"
+                 id="path6658" />
+              <path
+                 style="fill:#cccccc"
+                 inkscape:connector-curvature="0"
+                 d="m 150.84,215.536 c 1.908,0.317 -0.197,14.069 -0.32,28.049 -0.124,13.979 1.779,19.899 0.342,21.412 -1.413,1.486 -4.42,-5.238 -4.272,-19.242 0.122,-13.979 2.343,-30.54 4.25,-30.219 z"
+                 id="path6660" />
+              <path
+                 style="fill:#c6c6c6"
+                 inkscape:connector-curvature="0"
+                 d="m 150.811,215.926 c 1.811,0.334 -0.233,13.85 -0.368,27.564 -0.136,13.713 1.735,19.643 0.362,21.096 -1.346,1.428 -4.293,-5.219 -4.131,-18.961 0.136,-13.712 2.327,-30.035 4.137,-29.699 z"
+                 id="path6662" />
+              <path
+                 style="fill:#c1c1c1"
+                 inkscape:connector-curvature="0"
+                 d="m 150.781,216.317 c 1.714,0.354 -0.267,13.629 -0.414,27.078 -0.147,13.449 1.69,19.387 0.382,20.783 -1.277,1.367 -4.166,-5.203 -3.989,-18.682 0.148,-13.449 2.308,-29.533 4.021,-29.179 z"
+                 id="path6664" />
+              <path
+                 style="fill:#bcbcbc"
+                 inkscape:connector-curvature="0"
+                 d="m 150.752,216.708 c 1.616,0.371 -0.301,13.41 -0.461,26.594 -0.161,13.184 1.646,19.13 0.402,20.469 -1.211,1.307 -4.04,-5.188 -3.847,-18.402 0.16,-13.185 2.29,-29.033 3.906,-28.661 z"
+                 id="path6666" />
+              <path
+                 style="fill:#b7b7b7"
+                 inkscape:connector-curvature="0"
+                 d="m 150.723,217.099 c 1.519,0.387 -0.336,13.188 -0.509,26.106 -0.173,12.92 1.601,18.875 0.423,20.156 -1.144,1.246 -3.913,-5.171 -3.706,-18.123 0.172,-12.919 2.273,-28.529 3.792,-28.139 z"
+                 id="path6668" />
+              <path
+                 style="fill:#b2b2b2"
+                 inkscape:connector-curvature="0"
+                 d="m 150.693,217.491 c 1.422,0.404 -0.37,12.969 -0.554,25.621 -0.186,12.653 1.555,18.617 0.441,19.842 -1.076,1.187 -3.786,-5.156 -3.563,-17.846 0.184,-12.652 2.255,-28.024 3.676,-27.617 z"
+                 id="path6670" />
+              <path
+                 style="fill:#adadad"
+                 inkscape:connector-curvature="0"
+                 d="m 150.664,217.881 c 1.325,0.422 -0.404,12.748 -0.601,25.136 -0.198,12.388 1.51,18.36 0.462,19.528 -1.008,1.125 -3.66,-5.139 -3.423,-17.566 0.197,-12.389 2.238,-27.521 3.562,-27.098 z"
+                 id="path6672" />
+              <path
+                 style="fill:#a8a8a8"
+                 inkscape:connector-curvature="0"
+                 d="m 150.634,218.272 c 1.229,0.439 -0.438,12.527 -0.646,24.65 -0.21,12.123 1.464,18.104 0.48,19.213 -0.939,1.066 -3.531,-5.121 -3.279,-17.285 0.208,-12.123 2.219,-27.019 3.445,-26.578 z"
+                 id="path6674" />
+              <path
+                 style="fill:#a3a3a3"
+                 inkscape:connector-curvature="0"
+                 d="m 150.605,218.663 c 1.13,0.457 -0.474,12.309 -0.694,24.166 -0.222,11.857 1.419,17.848 0.501,18.899 -0.873,1.006 -3.405,-5.106 -3.139,-17.009 0.222,-11.855 2.202,-26.515 3.332,-26.056 z"
+                 id="path6676" />
+              <path
+                 style="fill:#9e9e9e"
+                 inkscape:connector-curvature="0"
+                 d="m 150.576,219.054 c 1.033,0.474 -0.507,12.088 -0.741,23.68 -0.234,11.593 1.374,17.591 0.521,18.585 -0.806,0.946 -3.279,-5.089 -2.997,-16.729 0.233,-11.591 2.184,-26.011 3.217,-25.536 z"
+                 id="path6678" />
+            </g>
+            <path
+               style="fill:#999999"
+               inkscape:connector-curvature="0"
+               d="m 150.546,219.444 c 0.937,0.492 -0.541,11.868 -0.787,23.195 -0.246,11.326 1.329,17.335 0.541,18.271 -0.737,0.885 -3.151,-5.074 -2.855,-16.449 0.245,-11.328 2.166,-25.509 3.101,-25.017 z"
+               id="path6680" />
+          </g>
+          <g
+             id="g6682">
+            <path
+               style="fill:#ffffff"
+               inkscape:connector-curvature="0"
+               d="m 157.434,167.161 c 1.735,0.192 12.437,-2.218 12.822,-1.254 0.386,0.772 -6.651,2.893 -8.966,5.303 -0.771,0.771 -2.796,2.603 -4.049,2.41 -0.964,-0.096 -1.543,-2.121 -2.989,-3.664 -3.471,-3.47 -5.688,-3.181 -5.013,-4.531 0.579,-1.06 5.207,1.446 8.195,1.736 z"
+               id="path6684" />
+            <g
+               id="g6686">
+              <path
+                 style="fill:#fbfbfb"
+                 inkscape:connector-curvature="0"
+                 d="m 157.479,167.201 c 1.7,0.188 12.176,-2.171 12.554,-1.227 0.377,0.755 -6.512,2.832 -8.778,5.191 -0.755,0.755 -2.736,2.549 -3.964,2.36 -0.942,-0.094 -1.51,-2.077 -2.926,-3.587 -3.398,-3.397 -5.568,-3.115 -4.907,-4.436 0.565,-1.038 5.096,1.415 8.021,1.699 z"
+                 id="path6688" />
+              <path
+                 style="fill:#f8f8f8"
+                 inkscape:connector-curvature="0"
+                 d="m 157.525,167.241 c 1.663,0.184 11.914,-2.124 12.283,-1.201 0.369,0.739 -6.372,2.771 -8.589,5.08 -0.738,0.739 -2.679,2.494 -3.879,2.309 -0.924,-0.092 -1.479,-2.032 -2.863,-3.51 -3.325,-3.324 -5.449,-3.048 -4.803,-4.341 0.555,-1.015 4.988,1.385 7.851,1.663 z"
+                 id="path6690" />
+              <path
+                 style="fill:#f5f5f5"
+                 inkscape:connector-curvature="0"
+                 d="m 157.57,167.281 c 1.626,0.18 11.652,-2.078 12.014,-1.175 0.361,0.723 -6.231,2.711 -8.4,4.969 -0.723,0.722 -2.619,2.439 -3.793,2.258 -0.903,-0.09 -1.446,-1.987 -2.802,-3.433 -3.252,-3.251 -5.329,-2.981 -4.695,-4.245 0.54,-0.993 4.876,1.354 7.676,1.626 z"
+                 id="path6692" />
+              <path
+                 style="fill:#f2f2f2"
+                 inkscape:connector-curvature="0"
+                 d="m 157.615,167.321 c 1.59,0.176 11.391,-2.031 11.745,-1.148 0.352,0.706 -6.093,2.649 -8.212,4.856 -0.707,0.707 -2.562,2.385 -3.709,2.208 -0.883,-0.088 -1.413,-1.943 -2.738,-3.356 -3.179,-3.178 -5.209,-2.914 -4.591,-4.15 0.529,-0.971 4.768,1.324 7.505,1.59 z"
+                 id="path6694" />
+              <path
+                 style="fill:#efefef"
+                 inkscape:connector-curvature="0"
+                 d="m 157.66,167.361 c 1.554,0.172 11.13,-1.985 11.475,-1.122 0.346,0.69 -5.952,2.589 -8.022,4.745 -0.69,0.69 -2.503,2.33 -3.624,2.157 -0.863,-0.086 -1.381,-1.898 -2.675,-3.279 -3.106,-3.105 -5.09,-2.847 -4.486,-4.055 0.517,-0.948 4.658,1.294 7.332,1.554 z"
+                 id="path6696" />
+              <path
+                 style="fill:#ebebeb"
+                 inkscape:connector-curvature="0"
+                 d="m 157.705,167.401 c 1.518,0.168 10.868,-1.938 11.206,-1.096 0.336,0.674 -5.813,2.528 -7.835,4.634 -0.674,0.674 -2.444,2.275 -3.539,2.106 -0.842,-0.084 -1.348,-1.853 -2.612,-3.202 -3.032,-3.032 -4.97,-2.78 -4.38,-3.959 0.505,-0.926 4.549,1.263 7.16,1.517 z"
+                 id="path6698" />
+              <path
+                 style="fill:#e8e8e8"
+                 inkscape:connector-curvature="0"
+                 d="m 157.751,167.441 c 1.48,0.164 10.606,-1.892 10.936,-1.069 0.329,0.657 -5.673,2.467 -7.646,4.522 -0.658,0.657 -2.385,2.22 -3.453,2.055 -0.822,-0.082 -1.315,-1.809 -2.549,-3.124 -2.96,-2.96 -4.851,-2.714 -4.275,-3.865 0.491,-0.904 4.438,1.233 6.987,1.481 z"
+                 id="path6700" />
+              <path
+                 style="fill:#e5e5e5"
+                 inkscape:connector-curvature="0"
+                 d="m 157.796,167.481 c 1.444,0.16 10.346,-1.845 10.666,-1.043 0.32,0.641 -5.532,2.406 -7.458,4.41 -0.641,0.642 -2.325,2.166 -3.367,2.005 -0.803,-0.08 -1.284,-1.764 -2.486,-3.047 -2.887,-2.887 -4.732,-2.647 -4.17,-3.769 0.48,-0.882 4.329,1.202 6.815,1.444 z"
+                 id="path6702" />
+              <path
+                 style="fill:#e2e2e2"
+                 inkscape:connector-curvature="0"
+                 d="m 157.841,167.521 c 1.407,0.156 10.083,-1.799 10.397,-1.017 0.312,0.625 -5.394,2.346 -7.271,4.299 -0.625,0.625 -2.267,2.111 -3.282,1.954 -0.782,-0.078 -1.251,-1.719 -2.423,-2.97 -2.814,-2.814 -4.612,-2.58 -4.065,-3.674 0.469,-0.859 4.221,1.172 6.644,1.408 z"
+                 id="path6704" />
+              <path
+                 style="fill:#dfdfdf"
+                 inkscape:connector-curvature="0"
+                 d="m 157.886,167.56 c 1.37,0.152 9.821,-1.751 10.127,-0.99 0.304,0.609 -5.254,2.285 -7.081,4.188 -0.609,0.609 -2.208,2.056 -3.198,1.903 -0.761,-0.076 -1.218,-1.675 -2.36,-2.893 -2.741,-2.741 -4.492,-2.513 -3.959,-3.579 0.456,-0.837 4.111,1.142 6.471,1.371 z"
+                 id="path6706" />
+              <path
+                 style="fill:#dbdbdb"
+                 inkscape:connector-curvature="0"
+                 d="m 157.931,167.6 c 1.335,0.148 9.561,-1.704 9.857,-0.963 0.296,0.592 -5.114,2.223 -6.893,4.076 -0.593,0.593 -2.149,2.001 -3.113,1.853 -0.741,-0.074 -1.186,-1.631 -2.297,-2.817 -2.668,-2.667 -4.373,-2.446 -3.854,-3.483 0.445,-0.815 4.003,1.111 6.3,1.334 z"
+                 id="path6708" />
+              <path
+                 style="fill:#d8d8d8"
+                 inkscape:connector-curvature="0"
+                 d="m 157.977,167.64 c 1.298,0.144 9.299,-1.658 9.587,-0.937 0.288,0.576 -4.974,2.163 -6.704,3.964 -0.576,0.577 -2.091,1.947 -3.027,1.803 -0.721,-0.072 -1.153,-1.586 -2.234,-2.74 -2.596,-2.594 -4.253,-2.379 -3.748,-3.388 0.431,-0.792 3.891,1.081 6.126,1.298 z"
+                 id="path6710" />
+              <path
+                 style="fill:#d5d5d5"
+                 inkscape:connector-curvature="0"
+                 d="m 158.022,167.68 c 1.261,0.14 9.037,-1.611 9.317,-0.911 0.28,0.56 -4.834,2.102 -6.516,3.853 -0.56,0.561 -2.032,1.892 -2.942,1.752 -0.7,-0.07 -1.12,-1.541 -2.172,-2.663 -2.521,-2.521 -4.133,-2.312 -3.643,-3.292 0.421,-0.77 3.784,1.05 5.956,1.261 z"
+                 id="path6712" />
+              <path
+                 style="fill:#d2d2d2"
+                 inkscape:connector-curvature="0"
+                 d="m 158.067,167.72 c 1.225,0.136 8.775,-1.564 9.049,-0.884 0.271,0.543 -4.695,2.041 -6.327,3.741 -0.545,0.544 -1.974,1.837 -2.857,1.701 -0.682,-0.068 -1.09,-1.497 -2.109,-2.585 -2.449,-2.449 -4.014,-2.246 -3.538,-3.198 0.407,-0.748 3.673,1.02 5.782,1.225 z"
+                 id="path6714" />
+              <path
+                 style="fill:#cfcfcf"
+                 inkscape:connector-curvature="0"
+                 d="m 158.112,167.76 c 1.188,0.132 8.515,-1.518 8.779,-0.858 0.264,0.527 -4.555,1.98 -6.139,3.63 -0.527,0.528 -1.915,1.782 -2.772,1.65 -0.66,-0.066 -1.057,-1.452 -2.046,-2.508 -2.376,-2.376 -3.895,-2.179 -3.433,-3.103 0.397,-0.725 3.565,0.99 5.611,1.189 z"
+                 id="path6716" />
+              <path
+                 style="fill:#cccccc"
+                 inkscape:connector-curvature="0"
+                 d="m 158.157,167.8 c 1.152,0.128 8.253,-1.472 8.51,-0.832 0.255,0.511 -4.415,1.92 -5.95,3.518 -0.512,0.512 -1.855,1.728 -2.688,1.6 -0.64,-0.064 -1.023,-1.407 -1.983,-2.431 -2.303,-2.303 -3.773,-2.112 -3.326,-3.007 0.383,-0.703 3.454,0.959 5.437,1.152 z"
+                 id="path6718" />
+              <path
+                 style="fill:#c8c8c8"
+                 inkscape:connector-curvature="0"
+                 d="m 158.203,167.84 c 1.115,0.124 7.991,-1.425 8.239,-0.805 0.248,0.494 -4.274,1.858 -5.761,3.406 -0.496,0.496 -1.798,1.673 -2.603,1.549 -0.62,-0.063 -0.992,-1.363 -1.921,-2.354 -2.229,-2.229 -3.655,-2.045 -3.221,-2.912 0.372,-0.681 3.346,0.929 5.267,1.116 z"
+                 id="path6720" />
+              <path
+                 style="fill:#c5c5c5"
+                 inkscape:connector-curvature="0"
+                 d="m 158.248,167.88 c 1.079,0.12 7.73,-1.379 7.97,-0.779 0.239,0.478 -4.135,1.798 -5.572,3.295 -0.479,0.479 -1.739,1.618 -2.518,1.498 -0.6,-0.06 -0.959,-1.318 -1.857,-2.277 -2.157,-2.157 -3.535,-1.978 -3.116,-2.816 0.359,-0.659 3.235,0.898 5.093,1.079 z"
+                 id="path6722" />
+              <path
+                 style="fill:#c2c2c2"
+                 inkscape:connector-curvature="0"
+                 d="m 158.293,167.92 c 1.042,0.116 7.469,-1.332 7.701,-0.753 0.231,0.462 -3.995,1.737 -5.385,3.184 -0.463,0.463 -1.68,1.563 -2.432,1.447 -0.579,-0.058 -0.927,-1.273 -1.796,-2.2 -2.084,-2.084 -3.415,-1.911 -3.01,-2.721 0.348,-0.636 3.127,0.868 4.922,1.043 z"
+                 id="path6724" />
+            </g>
+            <path
+               style="fill:#bfbfbf"
+               inkscape:connector-curvature="0"
+               d="m 158.338,167.959 c 1.007,0.112 7.207,-1.285 7.432,-0.726 0.223,0.446 -3.855,1.676 -5.196,3.072 -0.447,0.447 -1.621,1.509 -2.347,1.397 -0.56,-0.056 -0.895,-1.229 -1.732,-2.123 -2.011,-2.011 -3.296,-1.844 -2.905,-2.626 0.334,-0.614 3.016,0.838 4.748,1.006 z"
+               id="path6726" />
+          </g>
+          <g
+             id="g6728">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 194.253,11.922 c -1.222,2.631 -3.812,23.214 -0.248,20.892 3.594,-2.341 13.57,-5.312 19.886,-7.013 7.003,-1.886 -17.188,-19.463 -19.638,-13.879 z"
+               id="path6730" />
+            <g
+               id="g6732">
+              <path
+                 style="fill:#060606"
+                 inkscape:connector-curvature="0"
+                 d="m 194.485,12.307 c -1.21,2.594 -3.704,22.255 -0.234,20.007 3.491,-2.262 13.077,-5.1 19.039,-6.782 6.59,-1.905 -16.436,-18.609 -18.805,-13.225 z"
+                 id="path6734" />
+              <path
+                 style="fill:#0c0c0c"
+                 inkscape:connector-curvature="0"
+                 d="m 194.717,12.691 c -1.198,2.557 -3.595,21.296 -0.221,19.124 3.391,-2.184 12.586,-4.888 18.194,-6.551 6.177,-1.924 -15.684,-17.757 -17.973,-12.573 z"
+                 id="path6736" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 194.949,13.076 c -1.187,2.52 -3.487,20.337 -0.207,18.239 3.288,-2.105 12.093,-4.676 17.348,-6.321 5.763,-1.941 -14.933,-16.903 -17.141,-11.918 z"
+                 id="path6738" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 195.181,13.46 c -1.177,2.483 -3.379,19.378 -0.193,17.355 3.187,-2.027 11.6,-4.464 16.502,-6.09 5.349,-1.959 -14.182,-16.05 -16.309,-11.265 z"
+                 id="path6740" />
+              <path
+                 style="fill:#1f1f1f"
+                 inkscape:connector-curvature="0"
+                 d="m 195.413,13.845 c -1.164,2.446 -3.27,18.419 -0.18,16.471 3.086,-1.949 11.107,-4.252 15.657,-5.859 4.935,-1.978 -13.43,-15.198 -15.477,-10.612 z"
+                 id="path6742" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 195.645,14.229 c -1.153,2.409 -3.162,17.46 -0.166,15.586 2.983,-1.87 10.616,-4.04 14.811,-5.628 4.521,-1.995 -12.679,-14.344 -14.645,-9.958 z"
+                 id="path6744" />
+              <path
+                 style="fill:#2c2c2c"
+                 inkscape:connector-curvature="0"
+                 d="m 195.878,14.614 c -1.142,2.372 -3.055,16.501 -0.152,14.702 2.882,-1.792 10.123,-3.828 13.965,-5.398 4.107,-2.013 -11.929,-13.49 -13.813,-9.304 z"
+                 id="path6746" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 196.11,14.999 c -1.131,2.335 -2.946,15.542 -0.14,13.817 2.78,-1.713 9.631,-3.616 13.119,-5.167 3.695,-2.031 -11.175,-12.637 -12.979,-8.65 z"
+                 id="path6748" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 196.342,15.383 c -1.118,2.299 -2.838,14.583 -0.126,12.934 2.68,-1.636 9.139,-3.404 12.274,-4.937 3.28,-2.049 -10.425,-11.784 -12.148,-7.997 z"
+                 id="path6750" />
+              <path
+                 style="fill:#3f3f3f"
+                 inkscape:connector-curvature="0"
+                 d="m 196.574,15.768 c -1.108,2.261 -2.729,13.624 -0.112,12.049 2.577,-1.557 8.646,-3.192 11.429,-4.706 2.865,-2.068 -9.675,-10.931 -11.317,-7.343 z"
+                 id="path6752" />
+              <path
+                 style="fill:#464646"
+                 inkscape:connector-curvature="0"
+                 d="m 196.806,16.152 c -1.097,2.225 -2.622,12.665 -0.1,11.165 2.477,-1.479 8.154,-2.98 10.583,-4.475 2.453,-2.086 -8.922,-10.078 -10.483,-6.69 z"
+                 id="path6754" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 197.038,16.537 c -1.085,2.188 -2.513,11.706 -0.085,10.28 2.374,-1.4 7.661,-2.768 9.737,-4.244 2.039,-2.104 -8.171,-9.225 -9.652,-6.036 z"
+                 id="path6756" />
+              <path
+                 style="fill:#525252"
+                 inkscape:connector-curvature="0"
+                 d="m 197.27,16.921 c -1.073,2.151 -2.405,10.747 -0.071,9.396 2.272,-1.322 7.168,-2.556 8.891,-4.013 1.625,-2.122 -7.42,-8.371 -8.82,-5.383 z"
+                 id="path6758" />
+              <path
+                 style="fill:#595959"
+                 inkscape:connector-curvature="0"
+                 d="m 197.502,17.306 c -1.062,2.113 -2.297,9.788 -0.058,8.512 2.172,-1.244 6.677,-2.344 8.046,-3.783 1.211,-2.14 -6.669,-7.518 -7.988,-4.729 z"
+                 id="path6760" />
+              <path
+                 style="fill:#5f5f5f"
+                 inkscape:connector-curvature="0"
+                 d="m 197.734,17.69 c -1.05,2.077 -2.188,8.829 -0.044,7.627 2.069,-1.165 6.184,-2.132 7.2,-3.552 0.797,-2.157 -5.917,-6.664 -7.156,-4.075 z"
+                 id="path6762" />
+              <path
+                 style="fill:#666666"
+                 inkscape:connector-curvature="0"
+                 d="m 197.966,18.075 c -1.038,2.04 -2.079,7.87 -0.029,6.743 1.968,-1.087 5.69,-1.92 6.354,-3.321 0.382,-2.176 -5.167,-5.812 -6.325,-3.422 z"
+                 id="path6764" />
+              <path
+                 style="fill:#6c6c6c"
+                 inkscape:connector-curvature="0"
+                 d="m 198.198,18.459 c -1.027,2.003 -1.972,6.911 -0.017,5.859 1.866,-1.008 5.198,-1.708 5.509,-3.09 -0.03,-2.194 -4.415,-4.959 -5.492,-2.769 z"
+                 id="path6766" />
+              <path
+                 style="fill:#727272"
+                 inkscape:connector-curvature="0"
+                 d="m 198.43,18.844 c -1.017,1.966 -1.863,5.952 -0.003,4.975 1.765,-0.93 4.706,-1.496 4.662,-2.86 -0.443,-2.212 -3.662,-4.106 -4.659,-2.115 z"
+                 id="path6768" />
+              <path
+                 style="fill:#797979"
+                 inkscape:connector-curvature="0"
+                 d="m 198.662,19.228 c -1.004,1.929 -1.755,4.993 0.011,4.09 1.663,-0.852 4.215,-1.284 3.817,-2.629 -0.858,-2.23 -2.912,-3.251 -3.828,-1.461 z"
+                 id="path6770" />
+            </g>
+            <path
+               style="fill:#7f7f7f"
+               inkscape:connector-curvature="0"
+               d="m 198.894,19.612 c -0.993,1.892 -1.647,4.034 0.023,3.206 1.563,-0.773 3.723,-1.072 2.973,-2.398 -1.272,-2.248 -2.161,-2.399 -2.996,-0.808 z"
+               id="path6772" />
+          </g>
+          <g
+             id="g6774">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 143.502,46.386 c -0.72,2.16 8.712,5.112 10.801,6.984 2.808,2.52 3.023,7.488 6.336,5.472 2.159,-1.296 0.504,-4.176 -3.456,-8.568 -5.833,-6.481 -13.033,-5.689 -13.681,-3.888 z"
+               id="path6776" />
+            <g
+               id="g6778">
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 143.991,46.582 c -0.716,2.073 8.275,4.9 10.336,6.741 2.745,2.457 2.961,7.249 6.146,5.313 2.094,-1.254 0.449,-4.072 -3.343,-8.28 -5.574,-6.203 -12.491,-5.505 -13.139,-3.774 z"
+                 id="path6780" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 144.479,46.779 c -0.71,1.987 7.839,4.688 9.873,6.498 2.682,2.394 2.897,7.009 5.956,5.154 2.028,-1.212 0.395,-3.968 -3.228,-7.993 -5.319,-5.926 -11.953,-5.321 -12.601,-3.659 z"
+                 id="path6782" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 144.967,46.976 c -0.704,1.9 7.403,4.476 9.41,6.254 2.62,2.33 2.835,6.77 5.766,4.995 1.964,-1.171 0.342,-3.864 -3.112,-7.706 -5.064,-5.647 -11.415,-5.137 -12.064,-3.543 z"
+                 id="path6784" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 145.456,47.172 c -0.701,1.813 6.966,4.263 8.946,6.011 2.557,2.266 2.772,6.53 5.575,4.835 1.897,-1.129 0.287,-3.76 -2.998,-7.418 -4.807,-5.369 -10.874,-4.952 -11.523,-3.428 z"
+                 id="path6786" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 145.944,47.369 c -0.696,1.726 6.53,4.051 8.483,5.768 2.493,2.203 2.71,6.291 5.385,4.676 1.833,-1.087 0.231,-3.656 -2.884,-7.13 -4.551,-5.093 -10.335,-4.769 -10.984,-3.314 z"
+                 id="path6788" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 146.433,47.565 c -0.692,1.64 6.093,3.839 8.019,5.525 2.431,2.14 2.647,6.052 5.194,4.517 1.768,-1.046 0.179,-3.552 -2.77,-6.843 -4.293,-4.814 -9.794,-4.585 -10.443,-3.199 z"
+                 id="path6790" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 146.921,47.762 c -0.686,1.553 5.657,3.627 7.558,5.282 2.367,2.076 2.583,5.813 5.003,4.357 1.702,-1.003 0.124,-3.448 -2.654,-6.555 -4.04,-4.537 -9.257,-4.401 -9.907,-3.084 z"
+                 id="path6792" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 147.409,47.959 c -0.681,1.466 5.221,3.415 7.094,5.039 2.305,2.013 2.521,5.573 4.813,4.198 1.637,-0.962 0.07,-3.344 -2.54,-6.268 -3.782,-4.26 -8.717,-4.218 -9.367,-2.969 z"
+                 id="path6794" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 147.898,48.156 c -0.677,1.379 4.784,3.203 6.63,4.795 2.242,1.949 2.457,5.333 4.622,4.039 1.572,-0.92 0.016,-3.24 -2.425,-5.98 -3.526,-3.983 -8.177,-4.034 -8.827,-2.854 z"
+                 id="path6796" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 148.386,48.353 c -0.673,1.292 4.348,2.99 6.167,4.552 2.179,1.886 2.394,5.095 4.432,3.88 1.506,-0.878 -0.038,-3.136 -2.312,-5.693 -3.268,-3.705 -7.636,-3.85 -8.287,-2.739 z"
+                 id="path6798" />
+              <path
+                 style="fill:#383838"
+                 inkscape:connector-curvature="0"
+                 d="m 148.875,48.549 c -0.668,1.206 3.911,2.778 5.703,4.309 2.116,1.823 2.331,4.855 4.242,3.721 1.439,-0.836 -0.093,-3.032 -2.197,-5.405 -3.013,-3.428 -7.098,-3.667 -7.748,-2.625 z"
+                 id="path6800" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 149.363,48.746 c -0.662,1.119 3.475,2.566 5.24,4.065 2.053,1.759 2.268,4.616 4.052,3.562 1.375,-0.795 -0.147,-2.928 -2.082,-5.118 -2.757,-3.15 -6.559,-3.483 -7.21,-2.509 z"
+                 id="path6802" />
+              <path
+                 style="fill:#424242"
+                 inkscape:connector-curvature="0"
+                 d="m 149.851,48.942 c -0.657,1.032 3.039,2.354 4.776,3.823 1.99,1.696 2.205,4.376 3.861,3.402 1.31,-0.753 -0.201,-2.824 -1.967,-4.831 -2.5,-2.871 -6.018,-3.298 -6.67,-2.394 z"
+                 id="path6804" />
+              <path
+                 style="fill:#474747"
+                 inkscape:connector-curvature="0"
+                 d="m 150.34,49.139 c -0.652,0.946 2.603,2.142 4.313,3.58 1.927,1.632 2.143,4.137 3.671,3.243 1.244,-0.712 -0.256,-2.72 -1.853,-4.543 -2.245,-2.595 -5.48,-3.115 -6.131,-2.28 z"
+                 id="path6806" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 150.828,49.336 c -0.647,0.859 2.166,1.93 3.851,3.336 1.863,1.569 2.079,3.898 3.48,3.084 1.179,-0.67 -0.31,-2.616 -1.739,-4.255 -1.988,-2.317 -4.94,-2.932 -5.592,-2.165 z"
+                 id="path6808" />
+              <path
+                 style="fill:#515151"
+                 inkscape:connector-curvature="0"
+                 d="m 151.317,49.533 c -0.645,0.772 1.729,1.718 3.386,3.093 1.802,1.505 2.018,3.658 3.29,2.925 1.114,-0.628 -0.364,-2.512 -1.624,-3.968 -1.732,-2.04 -4.4,-2.748 -5.052,-2.05 z"
+                 id="path6810" />
+              <path
+                 style="fill:#565656"
+                 inkscape:connector-curvature="0"
+                 d="m 151.805,49.729 c -0.639,0.685 1.293,1.505 2.923,2.85 1.738,1.442 1.954,3.419 3.1,2.766 1.048,-0.586 -0.418,-2.408 -1.509,-3.681 -1.476,-1.762 -3.862,-2.563 -4.514,-1.935 z"
+                 id="path6812" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 152.293,49.926 c -0.633,0.598 0.857,1.293 2.46,2.606 1.677,1.379 1.892,3.18 2.91,2.606 0.983,-0.544 -0.473,-2.304 -1.395,-3.393 -1.22,-1.483 -3.322,-2.379 -3.975,-1.819 z"
+                 id="path6814" />
+              <path
+                 style="fill:#606060"
+                 inkscape:connector-curvature="0"
+                 d="m 152.782,50.123 c -0.629,0.512 0.42,1.081 1.996,2.363 1.613,1.315 1.828,2.94 2.719,2.447 0.918,-0.502 -0.525,-2.2 -1.28,-3.105 -0.963,-1.207 -2.782,-2.196 -3.435,-1.705 z"
+                 id="path6816" />
+            </g>
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 153.27,50.319 c -0.624,0.425 -0.017,0.869 1.533,2.12 1.55,1.252 1.765,2.701 2.528,2.288 0.853,-0.461 -0.581,-2.096 -1.166,-2.818 -0.706,-0.929 -2.242,-2.012 -2.895,-1.59 z"
+               id="path6818" />
+          </g>
+          <g
+             id="g6820">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 193.47,45.594 c -0.072,1.08 2.951,1.728 4.896,2.448 1.944,0.648 5.76,3.24 7.56,5.256 1.801,1.944 5.688,7.704 6.553,6.192 0.863,-1.368 -2.017,-5.328 -2.809,-6.984 -0.792,-1.656 -3.239,-5.256 -7.128,-6.48 -3.384,-1.008 -9,-1.297 -9.072,-0.432 z"
+               id="path6822" />
+            <g
+               id="g6824">
+              <path
+                 style="fill:#060606"
+                 inkscape:connector-curvature="0"
+                 d="m 193.779,45.67 c -0.071,1.05 2.869,1.685 4.758,2.387 1.891,0.633 5.598,3.161 7.345,5.122 1.747,1.893 5.535,7.493 6.376,6.027 0.84,-1.328 -1.936,-5.173 -2.738,-6.795 -0.8,-1.622 -3.175,-5.09 -6.952,-6.301 -3.282,-0.995 -8.718,-1.28 -8.789,-0.44 z"
+                 id="path6826" />
+              <path
+                 style="fill:#0c0c0c"
+                 inkscape:connector-curvature="0"
+                 d="m 194.088,45.747 c -0.07,1.021 2.785,1.641 4.62,2.327 1.836,0.618 5.436,3.081 7.131,4.988 1.692,1.842 5.382,7.282 6.198,5.862 0.814,-1.288 -1.855,-5.019 -2.67,-6.607 -0.808,-1.587 -3.11,-4.925 -6.776,-6.122 -3.178,-0.983 -8.433,-1.264 -8.503,-0.448 z"
+                 id="path6828" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 194.397,45.824 c -0.071,0.991 2.702,1.598 4.481,2.267 1.782,0.603 5.272,3.001 6.916,4.854 1.64,1.791 5.229,7.071 6.022,5.697 0.788,-1.248 -1.776,-4.865 -2.603,-6.418 -0.815,-1.554 -3.044,-4.759 -6.599,-5.942 -3.073,-0.973 -8.148,-1.251 -8.217,-0.458 z"
+                 id="path6830" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 194.706,45.9 c -0.069,0.961 2.618,1.555 4.345,2.206 1.728,0.588 5.109,2.922 6.7,4.721 1.586,1.74 5.075,6.86 5.846,5.531 0.764,-1.207 -1.696,-4.711 -2.532,-6.23 -0.824,-1.519 -2.979,-4.593 -6.424,-5.763 -2.972,-0.959 -7.866,-1.234 -7.935,-0.465 z"
+                 id="path6832" />
+              <path
+                 style="fill:#1f1f1f"
+                 inkscape:connector-curvature="0"
+                 d="m 195.015,45.977 c -0.07,0.931 2.534,1.511 4.207,2.146 1.672,0.573 4.945,2.843 6.485,4.586 1.531,1.689 4.921,6.649 5.668,5.367 0.738,-1.167 -1.616,-4.557 -2.464,-6.042 -0.832,-1.485 -2.914,-4.428 -6.247,-5.583 -2.868,-0.948 -7.581,-1.219 -7.649,-0.474 z"
+                 id="path6834" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 195.324,46.054 c -0.069,0.901 2.451,1.468 4.069,2.085 1.618,0.557 4.784,2.763 6.271,4.453 1.479,1.638 4.769,6.438 5.491,5.201 0.714,-1.127 -1.536,-4.402 -2.396,-5.854 -0.839,-1.451 -2.848,-4.263 -6.07,-5.404 -2.765,-0.934 -7.298,-1.202 -7.365,-0.481 z"
+                 id="path6836" />
+              <path
+                 style="fill:#2c2c2c"
+                 inkscape:connector-curvature="0"
+                 d="m 195.632,46.13 c -0.067,0.872 2.369,1.424 3.933,2.025 1.563,0.542 4.621,2.684 6.056,4.318 1.424,1.587 4.615,6.228 5.315,5.036 0.688,-1.086 -1.456,-4.248 -2.326,-5.665 -0.848,-1.416 -2.783,-4.097 -5.896,-5.224 -2.662,-0.923 -7.015,-1.187 -7.082,-0.49 z"
+                 id="path6838" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 195.941,46.207 c -0.068,0.842 2.285,1.381 3.794,1.964 1.51,0.527 4.458,2.605 5.842,4.185 1.37,1.536 4.461,6.016 5.138,4.871 0.662,-1.046 -1.377,-4.093 -2.258,-5.476 -0.855,-1.382 -2.718,-3.932 -5.718,-5.045 -2.56,-0.911 -6.732,-1.172 -6.798,-0.499 z"
+                 id="path6840" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 196.25,46.284 c -0.066,0.813 2.202,1.338 3.656,1.904 1.456,0.512 4.296,2.525 5.627,4.051 1.317,1.485 4.308,5.805 4.961,4.706 0.638,-1.006 -1.296,-3.939 -2.188,-5.288 -0.863,-1.348 -2.652,-3.766 -5.542,-4.866 -2.457,-0.899 -6.449,-1.157 -6.514,-0.507 z"
+                 id="path6842" />
+              <path
+                 style="fill:#3f3f3f"
+                 inkscape:connector-curvature="0"
+                 d="m 196.559,46.36 c -0.067,0.783 2.118,1.295 3.518,1.844 1.402,0.497 4.133,2.446 5.412,3.917 1.263,1.434 4.155,5.594 4.785,4.541 0.612,-0.966 -1.217,-3.785 -2.12,-5.1 -0.872,-1.313 -2.587,-3.6 -5.366,-4.687 -2.353,-0.886 -6.165,-1.141 -6.229,-0.515 z"
+                 id="path6844" />
+              <path
+                 style="fill:#464646"
+                 inkscape:connector-curvature="0"
+                 d="m 196.868,46.437 c -0.065,0.753 2.035,1.251 3.38,1.783 1.349,0.482 3.972,2.367 5.197,3.783 1.21,1.383 4.002,5.383 4.608,4.375 0.588,-0.926 -1.137,-3.63 -2.052,-4.911 -0.879,-1.279 -2.521,-3.435 -5.189,-4.507 -2.25,-0.874 -5.881,-1.125 -5.944,-0.523 z"
+                 id="path6846" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 197.177,46.514 c -0.066,0.723 1.95,1.208 3.241,1.723 1.293,0.467 3.809,2.287 4.983,3.649 1.155,1.332 3.848,5.172 4.431,4.21 0.563,-0.885 -1.057,-3.476 -1.982,-4.723 -0.888,-1.245 -2.456,-3.269 -5.014,-4.328 -2.146,-0.862 -5.597,-1.109 -5.659,-0.531 z"
+                 id="path6848" />
+              <path
+                 style="fill:#525252"
+                 inkscape:connector-curvature="0"
+                 d="m 197.486,46.591 c -0.066,0.693 1.868,1.164 3.104,1.662 1.239,0.452 3.646,2.208 4.769,3.515 1.102,1.281 3.695,4.961 4.254,4.045 0.537,-0.845 -0.976,-3.321 -1.913,-4.534 -0.896,-1.21 -2.391,-3.103 -4.838,-4.148 -2.044,-0.851 -5.315,-1.095 -5.376,-0.54 z"
+                 id="path6850" />
+              <path
+                 style="fill:#595959"
+                 inkscape:connector-curvature="0"
+                 d="m 197.795,46.667 c -0.064,0.664 1.784,1.121 2.968,1.602 1.184,0.437 3.481,2.128 4.552,3.381 1.049,1.23 3.542,4.75 4.078,3.88 0.512,-0.805 -0.897,-3.167 -1.846,-4.346 -0.902,-1.176 -2.325,-2.938 -4.66,-3.969 -1.942,-0.838 -5.031,-1.078 -5.092,-0.548 z"
+                 id="path6852" />
+              <path
+                 style="fill:#5f5f5f"
+                 inkscape:connector-curvature="0"
+                 d="m 198.104,46.744 c -0.065,0.634 1.701,1.078 2.829,1.541 1.13,0.421 3.318,2.049 4.338,3.248 0.994,1.179 3.388,4.539 3.899,3.715 0.487,-0.765 -0.815,-3.013 -1.775,-4.157 -0.911,-1.142 -2.261,-2.772 -4.485,-3.79 -1.837,-0.826 -4.746,-1.064 -4.806,-0.557 z"
+                 id="path6854" />
+              <path
+                 style="fill:#666666"
+                 inkscape:connector-curvature="0"
+                 d="m 198.413,46.821 c -0.063,0.604 1.617,1.034 2.691,1.481 1.076,0.406 3.157,1.969 4.123,3.113 0.94,1.128 3.234,4.328 3.724,3.55 0.462,-0.725 -0.737,-2.858 -1.707,-3.969 -0.919,-1.108 -2.195,-2.606 -4.309,-3.61 -1.734,-0.814 -4.463,-1.049 -4.522,-0.565 z"
+                 id="path6856" />
+              <path
+                 style="fill:#6c6c6c"
+                 inkscape:connector-curvature="0"
+                 d="m 198.721,46.897 c -0.063,0.574 1.534,0.991 2.554,1.42 1.021,0.391 2.994,1.89 3.908,2.979 0.887,1.077 3.082,4.117 3.548,3.384 0.436,-0.685 -0.657,-2.704 -1.64,-3.78 -0.927,-1.074 -2.13,-2.44 -4.132,-3.431 -1.631,-0.8 -4.179,-1.031 -4.238,-0.572 z"
+                 id="path6858" />
+              <path
+                 style="fill:#727272"
+                 inkscape:connector-curvature="0"
+                 d="m 199.03,46.974 c -0.063,0.544 1.451,0.948 2.416,1.36 0.967,0.376 2.831,1.811 3.694,2.846 0.833,1.026 2.928,3.906 3.369,3.219 0.411,-0.644 -0.576,-2.549 -1.569,-3.592 -0.936,-1.04 -2.064,-2.275 -3.956,-3.251 -1.528,-0.79 -3.896,-1.017 -3.954,-0.582 z"
+                 id="path6860" />
+              <path
+                 style="fill:#797979"
+                 inkscape:connector-curvature="0"
+                 d="m 199.339,47.051 c -0.062,0.515 1.368,0.904 2.278,1.299 0.913,0.361 2.669,1.731 3.479,2.712 0.779,0.975 2.774,3.695 3.193,3.054 0.386,-0.604 -0.497,-2.396 -1.501,-3.403 -0.942,-1.005 -1.999,-2.11 -3.78,-3.072 -1.424,-0.778 -3.612,-1.002 -3.669,-0.59 z"
+                 id="path6862" />
+            </g>
+            <path
+               style="fill:#7f7f7f"
+               inkscape:connector-curvature="0"
+               d="m 199.648,47.127 c -0.063,0.485 1.284,0.861 2.14,1.239 0.859,0.346 2.506,1.652 3.265,2.578 0.726,0.924 2.621,3.484 3.017,2.889 0.361,-0.564 -0.417,-2.241 -1.432,-3.215 -0.951,-0.971 -1.935,-1.944 -3.604,-2.893 -1.323,-0.765 -3.33,-0.986 -3.386,-0.598 z"
+               id="path6864" />
+          </g>
+          <g
+             id="g6866">
+            <path
+               style="fill:#995900"
+               inkscape:connector-curvature="0"
+               d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.017,11.592 -31.104,19.152 -13.968,9.576 -18.792,13.824 -23.328,18.359 -7.056,7.057 -13.752,9.432 -24.48,9.432 -10.728,0 -15.552,-2.231 -18.863,-5.184 -3.313,-2.88 -6.984,-10.225 -6.624,-21.168 0.288,-10.872 3.744,-20.809 5.399,-37.729 0.721,-7.271 0.648,-16.271 0.648,-24.264 0,-10.08 0.144,-18.648 2.304,-19.943 3.889,-2.448 4.752,-2.592 9.36,-2.592 4.607,0 6.696,0.287 8.208,1.799 1.439,1.44 0.864,4.752 0.359,9.433 -0.432,4.681 1.801,6.192 4.032,8.136 2.232,1.872 4.248,4.248 11.305,4.824 7.056,0.504 9.647,-0.648 12.96,-2.736 3.312,-2.088 7.991,-5.832 9.72,-7.992 1.656,-2.088 5.76,-9.287 6.552,-9.287 0.719,0 5.472,-1.656 8.136,2.232 z"
+               id="path6868" />
+            <g
+               id="g6870">
+              <path
+                 style="fill:#9e5e00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.12,11.556 -31.26,19.008 -13.885,9.371 -18.903,13.54 -23.521,17.902 -6.912,6.74 -13.414,9.084 -23.915,9.019 -10.411,-0.047 -15.116,-2.181 -18.414,-5.118 -3.297,-2.867 -6.931,-9.966 -6.613,-20.578 0.205,-10.851 3.701,-20.683 5.256,-37.279 0.666,-7.379 0.407,-16.303 0.335,-24.375 -0.076,-10.068 -0.072,-18.627 2.084,-19.922 3.889,-2.444 4.752,-2.592 9.36,-2.592 4.607,0 6.7,0.291 8.208,1.799 1.491,1.492 0.767,4.887 0.205,9.408 -0.63,4.658 1.458,6.486 3.795,8.607 2.34,2.059 4.489,4.471 11.534,5.021 7.232,0.482 10.015,-0.832 13.362,-3.106 3.303,-2.207 7.773,-5.903 9.513,-8.168 1.641,-2.132 5.727,-9.386 6.519,-9.386 0.719,0 5.472,-1.656 8.136,2.232 z"
+                 id="path6872" />
+              <path
+                 style="fill:#a36400"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.226,11.52 -31.414,18.863 -13.803,9.166 -19.016,13.256 -23.717,17.447 -6.768,6.422 -13.075,8.733 -23.35,8.604 -10.094,-0.094 -14.682,-2.131 -17.964,-5.055 -3.283,-2.852 -6.876,-9.705 -6.603,-19.987 0.122,-10.828 3.657,-20.556 5.112,-36.828 0.612,-7.487 0.165,-16.336 0.021,-24.487 -0.15,-10.058 -0.287,-18.605 1.865,-19.9 3.889,-2.44 4.752,-2.592 9.36,-2.592 4.607,0 6.703,0.295 8.208,1.799 1.541,1.541 0.67,5.02 0.051,9.383 -0.828,4.637 1.116,6.781 3.556,9.078 2.448,2.248 4.731,4.695 11.766,5.221 7.409,0.461 10.383,-1.016 13.767,-3.477 3.29,-2.326 7.552,-5.977 9.302,-8.346 1.627,-2.175 5.695,-9.482 6.487,-9.482 0.72,-10e-4 5.473,-1.657 8.137,2.231 z"
+                 id="path6874" />
+              <path
+                 style="fill:#a86a00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.329,11.484 -31.568,18.72 -13.721,8.961 -19.127,12.972 -23.911,16.989 -6.624,6.105 -12.737,8.384 -22.785,8.189 -9.777,-0.141 -14.245,-2.08 -17.514,-4.99 -3.27,-2.836 -6.822,-9.445 -6.591,-19.396 0.038,-10.807 3.613,-20.43 4.968,-36.378 0.558,-7.597 -0.076,-16.368 -0.292,-24.599 -0.228,-10.047 -0.504,-18.584 1.645,-19.879 3.889,-2.438 4.752,-2.592 9.36,-2.592 4.607,0 6.707,0.299 8.208,1.799 1.591,1.593 0.573,5.152 -0.104,9.357 -1.025,4.615 0.774,7.077 3.319,9.551 2.556,2.434 4.972,4.918 11.995,5.418 7.585,0.439 10.75,-1.199 14.17,-3.849 3.279,-2.444 7.333,-6.048 9.093,-8.521 1.613,-2.219 5.663,-9.58 6.455,-9.58 0.719,0.001 5.472,-1.655 8.136,2.233 z"
+                 id="path6876" />
+              <path
+                 style="fill:#ad7000"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.434,11.447 -31.724,18.576 -13.637,8.756 -19.238,12.687 -24.106,16.531 -6.479,5.789 -12.397,8.035 -22.219,7.776 -9.461,-0.188 -13.809,-2.03 -17.063,-4.925 -3.254,-2.823 -6.769,-9.188 -6.581,-18.807 -0.043,-10.785 3.571,-20.305 4.824,-35.928 0.504,-7.705 -0.316,-16.402 -0.604,-24.711 -0.303,-10.037 -0.72,-18.563 1.425,-19.857 3.889,-2.434 4.752,-2.592 9.36,-2.592 4.607,0 6.711,0.303 8.208,1.799 1.642,1.643 0.475,5.285 -0.259,9.332 -1.225,4.594 0.432,7.373 3.082,10.022 2.664,2.621 5.212,5.142 12.225,5.616 7.762,0.418 11.117,-1.383 14.573,-4.219 3.269,-2.563 7.113,-6.121 8.885,-8.698 1.598,-2.261 5.63,-9.677 6.422,-9.677 0.719,0.002 5.472,-1.654 8.136,2.234 z"
+                 id="path6878" />
+              <path
+                 style="fill:#b27500"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.538,11.412 -31.879,18.432 -13.554,8.551 -19.35,12.402 -24.3,16.074 -6.336,5.473 -12.06,7.686 -21.654,7.361 -9.144,-0.233 -13.374,-1.979 -16.613,-4.859 -3.24,-2.809 -6.714,-8.928 -6.57,-18.216 -0.126,-10.765 3.528,-20.179 4.68,-35.478 0.45,-7.813 -0.558,-16.435 -0.918,-24.822 -0.378,-10.026 -0.936,-18.541 1.206,-19.836 3.889,-2.43 4.752,-2.592 9.36,-2.592 4.607,0 6.714,0.305 8.208,1.799 1.691,1.693 0.378,5.418 -0.414,9.307 -1.422,4.572 0.09,7.668 2.844,10.494 2.772,2.808 5.454,5.363 12.456,5.814 7.938,0.396 11.484,-1.566 14.977,-4.591 3.258,-2.682 6.894,-6.192 8.676,-8.874 1.584,-2.304 5.598,-9.773 6.39,-9.773 0.718,0 5.471,-1.656 8.135,2.232 z"
+                 id="path6880" />
+              <path
+                 style="fill:#b77b00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.643,11.376 -32.033,18.288 -13.472,8.345 -19.461,12.118 -24.494,15.616 -6.192,5.156 -11.723,7.338 -21.089,6.949 -8.827,-0.281 -12.938,-1.93 -16.164,-4.795 -3.226,-2.795 -6.66,-8.67 -6.56,-17.627 -0.209,-10.742 3.485,-20.052 4.536,-35.027 0.396,-7.92 -0.799,-16.467 -1.23,-24.934 -0.454,-10.015 -1.152,-18.52 0.985,-19.814 3.889,-2.426 4.752,-2.592 9.36,-2.592 4.607,0 6.718,0.31 8.208,1.799 1.743,1.744 0.281,5.553 -0.569,9.281 -1.62,4.551 -0.252,7.963 2.607,10.967 2.88,2.994 5.694,5.586 12.686,6.012 8.115,0.373 11.852,-1.75 15.379,-4.961 3.248,-2.801 6.676,-6.264 8.469,-9.051 1.568,-2.348 5.564,-9.871 6.356,-9.871 0.72,0 5.473,-1.656 8.137,2.232 z"
+                 id="path6882" />
+              <path
+                 style="fill:#bc8100"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.747,11.34 -32.188,18.145 -13.389,8.139 -19.574,11.834 -24.689,15.159 -6.048,4.839 -11.383,6.988 -20.523,6.534 -8.51,-0.328 -12.503,-1.879 -15.714,-4.73 -3.211,-2.779 -6.606,-8.41 -6.549,-17.035 -0.292,-10.721 3.441,-19.926 4.393,-34.578 0.342,-8.028 -1.041,-16.498 -1.545,-25.045 -0.529,-10.004 -1.368,-18.498 0.767,-19.793 3.889,-2.422 4.752,-2.592 9.36,-2.592 4.607,0 6.721,0.313 8.208,1.799 1.793,1.793 0.184,5.686 -0.723,9.256 -1.818,4.529 -0.595,8.259 2.367,11.438 2.988,3.184 5.938,5.811 12.917,6.211 8.291,0.352 12.22,-1.934 15.783,-5.332 3.236,-2.92 6.454,-6.336 8.258,-9.227 1.556,-2.391 5.533,-9.969 6.325,-9.969 0.72,-10e-4 5.473,-1.657 8.137,2.231 z"
+                 id="path6884" />
+              <path
+                 style="fill:#c18700"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.852,11.304 -32.343,18 -13.306,7.936 -19.685,11.549 -24.883,14.703 -5.904,4.521 -11.045,6.638 -19.959,6.119 -8.193,-0.375 -12.067,-1.828 -15.264,-4.666 -3.197,-2.764 -6.553,-8.149 -6.537,-16.444 -0.375,-10.699 3.397,-19.8 4.248,-34.128 0.288,-8.137 -1.282,-16.531 -1.858,-25.156 -0.604,-9.994 -1.584,-18.477 0.547,-19.771 3.889,-2.42 4.752,-2.592 9.36,-2.592 4.607,0 6.725,0.316 8.208,1.799 1.843,1.845 0.087,5.818 -0.878,9.231 -2.017,4.507 -0.937,8.554 2.131,11.909 3.096,3.369 6.178,6.033 13.146,6.408 8.468,0.33 12.587,-2.117 16.187,-5.703 3.225,-3.038 6.235,-6.408 8.049,-9.402 1.541,-2.436 5.501,-10.066 6.293,-10.066 0.72,-10e-4 5.473,-1.657 8.137,2.231 z"
+                 id="path6886" />
+              <path
+                 style="fill:#c68c00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -20.955,11.268 -32.498,17.855 -13.223,7.73 -19.796,11.266 -25.077,14.246 -5.761,4.204 -10.706,6.289 -19.394,5.707 -7.877,-0.423 -11.631,-1.779 -14.813,-4.602 -3.183,-2.751 -6.498,-7.891 -6.527,-15.855 -0.457,-10.677 3.355,-19.674 4.104,-33.678 0.234,-8.244 -1.521,-16.563 -2.17,-25.268 -0.681,-9.983 -1.8,-18.455 0.327,-19.75 3.889,-2.416 4.752,-2.592 9.36,-2.592 4.607,0 6.729,0.32 8.208,1.799 1.894,1.895 -0.011,5.951 -1.033,9.207 -2.214,4.484 -1.278,8.848 1.895,12.379 3.203,3.558 6.418,6.258 13.377,6.607 8.644,0.309 12.952,-2.301 16.589,-6.074 3.215,-3.156 6.016,-6.479 7.841,-9.58 1.526,-2.477 5.468,-10.162 6.26,-10.162 0.718,0.001 5.471,-1.655 8.135,2.233 z"
+                 id="path6888" />
+              <path
+                 style="fill:#cc9200"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.061,11.232 -32.652,17.712 -13.141,7.524 -19.908,10.979 -25.272,13.788 -5.616,3.888 -10.368,5.939 -18.828,5.292 -7.56,-0.468 -11.195,-1.728 -14.363,-4.536 -3.168,-2.736 -6.444,-7.632 -6.517,-15.264 -0.54,-10.656 3.313,-19.549 3.96,-33.229 0.181,-8.352 -1.764,-16.596 -2.483,-25.38 -0.757,-9.972 -2.017,-18.433 0.107,-19.728 3.889,-2.412 4.752,-2.592 9.36,-2.592 4.607,0 6.731,0.323 8.208,1.799 1.944,1.945 -0.108,6.084 -1.188,9.181 -2.412,4.464 -1.62,9.144 1.656,12.853 3.313,3.744 6.66,6.479 13.608,6.803 8.819,0.289 13.319,-2.483 16.991,-6.443 3.204,-3.275 5.797,-6.553 7.633,-9.756 1.512,-2.52 5.436,-10.26 6.228,-10.26 0.719,0 5.472,-1.656 8.136,2.232 z"
+                 id="path6890" />
+              <path
+                 style="fill:#d19800"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.164,11.195 -32.808,17.568 -13.057,7.318 -20.019,10.695 -25.466,13.33 -5.473,3.571 -10.03,5.592 -18.263,4.879 -7.243,-0.516 -10.761,-1.678 -13.914,-4.472 -3.153,-2.722 -6.391,-7.372 -6.506,-14.674 -0.623,-10.634 3.27,-19.422 3.816,-32.778 0.126,-8.459 -2.005,-16.627 -2.797,-25.49 -0.832,-9.961 -2.232,-18.412 -0.112,-19.707 3.889,-2.408 4.752,-2.592 9.36,-2.592 4.607,0 6.736,0.328 8.208,1.799 1.995,1.996 -0.205,6.219 -1.343,9.156 -2.61,4.442 -1.962,9.438 1.419,13.323 3.42,3.931 6.9,6.703 13.838,7.002 8.997,0.267 13.687,-2.668 17.395,-6.815 3.194,-3.395 5.577,-6.623 7.424,-9.932 1.497,-2.564 5.403,-10.357 6.195,-10.357 0.721,0 5.474,-1.656 8.138,2.232 z"
+                 id="path6892" />
+              <path
+                 style="fill:#d69e00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.27,11.16 -32.962,17.424 -12.975,7.114 -20.132,10.412 -25.661,12.874 -5.327,3.254 -9.69,5.242 -17.697,4.464 -6.927,-0.563 -10.325,-1.627 -13.464,-4.406 -3.14,-2.707 -6.337,-7.113 -6.494,-14.084 -0.706,-10.611 3.225,-19.295 3.672,-32.328 0.072,-8.567 -2.247,-16.66 -3.111,-25.603 -0.907,-9.95 -2.448,-18.39 -0.331,-19.685 3.889,-2.404 4.752,-2.592 9.36,-2.592 4.607,0 6.739,0.332 8.208,1.799 2.045,2.045 -0.302,6.352 -1.497,9.131 -2.808,4.421 -2.304,9.734 1.18,13.795 3.528,4.119 7.144,6.927 14.069,7.199 9.173,0.246 14.055,-2.851 17.799,-7.185 3.182,-3.514 5.356,-6.696 7.214,-10.108 1.483,-2.607 5.371,-10.455 6.163,-10.455 0.719,0 5.472,-1.656 8.136,2.232 z"
+                 id="path6894" />
+              <path
+                 style="fill:#dba300"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.373,11.124 -33.116,17.279 -12.893,6.91 -20.243,10.127 -25.855,12.418 -5.184,2.937 -9.353,4.892 -17.133,4.05 -6.609,-0.609 -9.889,-1.577 -13.014,-4.343 -3.125,-2.692 -6.282,-6.854 -6.483,-13.492 -0.789,-10.592 3.182,-19.17 3.528,-31.879 0.018,-8.676 -2.488,-16.692 -3.425,-25.713 -0.982,-9.94 -2.664,-18.369 -0.551,-19.664 3.889,-2.401 4.752,-2.592 9.36,-2.592 4.607,0 6.743,0.334 8.208,1.799 2.095,2.097 -0.399,6.484 -1.652,9.105 -3.006,4.398 -2.646,10.029 0.943,14.268 3.636,4.305 7.384,7.148 14.299,7.397 9.349,0.224 14.422,-3.034 18.202,-7.558 3.171,-3.631 5.137,-6.768 7.005,-10.284 1.469,-2.649 5.339,-10.552 6.131,-10.552 0.72,0.001 5.473,-1.655 8.137,2.233 z"
+                 id="path6896" />
+              <path
+                 style="fill:#e0a900"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.478,11.088 -33.271,17.136 -12.81,6.704 -20.354,9.843 -26.05,11.96 -5.04,2.62 -9.015,4.543 -16.567,3.637 -6.293,-0.656 -9.453,-1.527 -12.563,-4.277 -3.11,-2.68 -6.229,-6.596 -6.474,-12.903 -0.871,-10.569 3.141,-19.044 3.384,-31.428 -0.035,-8.784 -2.728,-16.726 -3.735,-25.826 -1.06,-9.929 -2.88,-18.347 -0.771,-19.642 3.889,-2.397 4.752,-2.592 9.36,-2.592 4.607,0 6.747,0.338 8.208,1.799 2.146,2.146 -0.497,6.617 -1.808,9.08 -3.203,4.377 -2.987,10.324 0.706,14.738 3.744,4.493 7.624,7.373 14.529,7.596 9.526,0.203 14.789,-3.217 18.605,-7.926 3.161,-3.752 4.918,-6.841 6.797,-10.463 1.454,-2.693 5.306,-10.648 6.098,-10.648 0.719,-10e-4 5.472,-1.657 8.136,2.231 z"
+                 id="path6898" />
+              <path
+                 style="fill:#e5af00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.582,11.052 -33.427,16.992 -12.726,6.498 -20.466,9.558 -26.244,11.502 -4.896,2.304 -8.676,4.193 -16.002,3.222 -5.976,-0.702 -9.018,-1.476 -12.114,-4.212 -3.096,-2.664 -6.174,-6.336 -6.462,-12.313 -0.953,-10.547 3.097,-18.918 3.24,-30.978 -0.09,-8.892 -2.97,-16.758 -4.05,-25.938 -1.134,-9.918 -3.096,-18.324 -0.99,-19.619 3.889,-2.395 4.752,-2.592 9.36,-2.592 4.607,0 6.75,0.342 8.208,1.799 2.196,2.197 -0.594,6.75 -1.962,9.055 -3.402,4.355 -3.33,10.619 0.468,15.21 3.852,4.681 7.866,7.597 14.76,7.794 9.702,0.18 15.156,-3.402 19.008,-8.298 3.15,-3.87 4.698,-6.912 6.589,-10.638 1.439,-2.736 5.273,-10.746 6.065,-10.746 0.72,0 5.473,-1.656 8.137,2.232 z"
+                 id="path6900" />
+              <path
+                 style="fill:#eab500"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.687,11.016 -33.582,16.848 -12.643,6.293 -20.576,9.274 -26.438,11.045 -4.752,1.987 -8.338,3.846 -15.438,2.809 -5.658,-0.75 -8.582,-1.426 -11.664,-4.147 -3.08,-2.649 -6.119,-6.077 -6.45,-11.722 -1.037,-10.526 3.053,-18.792 3.096,-30.528 -0.144,-9 -3.211,-16.79 -4.363,-26.049 -1.21,-9.907 -3.312,-18.304 -1.21,-19.599 3.889,-2.391 4.752,-2.592 9.36,-2.592 4.607,0 6.754,0.346 8.208,1.799 2.247,2.248 -0.691,6.885 -2.117,9.029 -3.6,4.336 -3.672,10.916 0.231,15.682 3.96,4.867 8.106,7.82 14.989,7.992 9.879,0.158 15.523,-3.586 19.411,-8.668 3.141,-3.99 4.479,-6.984 6.38,-10.814 1.426,-2.78 5.241,-10.844 6.033,-10.844 0.721,-10e-4 5.474,-1.657 8.138,2.231 z"
+                 id="path6902" />
+              <path
+                 style="fill:#efba00"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.791,10.98 -33.735,16.703 -12.562,6.089 -20.69,8.99 -26.633,10.589 -4.608,1.67 -7.999,3.496 -14.872,2.394 -5.343,-0.796 -8.147,-1.375 -11.215,-4.082 -3.066,-2.636 -6.065,-5.818 -6.439,-11.132 -1.12,-10.504 3.009,-18.666 2.952,-30.077 -0.198,-9.109 -3.453,-16.822 -4.677,-26.162 -1.285,-9.896 -3.528,-18.281 -1.43,-19.576 3.889,-2.387 4.752,-2.592 9.36,-2.592 4.607,0 6.757,0.35 8.208,1.799 2.297,2.297 -0.788,7.018 -2.271,9.004 -3.798,4.314 -4.014,11.211 -0.008,16.154 4.068,5.055 8.35,8.043 15.221,8.189 10.056,0.137 15.892,-3.77 19.815,-9.039 3.128,-4.107 4.258,-7.057 6.17,-10.99 1.411,-2.824 5.209,-10.941 6.001,-10.941 0.72,-10e-4 5.473,-1.657 8.137,2.231 z"
+                 id="path6904" />
+              <path
+                 style="fill:#f4c000"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.896,10.943 -33.891,16.561 -12.478,5.883 -20.801,8.704 -26.827,10.131 -4.464,1.353 -7.661,3.146 -14.307,1.979 -5.025,-0.843 -7.711,-1.325 -10.765,-4.019 -3.053,-2.621 -6.012,-5.558 -6.429,-10.541 -1.203,-10.482 2.966,-18.539 2.809,-29.627 -0.253,-9.217 -3.694,-16.855 -4.99,-26.272 -1.361,-9.886 -3.744,-18.261 -1.649,-19.556 3.889,-2.383 4.752,-2.592 9.36,-2.592 4.607,0 6.761,0.353 8.208,1.799 2.347,2.349 -0.885,7.15 -2.426,8.979 -3.996,4.291 -4.356,11.505 -0.245,16.625 4.176,5.241 8.59,8.265 15.451,8.388 10.23,0.115 16.258,-3.953 20.218,-9.41 3.117,-4.227 4.039,-7.129 5.961,-11.168 1.396,-2.865 5.177,-11.037 5.969,-11.037 0.72,0 5.473,-1.656 8.137,2.232 z"
+                 id="path6906" />
+              <path
+                 style="fill:#f9c600"
+                 inkscape:connector-curvature="0"
+                 d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -21.999,10.908 -34.046,16.416 -12.395,5.678 -20.912,8.421 -27.021,9.674 -4.32,1.036 -7.322,2.797 -13.741,1.566 -4.709,-0.891 -7.275,-1.275 -10.314,-3.953 -3.037,-2.607 -5.958,-5.299 -6.419,-9.951 -1.284,-10.461 2.925,-18.414 2.664,-29.178 -0.306,-9.324 -3.934,-16.887 -5.302,-26.385 -1.437,-9.875 -3.96,-18.238 -1.869,-19.533 3.889,-2.379 4.752,-2.592 9.36,-2.592 4.607,0 6.765,0.356 8.208,1.799 2.397,2.398 -0.983,7.283 -2.581,8.955 -4.194,4.269 -4.698,11.799 -0.482,17.096 4.284,5.429 8.83,8.488 15.682,8.586 10.407,0.094 16.625,-4.137 20.621,-9.781 3.106,-4.345 3.819,-7.199 5.753,-11.344 1.382,-2.909 5.144,-11.135 5.936,-11.135 0.718,0 5.471,-1.656 8.135,2.232 z"
+                 id="path6908" />
+            </g>
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 303.631,262.529 c 4.464,6.479 -0.145,14.904 3.096,20.089 5.328,8.496 16.056,17.063 20.16,19.439 2.952,1.8 7.128,3.527 6.983,8.783 -0.216,5.977 -3.168,7.561 -4.823,9.217 -3.313,3.313 -22.104,10.872 -34.2,16.271 -12.313,5.473 -21.024,8.137 -27.217,9.217 -4.176,0.72 -6.983,2.447 -13.176,1.151 -4.392,-0.937 -6.84,-1.224 -9.864,-3.888 -3.023,-2.592 -5.903,-5.04 -6.407,-9.359 -1.368,-10.441 2.88,-18.289 2.52,-28.729 -0.36,-9.432 -4.176,-16.92 -5.616,-26.496 -1.512,-9.864 -4.176,-18.217 -2.088,-19.512 3.889,-2.377 4.752,-2.592 9.36,-2.592 4.607,0 6.768,0.359 8.208,1.799 2.448,2.449 -1.08,7.416 -2.736,8.929 -4.392,4.248 -5.04,12.096 -0.72,17.567 4.392,5.617 9.072,8.713 15.912,8.785 10.584,0.071 16.992,-4.32 21.023,-10.152 3.097,-4.465 3.601,-7.272 5.544,-11.521 1.368,-2.952 5.112,-11.231 5.904,-11.231 0.72,0.001 5.473,-1.655 8.137,2.233 z"
+               id="path6910" />
+          </g>
+          <g
+             id="g6912">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 236.263,275.762 c -0.709,-0.258 -3.932,-15.209 -2.191,-16.239 3.351,-1.997 4.253,-2.319 8.377,-2.319 4.124,0 6.057,0.322 7.346,1.61 2.126,2.127 -1.159,6.702 -2.448,7.991 -3.738,3.673 -10.375,9.215 -11.084,8.957 z"
+               id="path6914" />
+            <g
+               id="g6916">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 236.492,275.286 c -0.77,-0.326 -4.102,-14.719 -2.368,-15.742 3.344,-1.992 4.278,-2.211 8.322,-2.211 4.124,0 5.976,0.269 7.282,1.602 2.105,2.136 -1.119,6.572 -2.398,7.852 -3.727,3.663 -10.081,8.811 -10.838,8.499 z"
+                 id="path6918" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 236.721,274.809 c -0.832,-0.393 -4.273,-14.229 -2.547,-15.247 3.339,-1.983 4.306,-2.101 8.269,-2.101 4.124,0 5.896,0.213 7.217,1.592 2.087,2.146 -1.076,6.443 -2.346,7.714 -3.718,3.653 -9.788,8.409 -10.593,8.042 z"
+                 id="path6920" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 236.949,274.333 c -0.892,-0.461 -4.443,-13.74 -2.722,-14.75 3.331,-1.979 4.33,-1.992 8.213,-1.992 4.124,0 5.814,0.158 7.151,1.582 2.068,2.156 -1.033,6.316 -2.294,7.574 -3.707,3.644 -9.494,8.007 -10.348,7.586 z"
+                 id="path6922" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 237.178,273.855 c -0.954,-0.528 -4.614,-13.249 -2.9,-14.254 3.326,-1.972 4.355,-1.882 8.158,-1.882 4.124,0 5.734,0.104 7.089,1.572 2.048,2.166 -0.993,6.187 -2.243,7.437 -3.699,3.634 -9.202,7.605 -10.104,7.127 z"
+                 id="path6924" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 237.407,273.377 c -1.015,-0.596 -4.785,-12.758 -3.077,-13.758 3.319,-1.965 4.382,-1.771 8.104,-1.771 4.124,0 5.653,0.049 7.023,1.563 2.029,2.176 -0.951,6.057 -2.19,7.299 -3.69,3.623 -8.91,7.201 -9.86,6.667 z"
+                 id="path6926" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 237.636,272.901 c -1.077,-0.662 -4.956,-12.27 -3.256,-13.261 3.313,-1.959 4.408,-1.663 8.05,-1.663 4.124,0 5.573,-0.006 6.959,1.553 2.01,2.186 -0.908,5.93 -2.14,7.159 -3.679,3.614 -8.615,6.8 -9.613,6.212 z"
+                 id="path6928" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 237.864,272.424 c -1.137,-0.731 -5.126,-11.779 -3.431,-12.766 3.306,-1.951 4.433,-1.553 7.994,-1.553 4.123,0 5.492,-0.061 6.895,1.543 1.991,2.193 -0.867,5.801 -2.089,7.021 -3.669,3.606 -8.321,6.397 -9.369,5.755 z"
+                 id="path6930" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 238.093,271.948 c -1.197,-0.799 -5.297,-11.289 -3.607,-12.27 3.299,-1.946 4.459,-1.443 7.938,-1.443 4.124,0 5.412,-0.115 6.83,1.533 1.973,2.204 -0.824,5.671 -2.037,6.883 -3.659,3.596 -8.028,5.993 -9.124,5.297 z"
+                 id="path6932" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 238.322,271.471 c -1.26,-0.867 -5.468,-10.801 -3.786,-11.773 3.293,-1.939 4.485,-1.334 7.884,-1.334 4.124,0 5.332,-0.171 6.767,1.524 1.953,2.213 -0.783,5.542 -1.985,6.743 -3.651,3.586 -7.736,5.591 -8.88,4.84 z"
+                 id="path6934" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 238.551,270.995 c -1.32,-0.935 -5.639,-10.312 -3.963,-11.277 3.286,-1.934 4.511,-1.225 7.829,-1.225 4.124,0 5.252,-0.226 6.702,1.514 1.934,2.224 -0.741,5.414 -1.934,6.605 -3.64,3.576 -7.442,5.187 -8.634,4.383 z"
+                 id="path6936" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 238.779,270.517 c -1.382,-1.002 -5.809,-9.821 -4.14,-10.781 3.279,-1.926 4.535,-1.114 7.774,-1.114 4.124,0 5.171,-0.279 6.637,1.504 1.914,2.233 -0.698,5.285 -1.882,6.467 -3.63,3.566 -7.148,4.784 -8.389,3.924 z"
+                 id="path6938" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 239.008,270.04 c -1.442,-1.068 -5.979,-9.33 -4.316,-10.283 3.272,-1.922 4.562,-1.006 7.72,-1.006 4.124,0 5.09,-0.334 6.572,1.494 1.895,2.244 -0.657,5.156 -1.83,6.328 -3.622,3.556 -6.857,4.383 -8.146,3.467 z"
+                 id="path6940" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 239.237,269.563 c -1.505,-1.137 -6.151,-8.841 -4.495,-9.788 3.267,-1.914 4.588,-0.896 7.666,-0.896 4.124,0 5.009,-0.389 6.508,1.486 1.875,2.252 -0.616,5.025 -1.778,6.188 -3.613,3.548 -6.564,3.981 -7.901,3.01 z"
+                 id="path6942" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 239.466,269.086 c -1.565,-1.205 -6.321,-8.352 -4.672,-9.293 3.262,-1.906 4.613,-0.785 7.61,-0.785 4.124,0 4.93,-0.444 6.444,1.476 1.855,2.261 -0.573,4.897 -1.728,6.052 -3.601,3.537 -6.269,3.575 -7.654,2.55 z"
+                 id="path6944" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 239.694,268.61 c -1.627,-1.273 -6.492,-7.861 -4.849,-8.796 3.255,-1.901 4.64,-0.677 7.556,-0.677 4.124,0 4.849,-0.499 6.379,1.466 1.837,2.271 -0.531,4.769 -1.675,5.912 -3.593,3.528 -5.977,3.174 -7.411,2.095 z"
+                 id="path6946" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 239.923,268.133 c -1.688,-1.34 -6.663,-7.373 -5.025,-8.301 3.248,-1.895 4.665,-0.566 7.501,-0.566 4.124,0 4.768,-0.555 6.314,1.456 1.817,2.28 -0.489,4.64 -1.624,5.774 -3.583,3.519 -5.684,2.771 -7.166,1.637 z"
+                 id="path6948" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 240.152,267.657 c -1.749,-1.408 -6.834,-6.883 -5.203,-7.805 3.241,-1.889 4.69,-0.457 7.446,-0.457 4.124,0 4.687,-0.609 6.25,1.447 1.798,2.289 -0.448,4.51 -1.573,5.635 -3.572,3.509 -5.39,2.367 -6.92,1.18 z"
+                 id="path6950" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 240.381,267.178 c -1.811,-1.475 -7.005,-6.391 -5.381,-7.307 3.235,-1.881 4.717,-0.348 7.393,-0.348 4.124,0 4.606,-0.664 6.185,1.438 1.779,2.299 -0.405,4.381 -1.521,5.496 -3.564,3.501 -5.098,1.965 -6.676,0.721 z"
+                 id="path6952" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 240.609,266.702 c -1.871,-1.543 -7.175,-5.902 -5.557,-6.811 3.228,-1.875 4.741,-0.238 7.336,-0.238 4.124,0 4.526,-0.719 6.122,1.428 1.759,2.31 -0.364,4.252 -1.471,5.357 -3.552,3.49 -4.803,1.562 -6.43,0.264 z"
+                 id="path6954" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 240.838,266.225 c -1.933,-1.611 -7.346,-5.413 -5.734,-6.314 3.222,-1.869 4.768,-0.129 7.281,-0.129 4.124,0 4.446,-0.773 6.058,1.418 1.74,2.318 -0.322,4.123 -1.418,5.219 -3.545,3.48 -4.512,1.16 -6.187,-0.194 z"
+               id="path6956" />
+          </g>
+          <g
+             id="g6958">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 302.769,263.374 c 3.742,5.461 -0.062,12.76 2.638,17.117 -6.809,-6.258 -9.938,-8.834 -19.324,0.367 2.577,-3.742 3.129,-6.257 4.725,-9.814 1.104,-2.455 4.354,-9.57 5.029,-9.57 0.613,-10e-4 4.724,-1.35 6.932,1.9 z"
+               id="path6960" />
+            <g
+               id="g6962">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 302.73,263.413 c 3.655,5.334 0.035,12.601 2.578,16.723 -6.668,-6.098 -9.729,-8.666 -18.908,0.322 2.421,-3.527 3.025,-6.094 4.605,-9.592 1.122,-2.462 4.243,-9.302 4.951,-9.311 0.628,-0.008 4.617,-1.318 6.774,1.858 z"
+                 id="path6964" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 302.691,263.45 c 3.568,5.209 0.132,12.441 2.517,16.332 -6.526,-5.938 -9.519,-8.5 -18.492,0.277 2.268,-3.314 2.924,-5.934 4.488,-9.372 1.141,-2.468 4.132,-9.032 4.873,-9.052 0.641,-0.013 4.508,-1.284 6.614,1.815 z"
+                 id="path6966" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 302.652,263.487 c 3.48,5.086 0.229,12.282 2.457,15.939 -6.386,-5.777 -9.311,-8.332 -18.076,0.232 2.111,-3.1 2.819,-5.771 4.369,-9.15 1.158,-2.475 4.021,-8.762 4.795,-8.791 0.655,-0.019 4.399,-1.254 6.455,1.77 z"
+                 id="path6968" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 302.614,263.524 c 3.393,4.96 0.323,12.123 2.396,15.549 -6.245,-5.617 -9.102,-8.164 -17.66,0.188 1.955,-2.887 2.716,-5.611 4.251,-8.93 1.176,-2.481 3.91,-8.494 4.716,-8.533 0.67,-0.027 4.291,-1.219 6.297,1.726 z"
+                 id="path6970" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 302.575,263.562 c 3.306,4.835 0.419,11.964 2.335,15.155 -6.104,-5.457 -8.891,-7.996 -17.244,0.143 1.8,-2.673 2.613,-5.449 4.133,-8.707 1.194,-2.488 3.8,-8.225 4.638,-8.273 0.684,-0.036 4.182,-1.189 6.138,1.682 z"
+                 id="path6972" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 302.536,263.599 c 3.219,4.71 0.517,11.805 2.275,14.765 -5.963,-5.299 -8.683,-7.83 -16.828,0.098 1.644,-2.461 2.51,-5.289 4.015,-8.486 1.212,-2.496 3.688,-7.956 4.559,-8.016 0.698,-0.04 4.075,-1.155 5.979,1.639 z"
+                 id="path6974" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 302.497,263.637 c 3.131,4.585 0.612,11.645 2.216,14.371 -5.822,-5.137 -8.474,-7.661 -16.413,0.053 1.489,-2.245 2.406,-5.125 3.896,-8.264 1.229,-2.504 3.576,-7.688 4.479,-7.756 0.714,-0.046 3.968,-1.123 5.822,1.596 z"
+                 id="path6976" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 302.458,263.674 c 3.044,4.459 0.708,11.486 2.154,13.979 -5.681,-4.978 -8.263,-7.493 -15.996,0.009 1.334,-2.033 2.303,-4.965 3.779,-8.043 1.247,-2.511 3.464,-7.418 4.4,-7.498 0.728,-0.052 3.859,-1.089 5.663,1.553 z"
+                 id="path6978" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 302.42,263.711 c 2.956,4.336 0.804,11.328 2.094,13.588 -5.54,-4.817 -8.055,-7.326 -15.58,-0.036 1.178,-1.819 2.199,-4.804 3.659,-7.822 1.267,-2.517 3.354,-7.149 4.323,-7.237 0.741,-0.061 3.75,-1.058 5.504,1.507 z"
+                 id="path6980" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 302.381,263.749 c 2.868,4.211 0.9,11.168 2.033,13.196 -5.398,-4.657 -7.845,-7.159 -15.164,-0.081 1.022,-1.605 2.097,-4.642 3.542,-7.601 1.283,-2.524 3.241,-6.88 4.244,-6.979 0.755,-0.067 3.642,-1.026 5.345,1.465 z"
+                 id="path6982" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 302.342,263.788 c 2.78,4.084 0.997,11.008 1.973,12.803 -5.258,-4.498 -7.635,-6.991 -14.748,-0.127 0.867,-1.391 1.994,-4.479 3.424,-7.379 1.302,-2.531 3.13,-6.61 4.166,-6.719 0.768,-0.074 3.532,-0.992 5.185,1.422 z"
+                 id="path6984" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 302.302,263.825 c 2.693,3.959 1.093,10.85 1.913,12.411 -5.117,-4.338 -7.427,-6.825 -14.333,-0.172 0.713,-1.177 1.891,-4.317 3.307,-7.157 1.318,-2.537 3.018,-6.342 4.086,-6.461 0.784,-0.08 3.426,-0.959 5.027,1.379 z"
+                 id="path6986" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 302.263,263.862 c 2.606,3.834 1.188,10.689 1.853,12.02 -4.976,-4.178 -7.217,-6.657 -13.916,-0.217 0.556,-0.963 1.786,-4.156 3.188,-6.936 1.337,-2.545 2.906,-6.072 4.008,-6.202 0.797,-0.086 3.318,-0.927 4.867,1.335 z"
+                 id="path6988" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 302.225,263.899 c 2.519,3.71 1.285,10.531 1.791,11.628 -4.835,-4.019 -7.008,-6.489 -13.5,-0.262 0.4,-0.75 1.684,-3.994 3.068,-6.714 1.356,-2.553 2.797,-5.805 3.931,-5.943 0.813,-0.093 3.209,-0.895 4.71,1.291 z"
+                 id="path6990" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 302.186,263.937 c 2.431,3.584 1.381,10.371 1.73,11.235 -4.693,-3.857 -6.798,-6.322 -13.084,-0.307 0.245,-0.535 1.58,-3.832 2.951,-6.492 1.373,-2.56 2.686,-5.535 3.852,-5.685 0.828,-0.1 3.101,-0.861 4.551,1.249 z"
+                 id="path6992" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 302.147,263.974 c 2.344,3.46 1.477,10.213 1.671,10.845 -4.553,-3.699 -6.589,-6.156 -12.668,-0.354 0.089,-0.321 1.477,-3.67 2.832,-6.271 1.392,-2.565 2.574,-5.267 3.772,-5.425 0.842,-0.104 2.994,-0.828 4.393,1.205 z"
+                 id="path6994" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 302.108,264.012 c 2.257,3.334 1.573,10.053 1.61,10.451 -4.412,-3.537 -6.38,-5.987 -12.253,-0.396 -0.064,-0.109 1.374,-3.51 2.716,-6.05 1.408,-2.573 2.462,-4.997 3.693,-5.166 0.856,-0.112 2.886,-0.796 4.234,1.161 z"
+                 id="path6996" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 302.069,264.049 c 2.17,3.209 1.67,9.894 1.55,10.061 -4.271,-3.379 -6.17,-5.82 -11.836,-0.441 -0.221,0.104 1.271,-3.35 2.596,-5.83 1.428,-2.58 2.352,-4.728 3.615,-4.906 0.87,-0.12 2.777,-0.765 4.075,1.116 z"
+                 id="path6998" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 302.03,264.086 c 2.082,3.084 1.767,9.736 1.49,9.668 -4.131,-3.219 -5.961,-5.652 -11.42,-0.486 -0.377,0.318 1.167,-3.188 2.478,-5.607 1.445,-2.586 2.239,-4.459 3.536,-4.647 0.884,-0.127 2.669,-0.732 3.916,1.072 z"
+                 id="path7000" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 301.991,264.124 c 1.995,2.959 1.862,9.576 1.43,9.277 -3.989,-3.059 -5.752,-5.486 -11.005,-0.531 -0.532,0.531 1.064,-3.027 2.36,-5.387 1.463,-2.594 2.128,-4.189 3.458,-4.389 0.899,-0.133 2.561,-0.699 3.757,1.03 z"
+               id="path7002" />
+          </g>
+          <g
+             id="g7004">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 305.862,283.481 c 5.977,7.848 17.064,16.271 21.024,18.576 2.88,1.656 7.056,3.6 6.983,8.783 -0.144,5.904 -3.168,7.561 -4.823,9.217 -3.313,3.313 -22.177,10.943 -34.2,16.271 -12.24,5.4 -21.097,8.209 -27.217,9.217 -4.104,0.647 -7.056,2.375 -13.176,1.151 -4.32,-0.864 -6.912,-1.296 -9.864,-3.888 -2.951,-2.52 -5.976,-5.184 -6.407,-9.359 -1.225,-10.369 3.672,-16.921 8.424,-25.921 3.888,-7.2 11.735,-8.64 16.632,-7.991 17.568,2.375 16.416,-8.641 21.24,-13.465 4.464,-4.463 17.208,-8.064 21.384,-2.591 z"
+               id="path7006" />
+            <g
+               id="g7008">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 305.81,283.553 c 5.962,7.83 17.024,16.234 20.975,18.533 2.873,1.652 7.039,3.592 6.969,8.764 -0.145,5.891 -3.161,7.542 -4.813,9.195 -3.304,3.304 -22.34,10.992 -34.24,16.088 -12.259,5.176 -20.647,7.873 -26.802,8.959 -4.077,0.684 -7.156,2.394 -13.258,1.177 -4.304,-0.854 -6.767,-1.231 -9.707,-3.812 -2.939,-2.51 -5.756,-4.961 -6.185,-9.117 -1.211,-10.34 3.365,-16.657 8.044,-25.65 3.89,-7.375 11.791,-8.434 16.665,-7.777 17.514,2.414 16.206,-8.959 21.02,-13.772 4.452,-4.454 17.166,-8.047 21.332,-2.588 z"
+                 id="path7010" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 305.76,283.627 c 5.946,7.812 16.982,16.195 20.925,18.488 2.866,1.648 7.022,3.584 6.951,8.743 -0.144,5.876 -3.153,7.524 -4.801,9.173 -3.298,3.297 -22.506,11.043 -34.28,15.907 -12.279,4.949 -20.201,7.538 -26.389,8.699 -4.051,0.721 -7.256,2.413 -13.341,1.202 -4.286,-0.846 -6.619,-1.168 -9.55,-3.733 -2.924,-2.501 -5.536,-4.741 -5.959,-8.877 -1.198,-10.312 3.058,-16.394 7.664,-25.379 3.89,-7.552 11.845,-8.229 16.698,-7.563 17.458,2.453 15.995,-9.279 20.797,-14.08 4.443,-4.443 17.127,-8.026 21.285,-2.58 z"
+                 id="path7012" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 305.707,283.702 c 5.935,7.791 16.943,16.156 20.876,18.444 2.859,1.644 7.007,3.574 6.935,8.722 -0.144,5.862 -3.146,7.508 -4.79,9.151 -3.288,3.289 -22.668,11.093 -34.319,15.726 -12.298,4.723 -19.753,7.202 -25.974,8.44 -4.024,0.756 -7.357,2.431 -13.423,1.226 -4.27,-0.836 -6.473,-1.101 -9.394,-3.654 -2.911,-2.492 -5.317,-4.52 -5.735,-8.635 -1.185,-10.285 2.75,-16.133 7.284,-25.109 3.892,-7.727 11.9,-8.023 16.731,-7.35 17.402,2.494 15.785,-9.599 20.575,-14.389 4.433,-4.432 17.087,-8.007 21.234,-2.572 z"
+                 id="path7014" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 305.655,283.774 c 5.92,7.773 16.904,16.119 20.826,18.4 2.854,1.642 6.99,3.566 6.919,8.703 -0.143,5.848 -3.138,7.488 -4.779,9.129 -3.28,3.281 -22.832,11.143 -34.358,15.543 -12.317,4.498 -19.307,6.867 -25.561,8.182 -3.997,0.793 -7.457,2.45 -13.506,1.251 -4.252,-0.828 -6.325,-1.036 -9.236,-3.577 -2.896,-2.482 -5.096,-4.298 -5.51,-8.393 -1.172,-10.258 2.443,-15.869 6.904,-24.84 3.892,-7.901 11.955,-7.818 16.763,-7.135 17.349,2.532 15.576,-9.918 20.355,-14.697 4.422,-4.422 17.046,-7.987 21.183,-2.566 z"
+                 id="path7016" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 305.603,283.847 c 5.906,7.756 16.864,16.081 20.777,18.358 2.846,1.635 6.973,3.557 6.901,8.68 -0.142,5.835 -3.131,7.472 -4.767,9.107 -3.273,3.273 -22.997,11.193 -34.399,15.361 -12.337,4.273 -18.858,6.533 -25.146,7.924 -3.971,0.829 -7.557,2.469 -13.588,1.276 -4.234,-0.82 -6.179,-0.972 -9.078,-3.5 -2.884,-2.474 -4.878,-4.076 -5.287,-8.152 -1.158,-10.229 2.137,-15.606 6.523,-24.569 3.895,-8.076 12.01,-7.611 16.797,-6.92 17.293,2.571 15.366,-10.236 20.134,-15.004 4.412,-4.411 17.006,-7.969 21.133,-2.561 z"
+                 id="path7018" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 305.552,283.92 c 5.892,7.736 16.824,16.043 20.728,18.313 2.839,1.634 6.957,3.55 6.886,8.66 -0.142,5.821 -3.124,7.454 -4.756,9.086 -3.266,3.267 -23.161,11.243 -34.438,15.179 -12.356,4.047 -18.411,6.198 -24.733,7.666 -3.943,0.865 -7.656,2.486 -13.67,1.301 -4.218,-0.812 -6.032,-0.908 -8.922,-3.422 -2.869,-2.465 -4.656,-3.855 -5.063,-7.91 -1.145,-10.203 1.83,-15.344 6.145,-24.299 3.895,-8.252 12.064,-7.408 16.83,-6.707 17.237,2.61 15.154,-10.557 19.912,-15.313 4.399,-4.399 16.963,-7.949 21.081,-2.554 z"
+                 id="path7020" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 305.501,283.993 c 5.877,7.719 16.782,16.004 20.678,18.271 2.833,1.628 6.939,3.54 6.869,8.639 -0.143,5.807 -3.116,7.436 -4.745,9.064 -3.257,3.258 -23.324,11.293 -34.479,14.996 -12.375,3.822 -17.963,5.863 -24.319,7.408 -3.917,0.9 -7.757,2.504 -13.752,1.324 -4.2,-0.802 -5.886,-0.842 -8.765,-3.344 -2.856,-2.454 -4.438,-3.633 -4.838,-7.669 -1.132,-10.173 1.521,-15.081 5.764,-24.029 3.896,-8.426 12.119,-7.2 16.863,-6.491 17.183,2.649 14.945,-10.875 19.689,-15.621 4.391,-4.389 16.926,-7.93 21.035,-2.548 z"
+                 id="path7022" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 305.448,284.066 c 5.863,7.701 16.743,15.966 20.629,18.228 2.826,1.625 6.924,3.531 6.853,8.619 -0.142,5.793 -3.108,7.418 -4.733,9.043 -3.25,3.25 -23.489,11.342 -34.518,14.813 -12.396,3.598 -17.517,5.529 -23.905,7.148 -3.891,0.938 -7.857,2.524 -13.834,1.351 -4.185,-0.793 -5.74,-0.776 -8.609,-3.267 -2.841,-2.444 -4.217,-3.412 -4.613,-7.426 -1.118,-10.146 1.216,-14.818 5.385,-23.76 3.896,-8.602 12.174,-6.996 16.896,-6.277 17.128,2.688 14.735,-11.195 19.468,-15.929 4.378,-4.38 16.883,-7.911 20.981,-2.543 z"
+                 id="path7024" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 305.396,284.139 c 5.85,7.682 16.703,15.928 20.579,18.184 2.82,1.62 6.907,3.523 6.837,8.598 -0.141,5.779 -3.101,7.4 -4.722,9.021 -3.242,3.242 -23.653,11.393 -34.559,14.631 -12.414,3.372 -17.068,5.194 -23.491,6.891 -3.862,0.975 -7.957,2.543 -13.917,1.375 -4.167,-0.783 -5.592,-0.713 -8.451,-3.188 -2.827,-2.437 -3.997,-3.19 -4.389,-7.187 -1.105,-10.117 0.908,-14.555 5.004,-23.487 3.898,-8.776 12.229,-6.79 16.928,-6.063 17.074,2.728 14.525,-11.515 19.248,-16.236 4.37,-4.371 16.845,-7.894 20.933,-2.539 z"
+                 id="path7026" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 305.344,284.211 c 5.836,7.664 16.663,15.891 20.529,18.141 2.813,1.617 6.892,3.516 6.82,8.578 -0.14,5.765 -3.093,7.382 -4.71,8.999 -3.235,3.233 -23.817,11.442 -34.598,14.448 -12.434,3.146 -16.621,4.859 -23.077,6.633 -3.837,1.01 -8.058,2.561 -13.999,1.4 -4.15,-0.775 -5.446,-0.648 -8.295,-3.111 -2.814,-2.426 -3.777,-2.969 -4.164,-6.944 -1.094,-10.09 0.601,-14.293 4.624,-23.22 3.898,-8.951 12.282,-6.584 16.961,-5.848 17.019,2.767 14.314,-11.834 19.025,-16.545 4.361,-4.359 16.806,-7.872 20.884,-2.531 z"
+                 id="path7028" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 305.292,284.286 c 5.822,7.646 16.623,15.852 20.481,18.096 2.806,1.613 6.874,3.507 6.804,8.558 -0.141,5.751 -3.086,7.364 -4.699,8.978 -3.227,3.227 -23.981,11.492 -34.638,14.267 -12.453,2.921 -16.173,4.524 -22.663,6.374 -3.81,1.046 -8.158,2.578 -14.082,1.424 -4.133,-0.766 -5.299,-0.583 -8.137,-3.033 -2.801,-2.416 -3.558,-2.748 -3.94,-6.703 -1.08,-10.062 0.293,-14.029 4.244,-22.947 3.9,-9.127 12.338,-6.379 16.994,-5.635 16.964,2.805 14.105,-12.152 18.805,-16.853 4.348,-4.351 16.763,-7.856 20.831,-2.526 z"
+                 id="path7030" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 305.241,284.358 c 5.808,7.627 16.582,15.814 20.432,18.053 2.799,1.609 6.856,3.498 6.787,8.536 -0.141,5.738 -3.079,7.347 -4.688,8.957 -3.219,3.218 -24.145,11.541 -34.677,14.084 -12.473,2.695 -15.727,4.188 -22.25,6.115 -3.783,1.083 -8.258,2.599 -14.163,1.448 -4.116,-0.756 -5.153,-0.518 -7.981,-2.954 -2.786,-2.408 -3.337,-2.526 -3.716,-6.462 -1.066,-10.034 -0.013,-13.766 3.864,-22.678 3.901,-9.303 12.393,-6.172 17.027,-5.42 16.908,2.844 13.896,-12.473 18.583,-17.16 4.338,-4.337 16.723,-7.835 20.782,-2.519 z"
+                 id="path7032" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 305.189,284.431 c 5.793,7.608 16.542,15.776 20.382,18.009 2.792,1.605 6.84,3.49 6.771,8.516 -0.14,5.725 -3.071,7.33 -4.677,8.936 -3.211,3.211 -24.309,11.591 -34.717,13.902 -12.491,2.47 -15.278,3.854 -21.836,5.856 -3.756,1.119 -8.357,2.616 -14.246,1.474 -4.099,-0.748 -5.006,-0.453 -7.823,-2.877 -2.772,-2.398 -3.118,-2.306 -3.492,-6.22 -1.053,-10.007 -0.319,-13.505 3.484,-22.407 3.903,-9.479 12.448,-5.969 17.062,-5.207 16.853,2.883 13.684,-12.791 18.36,-17.469 4.328,-4.328 16.683,-7.819 20.732,-2.513 z"
+                 id="path7034" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 305.137,284.504 c 5.778,7.59 16.503,15.736 20.332,17.965 2.786,1.602 6.825,3.482 6.755,8.496 -0.139,5.709 -3.064,7.311 -4.665,8.912 -3.204,3.203 -24.474,11.642 -34.759,13.721 -12.51,2.244 -14.829,3.52 -21.421,5.598 -3.729,1.155 -8.457,2.635 -14.327,1.499 -4.082,-0.739 -4.86,-0.389 -7.667,-2.8 -2.76,-2.389 -2.897,-2.083 -3.268,-5.979 -1.04,-9.979 -0.627,-13.24 3.104,-22.138 3.903,-9.653 12.503,-5.762 17.093,-4.991 16.799,2.922 13.475,-13.111 18.141,-17.777 4.318,-4.316 16.643,-7.799 20.682,-2.506 z"
+                 id="path7036" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 305.086,284.579 c 5.765,7.57 16.463,15.697 20.282,17.92 2.779,1.599 6.809,3.474 6.738,8.476 -0.139,5.696 -3.056,7.293 -4.654,8.892 -3.194,3.194 -24.637,11.69 -34.797,13.536 -12.529,2.021 -14.382,3.185 -21.007,5.341 -3.703,1.191 -8.559,2.652 -14.411,1.523 -4.065,-0.73 -4.713,-0.324 -7.509,-2.723 -2.745,-2.379 -2.679,-1.861 -3.043,-5.735 -1.027,-9.952 -0.936,-12.979 2.724,-21.868 3.905,-9.828 12.557,-5.557 17.126,-4.777 16.744,2.961 13.265,-13.431 17.919,-18.084 4.307,-4.309 16.602,-7.783 20.632,-2.501 z"
+                 id="path7038" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 305.033,284.651 c 5.752,7.553 16.423,15.66 20.234,17.878 2.771,1.593 6.791,3.464 6.722,8.454 -0.139,5.682 -3.049,7.275 -4.643,8.869 -3.188,3.188 -24.801,11.74 -34.838,13.355 -12.548,1.793 -13.935,2.85 -20.593,5.082 -3.676,1.228 -8.658,2.67 -14.493,1.547 -4.048,-0.721 -4.565,-0.258 -7.353,-2.644 -2.731,-2.37 -2.457,-1.64 -2.818,-5.495 -1.014,-9.923 -1.242,-12.716 2.345,-21.597 3.905,-10.004 12.611,-5.351 17.158,-4.563 16.689,3 13.055,-13.75 17.698,-18.393 4.297,-4.295 16.562,-7.761 20.581,-2.493 z"
+                 id="path7040" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 304.982,284.724 c 5.737,7.534 16.382,15.622 20.184,17.834 2.766,1.59 6.774,3.456 6.705,8.433 -0.138,5.67 -3.041,7.26 -4.631,8.85 -3.18,3.179 -24.966,11.789 -34.877,13.172 -12.568,1.568 -13.487,2.515 -20.179,4.824 -3.65,1.263 -8.759,2.688 -14.575,1.572 -4.031,-0.713 -4.42,-0.195 -7.196,-2.566 -2.718,-2.361 -2.238,-1.42 -2.594,-5.254 -1.001,-9.896 -1.549,-12.453 1.964,-21.328 3.907,-10.178 12.666,-5.145 17.192,-4.348 16.634,3.039 12.844,-14.068 17.476,-18.701 4.285,-4.286 16.521,-7.743 20.531,-2.488 z"
+                 id="path7042" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 304.93,284.797 c 5.723,7.516 16.342,15.584 20.135,17.789 2.758,1.588 6.758,3.449 6.688,8.414 -0.138,5.654 -3.034,7.24 -4.619,8.826 -3.173,3.172 -25.13,11.84 -34.918,12.99 -12.587,1.344 -13.039,2.18 -19.766,4.564 -3.622,1.301 -8.856,2.709 -14.657,1.599 -4.014,-0.704 -4.272,-0.13 -7.039,-2.489 -2.702,-2.352 -2.018,-1.197 -2.369,-5.012 -0.987,-9.868 -1.855,-12.189 1.584,-21.057 3.908,-10.354 12.722,-4.94 17.226,-4.135 16.578,3.078 12.634,-14.389 17.254,-19.009 4.275,-4.273 16.481,-7.721 20.481,-2.48 z"
+                 id="path7044" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 304.879,284.87 c 5.709,7.498 16.302,15.547 20.085,17.748 2.752,1.582 6.741,3.438 6.673,8.391 -0.139,5.642 -3.027,7.224 -4.609,8.806 -3.164,3.164 -25.293,11.89 -34.956,12.808 -12.606,1.119 -12.592,1.844 -19.352,4.308 -3.596,1.336 -8.958,2.726 -14.739,1.622 -3.997,-0.695 -4.127,-0.065 -6.882,-2.411 -2.69,-2.343 -1.799,-0.976 -2.146,-4.771 -0.974,-9.84 -2.163,-11.928 1.204,-20.787 3.91,-10.529 12.777,-4.734 17.258,-3.92 16.524,3.117 12.424,-14.707 17.034,-19.316 4.263,-4.267 16.439,-7.706 20.43,-2.478 z"
+                 id="path7046" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 304.826,284.943 c 5.695,7.479 16.263,15.509 20.036,17.703 2.745,1.579 6.726,3.431 6.656,8.372 -0.137,5.627 -3.02,7.205 -4.597,8.783 -3.157,3.156 -25.458,11.939 -34.997,12.625 -12.626,0.893 -12.145,1.51 -18.938,4.049 -3.569,1.373 -9.058,2.745 -14.822,1.646 -3.979,-0.686 -3.979,0 -6.725,-2.332 -2.676,-2.334 -1.578,-0.756 -1.921,-4.529 -0.961,-9.813 -2.471,-11.665 0.824,-20.516 3.91,-10.705 12.83,-4.529 17.29,-3.707 16.47,3.156 12.215,-15.027 16.813,-19.625 4.255,-4.253 16.401,-7.684 20.381,-2.469 z"
+               id="path7048" />
+          </g>
+          <g
+             id="g7050">
+            <path
+               style="fill:#995900"
+               inkscape:connector-curvature="0"
+               d="m 52.494,273.618 c -6.479,4.68 -22.896,4.248 -27.072,9.719 -4.104,5.473 0.145,13.393 0.072,28.08 0,6.265 -1.08,11.017 -1.8,14.832 -1.008,4.824 -1.656,8.209 0.36,11.664 3.672,6.121 9.575,7.633 43.344,14.688 18.072,3.744 35.136,13.464 46.584,14.399 11.448,0.865 13.896,-2.951 20.88,-9.144 6.912,-6.192 9.144,-4.248 8.928,-17.856 -0.216,-13.535 -8.928,-17.567 -18.792,-33.191 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -8.208,13.248 -14.688,17.929 z"
+               id="path7052" />
+            <g
+               id="g7054">
+              <path
+                 style="fill:#9e5e00"
+                 inkscape:connector-curvature="0"
+                 d="m 52.598,273.905 c -6.397,4.702 -22.475,3.788 -27.062,9.512 -4.154,5.414 0.228,13.276 0.098,27.955 -0.025,6.23 -1.152,10.881 -1.937,14.877 -1.037,4.871 -1.678,8.201 0.349,11.619 3.787,6.162 9.695,7.123 43.456,14.168 18.061,3.737 34.541,13.307 46.343,14.112 11.186,0.792 13.564,-2.829 20.463,-8.96 6.896,-6.195 9.024,-4.277 8.858,-17.406 -0.075,-13.521 -8.305,-17.349 -18.169,-32.973 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -8.153,13.479 -14.583,18.216 z"
+                 id="path7056" />
+              <path
+                 style="fill:#a36400"
+                 inkscape:connector-curvature="0"
+                 d="m 52.703,274.193 c -6.314,4.724 -22.054,3.327 -27.051,9.304 -4.204,5.356 0.31,13.16 0.123,27.828 -0.051,6.198 -1.225,10.748 -2.074,14.924 -1.065,4.918 -1.699,8.194 0.339,11.571 3.902,6.206 9.813,6.617 43.567,13.651 18.05,3.73 33.948,13.146 46.101,13.824 10.923,0.72 13.234,-2.707 20.045,-8.777 6.885,-6.199 8.907,-4.305 8.792,-16.956 0.064,-13.507 -7.683,-17.129 -17.547,-32.753 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -8.1,13.709 -14.479,18.504 z"
+                 id="path7058" />
+              <path
+                 style="fill:#a86a00"
+                 inkscape:connector-curvature="0"
+                 d="m 52.807,274.481 c -6.231,4.745 -21.633,2.866 -27.04,9.094 -4.255,5.299 0.393,13.047 0.148,27.702 -0.076,6.167 -1.297,10.616 -2.211,14.972 -1.095,4.965 -1.721,8.188 0.328,11.524 4.018,6.25 9.932,6.108 43.679,13.134 18.039,3.721 33.354,12.988 45.86,13.535 10.659,0.648 12.902,-2.585 19.627,-8.593 6.869,-6.203 8.788,-4.335 8.723,-16.507 0.205,-13.492 -7.06,-16.909 -16.924,-32.533 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -8.045,13.94 -14.374,18.792 z"
+                 id="path7060" />
+              <path
+                 style="fill:#ad7000"
+                 inkscape:connector-curvature="0"
+                 d="m 52.912,274.769 c -6.149,4.767 -21.211,2.405 -27.029,8.885 -4.306,5.242 0.476,12.931 0.173,27.576 -0.101,6.136 -1.368,10.483 -2.347,15.019 -1.123,5.012 -1.742,8.181 0.316,11.478 4.133,6.293 10.052,5.603 43.791,12.614 18.028,3.716 32.76,12.83 45.619,13.248 10.396,0.576 12.57,-2.463 19.21,-8.409 6.854,-6.206 8.668,-4.363 8.653,-16.056 0.347,-13.479 -6.437,-16.69 -16.301,-32.314 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.991,14.169 -14.269,19.079 z"
+                 id="path7062" />
+              <path
+                 style="fill:#b27500"
+                 inkscape:connector-curvature="0"
+                 d="m 53.016,275.057 c -6.066,4.787 -20.79,1.943 -27.019,8.676 -4.355,5.184 0.559,12.816 0.198,27.45 -0.126,6.103 -1.44,10.351 -2.484,15.065 -1.151,5.059 -1.764,8.172 0.307,11.431 4.248,6.336 10.17,5.094 43.901,12.096 18.019,3.708 32.166,12.672 45.378,12.96 10.135,0.504 12.24,-2.34 18.792,-8.227 6.841,-6.209 8.551,-4.391 8.586,-15.605 0.486,-13.464 -5.813,-16.47 -15.678,-32.094 -9.865,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.937,14.399 -14.165,19.368 z"
+                 id="path7064" />
+              <path
+                 style="fill:#b77b00"
+                 inkscape:connector-curvature="0"
+                 d="m 53.121,275.344 c -5.983,4.811 -20.369,1.484 -27.008,8.469 -4.406,5.126 0.641,12.7 0.224,27.324 -0.151,6.068 -1.512,10.216 -2.621,15.111 -1.181,5.105 -1.785,8.166 0.295,11.385 4.363,6.379 10.289,4.586 44.014,11.576 18.008,3.701 31.572,12.515 45.137,12.672 9.872,0.433 11.909,-2.217 18.375,-8.041 6.825,-6.215 8.431,-4.422 8.518,-15.156 0.627,-13.45 -5.191,-16.251 -15.056,-31.875 -9.865,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.884,14.631 -14.062,19.655 z"
+                 id="path7066" />
+              <path
+                 style="fill:#bc8100"
+                 inkscape:connector-curvature="0"
+                 d="m 53.225,275.633 c -5.9,4.832 -19.948,1.023 -26.997,8.259 -4.457,5.069 0.724,12.585 0.249,27.198 -0.177,6.037 -1.584,10.082 -2.758,15.158 -1.21,5.152 -1.808,8.158 0.284,11.338 4.479,6.422 10.407,4.078 44.125,11.059 17.997,3.693 30.979,12.355 44.896,12.384 9.608,0.36 11.578,-2.095 17.957,-7.858 6.812,-6.217 8.313,-4.449 8.45,-14.707 0.766,-13.435 -4.569,-16.03 -14.434,-31.654 -9.865,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.829,14.859 -13.956,19.943 z"
+                 id="path7068" />
+              <path
+                 style="fill:#c18700"
+                 inkscape:connector-curvature="0"
+                 d="m 53.329,275.92 c -5.817,4.854 -19.526,0.563 -26.985,8.051 -4.507,5.011 0.807,12.47 0.273,27.072 -0.201,6.004 -1.655,9.949 -2.894,15.205 -1.239,5.199 -1.829,8.151 0.273,11.291 4.594,6.465 10.526,3.57 44.236,10.541 17.985,3.686 30.384,12.196 44.655,12.096 9.345,0.287 11.245,-1.973 17.539,-7.676 6.797,-6.221 8.193,-4.479 8.381,-14.256 0.906,-13.42 -3.946,-15.812 -13.811,-31.436 -9.865,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.774,15.094 -13.851,20.232 z"
+                 id="path7070" />
+              <path
+                 style="fill:#c68c00"
+                 inkscape:connector-curvature="0"
+                 d="m 53.433,276.209 c -5.734,4.875 -19.104,0.101 -26.975,7.84 -4.558,4.955 0.89,12.355 0.299,26.947 -0.227,5.973 -1.728,9.816 -3.031,15.252 -1.267,5.246 -1.851,8.145 0.263,11.244 4.709,6.508 10.646,3.063 44.349,10.022 17.975,3.679 29.79,12.038 44.413,11.808 9.083,0.217 10.915,-1.851 17.122,-7.492 6.782,-6.224 8.074,-4.506 8.313,-13.806 1.048,-13.405 -3.323,-15.592 -13.188,-31.216 -9.865,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.722,15.322 -13.749,20.521 z"
+                 id="path7072" />
+              <path
+                 style="fill:#cc9200"
+                 inkscape:connector-curvature="0"
+                 d="m 53.538,276.497 c -5.651,4.896 -18.684,-0.359 -26.964,7.633 -4.607,4.896 0.972,12.24 0.324,26.82 -0.252,5.939 -1.8,9.684 -3.168,15.299 -1.296,5.293 -1.872,8.137 0.252,11.196 4.824,6.552 10.764,2.556 44.46,9.505 17.964,3.672 29.196,11.879 44.172,11.52 8.82,0.144 10.584,-1.729 16.704,-7.309 6.768,-6.228 7.956,-4.535 8.244,-13.355 1.188,-13.393 -2.7,-15.372 -12.564,-30.996 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.668,15.551 -13.644,20.807 z"
+                 id="path7074" />
+              <path
+                 style="fill:#d19800"
+                 inkscape:connector-curvature="0"
+                 d="m 53.642,276.786 c -5.569,4.918 -18.263,-0.82 -26.953,7.424 -4.658,4.838 1.055,12.123 0.35,26.693 -0.277,5.907 -1.872,9.551 -3.305,15.346 -1.325,5.34 -1.894,8.129 0.241,11.15 4.938,6.596 10.883,2.048 44.571,8.984 17.953,3.666 28.602,11.723 43.931,11.232 8.558,0.072 10.253,-1.605 16.287,-7.123 6.753,-6.232 7.837,-4.566 8.175,-12.906 1.329,-13.379 -2.077,-15.153 -11.941,-30.777 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.614,15.783 -13.54,21.097 z"
+                 id="path7076" />
+              <path
+                 style="fill:#d69e00"
+                 inkscape:connector-curvature="0"
+                 d="m 53.747,277.073 c -5.486,4.94 -17.842,-1.281 -26.942,7.215 -4.709,4.781 1.138,12.01 0.374,26.568 -0.302,5.875 -1.943,9.417 -3.441,15.393 -1.354,5.387 -1.915,8.123 0.23,11.104 5.055,6.639 11.002,1.541 44.684,8.467 17.942,3.658 28.008,11.563 43.688,10.944 8.296,0 9.923,-1.483 15.869,-6.941 6.74,-6.235 7.72,-4.593 8.108,-12.456 1.468,-13.363 -1.455,-14.933 -11.319,-30.557 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.56,16.012 -13.435,21.383 z"
+                 id="path7078" />
+              <path
+                 style="fill:#dba300"
+                 inkscape:connector-curvature="0"
+                 d="m 53.851,277.361 c -5.403,4.962 -17.421,-1.741 -26.932,7.007 -4.759,4.723 1.221,11.893 0.399,26.441 -0.327,5.843 -2.016,9.283 -3.578,15.439 -1.383,5.434 -1.937,8.115 0.22,11.057 5.169,6.682 11.12,1.033 44.795,7.949 17.932,3.649 27.414,11.404 43.448,10.656 8.031,-0.072 9.59,-1.361 15.451,-6.758 6.725,-6.238 7.6,-4.623 8.039,-12.006 1.609,-13.35 -0.832,-14.714 -10.696,-30.338 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.504,16.245 -13.33,21.673 z"
+                 id="path7080" />
+              <path
+                 style="fill:#e0a900"
+                 inkscape:connector-curvature="0"
+                 d="m 53.956,277.649 c -5.321,4.982 -16.999,-2.203 -26.921,6.797 -4.81,4.666 1.303,11.779 0.425,26.316 -0.353,5.811 -2.088,9.15 -3.715,15.486 -1.411,5.48 -1.959,8.108 0.208,11.01 5.285,6.725 11.239,0.525 44.907,7.431 17.92,3.644 26.819,11.246 43.207,10.368 7.769,-0.145 9.259,-1.239 15.034,-6.574 6.71,-6.242 7.479,-4.65 7.97,-11.557 1.75,-13.334 -0.209,-14.493 -10.073,-30.117 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.452,16.474 -13.226,21.96 z"
+                 id="path7082" />
+              <path
+                 style="fill:#e5af00"
+                 inkscape:connector-curvature="0"
+                 d="m 54.06,277.937 c -5.238,5.004 -16.578,-2.664 -26.91,6.588 -4.86,4.608 1.386,11.664 0.45,26.19 -0.378,5.777 -2.16,9.018 -3.853,15.533 -1.439,5.526 -1.979,8.101 0.198,10.963 5.4,6.768 11.358,0.018 45.018,6.912 17.91,3.635 26.227,11.088 42.967,10.08 7.506,-0.217 8.928,-1.117 14.615,-6.391 6.696,-6.246 7.362,-4.68 7.902,-11.105 1.89,-13.32 0.414,-14.274 -9.45,-29.898 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.397,16.704 -13.121,22.248 z"
+                 id="path7084" />
+              <path
+                 style="fill:#eab500"
+                 inkscape:connector-curvature="0"
+                 d="m 54.165,278.225 c -5.155,5.025 -16.157,-3.124 -26.899,6.38 -4.91,4.55 1.469,11.548 0.476,26.063 -0.403,5.746 -2.232,8.885 -3.989,15.58 -1.469,5.573 -2.002,8.094 0.188,10.916 5.515,6.812 11.477,-0.49 45.129,6.394 17.899,3.629 25.633,10.93 42.725,9.792 7.243,-0.288 8.598,-0.993 14.199,-6.206 6.681,-6.25 7.243,-4.709 7.833,-10.656 2.031,-13.306 1.037,-14.055 -8.827,-29.679 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.346,16.935 -13.019,22.536 z"
+                 id="path7086" />
+              <path
+                 style="fill:#efba00"
+                 inkscape:connector-curvature="0"
+                 d="m 54.269,278.513 c -5.073,5.048 -15.736,-3.585 -26.889,6.171 -4.961,4.492 1.552,11.434 0.5,25.938 -0.428,5.713 -2.304,8.752 -4.125,15.627 -1.498,5.621 -2.023,8.086 0.176,10.869 5.631,6.854 11.596,-0.996 45.241,5.875 17.889,3.623 25.038,10.771 42.483,9.504 6.981,-0.359 8.266,-0.871 13.781,-6.022 6.668,-6.253 7.125,-4.737 7.766,-10.206 2.17,-13.291 1.659,-13.835 -8.205,-29.459 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.289,17.164 -12.912,22.823 z"
+                 id="path7088" />
+              <path
+                 style="fill:#f4c000"
+                 inkscape:connector-curvature="0"
+                 d="m 54.374,278.801 c -4.99,5.068 -15.314,-4.047 -26.878,5.962 -5.012,4.435 1.634,11.317 0.525,25.812 -0.453,5.682 -2.376,8.618 -4.263,15.674 -1.526,5.668 -2.045,8.08 0.166,10.822 5.745,6.898 11.714,-1.505 45.353,5.357 17.878,3.613 24.444,10.613 42.243,9.216 6.717,-0.433 7.934,-0.749 13.362,-5.839 6.653,-6.258 7.007,-4.768 7.697,-9.756 2.312,-13.277 2.282,-13.616 -7.582,-29.24 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.235,17.395 -12.807,23.112 z"
+                 id="path7090" />
+              <path
+                 style="fill:#f9c600"
+                 inkscape:connector-curvature="0"
+                 d="m 54.477,279.088 c -4.906,5.092 -14.893,-4.506 -26.866,5.754 -5.062,4.377 1.717,11.203 0.551,25.686 -0.479,5.648 -2.448,8.485 -4.399,15.721 -1.555,5.715 -2.066,8.072 0.155,10.775 5.86,6.941 11.833,-2.012 45.464,4.839 17.867,3.607 23.851,10.454 42.001,8.929 6.455,-0.504 7.604,-0.627 12.946,-5.656 6.638,-6.26 6.886,-4.795 7.628,-9.307 2.452,-13.262 2.905,-13.396 -6.959,-29.02 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.182,17.626 -12.705,23.399 z"
+                 id="path7092" />
+            </g>
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 54.582,279.377 c -4.823,5.111 -14.472,-4.969 -26.855,5.543 -5.112,4.32 1.8,11.088 0.576,25.561 -0.504,5.616 -2.521,8.352 -4.536,15.768 -1.584,5.76 -2.088,8.064 0.144,10.729 5.977,6.984 11.952,-2.52 45.576,4.32 17.856,3.6 23.256,10.295 41.76,8.64 6.192,-0.576 7.272,-0.504 12.528,-5.472 6.624,-6.264 6.768,-4.824 7.56,-8.856 2.592,-13.248 3.528,-13.176 -6.336,-28.8 -9.864,-15.624 -11.448,-18.504 -18,-28.872 -6.552,-10.224 -19.512,-28.8 -26.928,-29.017 -5.904,-0.144 -9.216,3.024 -12.888,6.769 -3.672,3.745 -7.129,17.855 -12.601,23.687 z"
+               id="path7094" />
+          </g>
+          <g
+             id="g7096">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 57.701,285.002 c -4.278,4.539 -18.28,-1.36 -24.892,3.631 -4.732,3.5 2.398,7.908 1.426,20.873 -0.389,4.926 -3.824,5.834 -2.398,12.64 1.103,5.121 2.27,4.991 4.214,7.325 5.315,6.223 4.084,1.686 34.355,7.777 16.011,3.242 20.938,9.271 37.596,7.779 5.575,-0.518 6.612,-0.453 11.279,-4.926 5.964,-5.575 2.917,-4.408 3.565,-7.973 2.269,-11.863 0.453,-13.938 -8.428,-28.004 -8.88,-14.066 -8.102,-14.844 -13.936,-24.113 -5.834,-9.141 -13.872,-25.799 -20.549,-25.93 -5.25,-0.129 -8.297,2.723 -11.603,6.094 -3.305,3.372 -5.768,19.643 -10.629,24.827 z"
+               id="path7098" />
+            <g
+               id="g7100">
+              <path
+                 style="fill:#ffcc02"
+                 inkscape:connector-curvature="0"
+                 d="m 57.995,285.094 c -4.461,4.701 -18.604,-1.196 -25.06,3.705 -4.701,3.514 2.578,8.05 1.608,20.68 -0.4,4.896 -3.733,5.877 -2.458,12.634 0.986,5.093 2.357,4.938 4.334,7.201 5.686,6.131 4.673,1.826 34.119,7.743 15.918,3.211 20.815,9.215 37.372,7.732 5.541,-0.513 6.479,-0.463 11.155,-4.849 5.865,-5.407 2.858,-4.287 3.412,-8.058 2.066,-11.787 0.442,-13.981 -8.188,-27.649 -8.83,-13.983 -8.143,-14.698 -13.941,-23.913 -5.8,-9.085 -13.701,-25.805 -20.338,-25.934 -5.219,-0.129 -8.248,2.705 -11.533,6.057 -3.287,3.352 -5.644,19.505 -10.482,24.651 z"
+                 id="path7102" />
+              <path
+                 style="fill:#ffcc05"
+                 inkscape:connector-curvature="0"
+                 d="m 58.289,285.185 c -4.644,4.866 -18.93,-1.031 -25.229,3.78 -4.669,3.527 2.759,8.191 1.792,20.488 -0.413,4.866 -3.642,5.918 -2.519,12.625 0.872,5.066 2.447,4.887 4.455,7.078 6.057,6.04 5.263,1.969 33.883,7.709 15.825,3.18 20.693,9.159 37.148,7.686 5.508,-0.506 6.345,-0.471 11.03,-4.77 5.768,-5.24 2.803,-4.168 3.26,-8.142 1.865,-11.716 0.432,-14.027 -7.949,-27.298 -8.78,-13.899 -8.183,-14.553 -13.948,-23.713 -5.764,-9.03 -13.529,-25.811 -20.126,-25.938 -5.188,-0.129 -8.198,2.688 -11.465,6.021 -3.266,3.331 -5.517,19.368 -10.332,24.474 z"
+                 id="path7104" />
+              <path
+                 style="fill:#ffcc07"
+                 inkscape:connector-curvature="0"
+                 d="m 58.584,285.276 c -4.827,5.03 -19.255,-0.865 -25.397,3.855 -4.639,3.541 2.938,8.332 1.975,20.295 -0.425,4.838 -3.551,5.961 -2.578,12.619 0.757,5.039 2.536,4.834 4.575,6.955 6.428,5.949 5.852,2.108 33.646,7.674 15.733,3.147 20.571,9.103 36.925,7.639 5.475,-0.501 6.211,-0.48 10.905,-4.693 5.67,-5.072 2.745,-4.045 3.107,-8.224 1.663,-11.642 0.42,-14.073 -7.711,-26.946 -8.73,-13.814 -8.223,-14.406 -13.952,-23.511 -5.729,-8.976 -13.358,-25.817 -19.916,-25.944 -5.156,-0.127 -8.148,2.674 -11.396,5.984 -3.248,3.31 -5.391,19.229 -10.183,24.297 z"
+                 id="path7106" />
+              <path
+                 style="fill:#ffcd0a"
+                 inkscape:connector-curvature="0"
+                 d="m 58.878,285.368 c -5.01,5.193 -19.579,-0.701 -25.565,3.93 -4.607,3.555 3.117,8.475 2.157,20.102 -0.437,4.809 -3.459,6.004 -2.639,12.613 0.643,5.011 2.626,4.781 4.695,6.83 6.799,5.857 6.442,2.25 33.411,7.64 15.641,3.118 20.45,9.048 36.701,7.593 5.44,-0.494 6.076,-0.488 10.781,-4.615 5.57,-4.904 2.688,-3.926 2.954,-8.308 1.462,-11.569 0.409,-14.118 -7.472,-26.593 -8.68,-13.732 -8.263,-14.262 -13.958,-23.311 -5.695,-8.922 -13.188,-25.824 -19.705,-25.951 -5.125,-0.127 -8.1,2.658 -11.326,5.949 -3.227,3.289 -5.266,19.091 -10.034,24.121 z"
+                 id="path7108" />
+              <path
+                 style="fill:#ffcd0c"
+                 inkscape:connector-curvature="0"
+                 d="m 59.173,285.458 c -5.193,5.358 -19.905,-0.535 -25.734,4.008 -4.577,3.566 3.297,8.613 2.34,19.908 -0.449,4.778 -3.368,6.045 -2.698,12.605 0.526,4.982 2.715,4.729 4.815,6.707 7.17,5.766 7.031,2.391 33.175,7.604 15.549,3.088 20.328,8.994 36.477,7.547 5.408,-0.488 5.943,-0.498 10.657,-4.537 5.472,-4.737 2.63,-3.805 2.802,-8.393 1.261,-11.494 0.398,-14.162 -7.232,-26.24 -8.63,-13.647 -8.304,-14.117 -13.964,-23.109 -5.66,-8.867 -13.017,-25.829 -19.494,-25.956 -5.094,-0.126 -8.05,2.642 -11.257,5.912 -3.21,3.27 -5.142,18.955 -9.887,23.944 z"
+                 id="path7110" />
+              <path
+                 style="fill:#ffcd0f"
+                 inkscape:connector-curvature="0"
+                 d="m 59.467,285.547 c -5.376,5.523 -20.229,-0.369 -25.903,4.084 -4.545,3.58 3.478,8.756 2.523,19.715 -0.461,4.75 -3.277,6.088 -2.758,12.599 0.411,4.955 2.804,4.677 4.936,6.584 7.541,5.675 7.621,2.532 32.938,7.569 15.456,3.056 20.206,8.938 36.253,7.5 5.375,-0.482 5.811,-0.506 10.533,-4.459 5.374,-4.57 2.572,-3.686 2.649,-8.477 1.058,-11.42 0.387,-14.209 -6.995,-25.888 -8.58,-13.563 -8.344,-13.972 -13.969,-22.909 -5.626,-8.813 -12.846,-25.834 -19.283,-25.961 -5.063,-0.125 -8,2.625 -11.188,5.877 -3.188,3.251 -5.015,18.818 -9.736,23.766 z"
+                 id="path7112" />
+              <path
+                 style="fill:#ffcd11"
+                 inkscape:connector-curvature="0"
+                 d="m 59.76,285.639 c -5.559,5.688 -20.555,-0.205 -26.071,4.158 -4.515,3.594 3.657,8.896 2.706,19.521 -0.473,4.721 -3.186,6.131 -2.818,12.594 0.297,4.926 2.894,4.623 5.057,6.459 7.911,5.584 8.21,2.674 32.703,7.535 15.362,3.025 20.084,8.883 36.027,7.453 5.342,-0.477 5.677,-0.515 10.409,-4.381 5.275,-4.402 2.516,-3.564 2.497,-8.561 0.855,-11.348 0.375,-14.254 -6.756,-25.535 -8.53,-13.479 -8.385,-13.825 -13.976,-22.709 -5.59,-8.758 -12.673,-25.842 -19.071,-25.965 -5.031,-0.125 -7.951,2.608 -11.119,5.838 -3.168,3.232 -4.888,18.684 -9.588,23.593 z"
+                 id="path7114" />
+              <path
+                 style="fill:#ffce14"
+                 inkscape:connector-curvature="0"
+                 d="m 60.055,285.73 c -5.742,5.851 -20.88,-0.04 -26.24,4.233 -4.483,3.607 3.837,9.039 2.889,19.33 -0.485,4.69 -3.095,6.172 -2.878,12.584 0.182,4.9 2.982,4.572 5.177,6.338 8.282,5.492 8.8,2.814 32.467,7.498 15.271,2.996 19.962,8.828 35.804,7.408 5.309,-0.472 5.543,-0.523 10.285,-4.304 5.177,-4.235 2.458,-3.444 2.344,-8.644 0.654,-11.273 0.364,-14.299 -6.518,-25.184 -8.479,-13.395 -8.425,-13.679 -13.98,-22.507 -5.556,-8.704 -12.502,-25.849 -18.86,-25.972 -5,-0.123 -7.901,2.593 -11.05,5.803 -3.149,3.21 -4.765,18.547 -9.44,23.417 z"
+                 id="path7116" />
+              <path
+                 style="fill:#ffce16"
+                 inkscape:connector-curvature="0"
+                 d="m 60.349,285.821 c -5.925,6.016 -21.205,0.125 -26.408,4.309 -4.453,3.621 4.017,9.18 3.07,19.137 -0.496,4.662 -3.002,6.215 -2.938,12.579 0.066,4.872 3.072,4.518 5.298,6.213 8.653,5.401 9.389,2.956 32.23,7.464 15.178,2.964 19.84,8.771 35.58,7.361 5.275,-0.465 5.409,-0.532 10.159,-4.225 5.079,-4.068 2.401,-3.324 2.192,-8.729 0.452,-11.2 0.354,-14.346 -6.279,-24.831 -8.429,-13.312 -8.464,-13.534 -13.985,-22.306 -5.521,-8.65 -12.331,-25.854 -18.649,-25.978 -4.969,-0.123 -7.853,2.577 -10.98,5.767 -3.129,3.19 -4.637,18.409 -9.29,23.239 z"
+                 id="path7118" />
+              <path
+                 style="fill:#ffce19"
+                 inkscape:connector-curvature="0"
+                 d="m 60.643,285.911 c -6.107,6.18 -21.529,0.291 -26.577,4.385 -4.421,3.635 4.197,9.322 3.254,18.945 -0.508,4.631 -2.911,6.256 -2.997,12.571 -0.049,4.845 3.161,4.465 5.418,6.089 9.023,5.309 9.979,3.098 31.994,7.43 15.085,2.934 19.718,8.717 35.355,7.314 5.242,-0.459 5.276,-0.541 10.036,-4.148 4.98,-3.899 2.344,-3.203 2.039,-8.811 0.25,-11.127 0.342,-14.391 -6.04,-24.479 -8.38,-13.228 -8.505,-13.389 -13.991,-22.105 -5.486,-8.596 -12.16,-25.859 -18.438,-25.982 -4.938,-0.123 -7.803,2.561 -10.911,5.73 -3.109,3.17 -4.513,18.272 -9.142,23.061 z"
+                 id="path7120" />
+              <path
+                 style="fill:#ffce1c"
+                 inkscape:connector-curvature="0"
+                 d="m 60.938,286.002 c -6.291,6.344 -21.855,0.455 -26.746,4.459 -4.391,3.648 4.377,9.463 3.437,18.752 -0.521,4.603 -2.82,6.299 -3.058,12.564 -0.163,4.817 3.251,4.413 5.539,5.965 9.395,5.219 10.567,3.24 31.758,7.396 14.993,2.903 19.597,8.661 35.132,7.269 5.209,-0.453 5.143,-0.55 9.912,-4.07 4.882,-3.732 2.286,-3.082 1.887,-8.895 0.048,-11.053 0.329,-14.436 -5.802,-24.126 -8.33,-13.144 -8.545,-13.243 -13.997,-21.905 -5.451,-8.541 -11.988,-25.865 -18.228,-25.988 -4.906,-0.121 -7.753,2.545 -10.843,5.695 -3.088,3.149 -4.385,18.132 -8.991,22.884 z"
+                 id="path7122" />
+              <path
+                 style="fill:#ffcf1e"
+                 inkscape:connector-curvature="0"
+                 d="m 61.232,286.092 c -6.473,6.51 -22.18,0.621 -26.914,4.535 -4.359,3.662 4.557,9.604 3.619,18.559 -0.532,4.574 -2.729,6.342 -3.117,12.559 -0.278,4.789 3.34,4.36 5.659,5.842 9.766,5.127 11.157,3.381 31.521,7.359 14.9,2.872 19.475,8.607 34.908,7.223 5.176,-0.447 5.008,-0.559 9.787,-3.992 4.784,-3.565 2.229,-2.963 1.735,-8.979 -0.155,-10.98 0.317,-14.482 -5.564,-23.773 -8.279,-13.061 -8.585,-13.098 -14.002,-21.705 -5.416,-8.485 -11.817,-25.871 -18.017,-25.992 -4.875,-0.121 -7.704,2.527 -10.773,5.658 -3.068,3.128 -4.26,17.995 -8.842,22.706 z"
+                 id="path7124" />
+              <path
+                 style="fill:#ffcf21"
+                 inkscape:connector-curvature="0"
+                 d="m 61.526,286.184 c -6.655,6.673 -22.505,0.785 -27.082,4.611 -4.328,3.674 4.736,9.744 3.802,18.365 -0.544,4.543 -2.638,6.383 -3.178,12.551 -0.394,4.761 3.43,4.308 5.78,5.718 10.136,5.036 11.746,3.522 31.285,7.325 14.808,2.841 19.353,8.551 34.685,7.176 5.142,-0.441 4.875,-0.567 9.663,-3.914 4.685,-3.398 2.171,-2.842 1.582,-9.063 -0.357,-10.906 0.307,-14.527 -5.325,-23.422 -8.23,-12.976 -8.625,-12.951 -14.008,-21.503 -5.382,-8.432 -11.646,-25.878 -17.806,-25.999 -4.844,-0.119 -7.654,2.512 -10.704,5.622 -3.049,3.109 -4.134,17.859 -8.694,22.533 z"
+                 id="path7126" />
+              <path
+                 style="fill:#ffcf23"
+                 inkscape:connector-curvature="0"
+                 d="m 61.821,286.275 c -6.839,6.837 -22.83,0.95 -27.251,4.687 -4.298,3.688 4.916,9.886 3.984,18.172 -0.557,4.515 -2.546,6.426 -3.237,12.545 -0.509,4.732 3.519,4.255 5.9,5.594 10.507,4.945 12.336,3.663 31.05,7.29 14.715,2.812 19.23,8.496 34.46,7.129 5.108,-0.435 4.74,-0.575 9.538,-3.835 4.587,-3.23 2.113,-2.723 1.43,-9.146 -0.559,-10.834 0.296,-14.572 -5.086,-23.069 C 104.429,292.75 103.943,292.836 98.595,284.34 93.248,275.963 87.119,258.455 81,258.336 c -4.813,-0.119 -7.605,2.496 -10.635,5.584 -3.029,3.088 -4.008,17.722 -8.544,22.355 z"
+                 id="path7128" />
+              <path
+                 style="fill:#ffcf26"
+                 inkscape:connector-curvature="0"
+                 d="m 62.115,286.366 c -7.021,7.002 -23.154,1.115 -27.42,4.762 -4.266,3.701 5.096,10.027 4.168,17.979 -0.568,4.486 -2.455,6.469 -3.297,12.538 -0.624,4.706 3.607,4.203 6.021,5.472 10.878,4.852 12.925,3.803 30.813,7.254 14.622,2.78 19.108,8.441 34.236,7.084 5.075,-0.43 4.606,-0.584 9.413,-3.759 4.489,-3.063 2.058,-2.601 1.277,-9.229 -0.761,-10.76 0.284,-14.618 -4.848,-22.717 -8.129,-12.809 -8.706,-12.66 -14.019,-21.102 -5.313,-8.322 -11.304,-25.891 -17.384,-26.01 -4.781,-0.118 -7.556,2.48 -10.566,5.55 -3.008,3.068 -3.881,17.584 -8.394,22.178 z"
+                 id="path7130" />
+              <path
+                 style="fill:#ffd028"
+                 inkscape:connector-curvature="0"
+                 d="m 62.409,286.456 c -7.204,7.166 -23.479,1.281 -27.588,4.838 -4.235,3.715 5.275,10.168 4.351,17.787 -0.58,4.455 -2.364,6.51 -3.357,12.53 -0.738,4.679 3.697,4.149 6.142,5.347 11.249,4.763 13.515,3.946 30.577,7.221 14.529,2.748 18.986,8.386 34.012,7.037 5.043,-0.424 4.474,-0.594 9.289,-3.68 4.392,-2.897 2,-2.481 1.125,-9.314 -0.963,-10.686 0.273,-14.664 -4.608,-22.364 -8.079,-12.726 -8.746,-12.517 -14.024,-20.901 -5.277,-8.269 -11.133,-25.896 -17.173,-26.015 -4.75,-0.116 -7.506,2.464 -10.497,5.513 -2.992,3.047 -3.759,17.447 -8.249,22.001 z"
+                 id="path7132" />
+              <path
+                 style="fill:#ffd02b"
+                 inkscape:connector-curvature="0"
+                 d="m 62.704,286.547 c -7.388,7.33 -23.805,1.445 -27.757,4.912 -4.204,3.729 5.455,10.311 4.533,17.594 -0.593,4.427 -2.272,6.553 -3.417,12.523 -0.854,4.651 3.786,4.098 6.262,5.225 11.619,4.671 14.104,4.087 30.341,7.185 14.438,2.72 18.864,8.33 33.787,6.991 5.01,-0.418 4.341,-0.604 9.166,-3.604 4.292,-2.729 1.942,-2.359 0.972,-9.396 -1.163,-10.613 0.263,-14.709 -4.369,-22.012 -8.03,-12.641 -8.787,-12.371 -14.03,-20.7 -5.243,-8.214 -10.962,-25.903 -16.962,-26.021 -4.719,-0.117 -7.457,2.447 -10.428,5.477 -2.972,3.029 -3.632,17.313 -8.098,21.826 z"
+                 id="path7134" />
+              <path
+                 style="fill:#ffd02d"
+                 inkscape:connector-curvature="0"
+                 d="m 62.998,286.638 c -7.57,7.493 -24.13,1.61 -27.925,4.987 -4.174,3.742 5.635,10.451 4.716,17.4 -0.604,4.398 -2.182,6.596 -3.478,12.518 -0.969,4.623 3.875,4.045 6.382,5.101 11.991,4.579 14.694,4.228 30.105,7.149 14.345,2.688 18.743,8.275 33.563,6.944 4.977,-0.411 4.207,-0.61 9.042,-3.524 4.193,-2.562 1.884,-2.239 0.819,-9.481 -1.366,-10.538 0.251,-14.754 -4.133,-21.659 -7.979,-12.557 -8.825,-12.224 -14.034,-20.498 -5.208,-8.16 -10.791,-25.91 -16.751,-26.027 -4.688,-0.114 -7.407,2.433 -10.358,5.441 -2.951,3.01 -3.505,17.174 -7.948,21.649 z"
+                 id="path7136" />
+              <path
+                 style="fill:#ffd030"
+                 inkscape:connector-curvature="0"
+                 d="m 63.292,286.729 c -7.753,7.658 -24.454,1.775 -28.094,5.063 -4.142,3.756 5.815,10.594 4.899,17.209 -0.616,4.367 -2.09,6.638 -3.537,12.51 -1.084,4.596 3.964,3.992 6.502,4.977 12.362,4.488 15.283,4.369 29.869,7.115 14.252,2.656 18.621,8.22 33.34,6.898 4.943,-0.406 4.073,-0.621 8.917,-3.447 4.095,-2.395 1.828,-2.119 0.667,-9.565 -1.568,-10.465 0.239,-14.8 -3.894,-21.307 -7.929,-12.474 -8.866,-12.078 -14.04,-20.298 -5.173,-8.105 -10.619,-25.916 -16.54,-26.031 -4.656,-0.115 -7.357,2.415 -10.289,5.404 -2.932,2.988 -3.38,17.036 -7.8,21.472 z"
+                 id="path7138" />
+            </g>
+            <path
+               style="fill:#ffd133"
+               inkscape:connector-curvature="0"
+               d="m 63.587,286.82 c -7.937,7.822 -24.78,1.94 -28.263,5.138 -4.111,3.77 5.995,10.734 5.081,17.016 -0.627,4.339 -1.998,6.68 -3.597,12.504 -1.199,4.568 4.054,3.939 6.623,4.854 12.732,4.396 15.873,4.51 29.633,7.08 14.16,2.625 18.499,8.164 33.116,6.852 4.909,-0.4 3.939,-0.629 8.793,-3.369 3.997,-2.227 1.77,-1.999 0.514,-9.648 -1.771,-10.393 0.228,-14.846 -3.654,-20.955 -7.88,-12.39 -8.907,-11.934 -14.046,-20.098 -5.139,-8.051 -10.448,-25.922 -16.329,-26.037 -4.625,-0.113 -7.309,2.398 -10.221,5.368 -2.912,2.97 -3.254,16.897 -7.65,21.295 z"
+               id="path7140" />
+          </g>
+          <g
+             id="g7142">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 88.782,218.681 c -0.936,2.088 -1.728,20.017 2.952,27 4.68,6.911 3.312,10.872 -1.872,5.616 -5.4,-5.112 -8.928,-12.816 -9,-18.145 0,-3.096 2.376,-15.84 3.313,-17.208 1.007,-1.44 5.327,1.153 4.607,2.737 z"
+               id="path7144" />
+            <g
+               id="g7146">
+              <path
+                 style="fill:#030303"
+                 inkscape:connector-curvature="0"
+                 d="m 88.692,219.032 c -0.903,2.34 -1.656,19.698 3.01,26.668 4.665,6.901 3.186,10.49 -1.84,5.356 -5.23,-4.997 -8.607,-12.47 -8.741,-17.787 -0.043,-3.114 2.236,-15.419 3.133,-16.791 0.961,-1.394 5.126,0.989 4.438,2.554 z"
+                 id="path7148" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 88.602,219.379 c -0.871,2.593 -1.584,19.383 3.067,26.338 4.65,6.891 3.06,10.109 -1.808,5.098 -5.062,-4.882 -8.287,-12.125 -8.481,-17.432 -0.087,-3.131 2.095,-14.998 2.952,-16.373 0.915,-1.345 4.926,0.828 4.27,2.369 z"
+                 id="path7150" />
+              <path
+                 style="fill:#0b0b0b"
+                 inkscape:connector-curvature="0"
+                 d="m 88.512,219.729 c -0.839,2.844 -1.513,19.066 3.124,26.006 4.638,6.881 2.935,9.729 -1.774,4.84 -4.893,-4.768 -7.967,-11.779 -8.223,-17.076 -0.129,-3.149 1.955,-14.576 2.772,-15.955 0.868,-1.299 4.724,0.665 4.101,2.185 z"
+                 id="path7152" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 88.422,220.079 c -0.806,3.096 -1.439,18.748 3.183,25.674 4.623,6.869 2.809,9.347 -1.742,4.58 -4.724,-4.651 -7.646,-11.434 -7.963,-16.719 -0.173,-3.168 1.814,-14.154 2.592,-15.537 0.819,-1.252 4.52,0.504 3.93,2.002 z"
+                 id="path7154" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 88.332,220.426 c -0.773,3.349 -1.368,18.433 3.24,25.345 4.608,6.858 2.682,8.964 -1.71,4.319 -4.554,-4.535 -7.326,-11.088 -7.704,-16.361 -0.216,-3.186 1.674,-13.734 2.412,-15.12 0.774,-1.206 4.32,0.343 3.762,1.817 z"
+                 id="path7156" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 88.242,220.777 c -0.741,3.601 -1.296,18.115 3.298,25.013 4.594,6.848 2.556,8.582 -1.678,4.061 -4.385,-4.421 -7.006,-10.742 -7.444,-16.006 -0.26,-3.203 1.533,-13.313 2.231,-14.702 0.728,-1.16 4.118,0.18 3.593,1.634 z"
+                 id="path7158" />
+              <path
+                 style="fill:#1a1a1a"
+                 inkscape:connector-curvature="0"
+                 d="m 88.152,221.125 c -0.709,3.853 -1.224,17.799 3.355,24.682 4.579,6.837 2.43,8.201 -1.646,3.802 -4.216,-4.306 -6.686,-10.397 -7.186,-15.649 -0.303,-3.221 1.394,-12.892 2.052,-14.285 0.682,-1.112 3.918,0.018 3.425,1.45 z"
+                 id="path7160" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 88.062,221.475 c -0.677,4.104 -1.152,17.482 3.413,24.35 4.564,6.826 2.304,7.82 -1.613,3.543 -4.046,-4.191 -6.365,-10.051 -6.927,-15.293 -0.345,-3.24 1.253,-12.47 1.872,-13.867 0.634,-1.066 3.716,-0.144 3.255,1.267 z"
+                 id="path7162" />
+              <path
+                 style="fill:#222222"
+                 inkscape:connector-curvature="0"
+                 d="m 87.972,221.825 c -0.645,4.355 -1.08,17.164 3.47,24.018 4.551,6.816 2.179,7.439 -1.58,3.285 -3.877,-4.076 -6.044,-9.707 -6.667,-14.938 -0.389,-3.258 1.112,-12.049 1.691,-13.449 0.587,-1.019 3.514,-0.306 3.086,1.084 z"
+                 id="path7164" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 87.883,222.172 c -0.612,4.609 -1.009,16.849 3.527,23.688 4.536,6.804 2.052,7.056 -1.548,3.024 -3.708,-3.961 -5.724,-9.36 -6.408,-14.58 -0.432,-3.276 0.973,-11.629 1.513,-13.032 0.54,-0.971 3.311,-0.467 2.916,0.9 z"
+                 id="path7166" />
+              <path
+                 style="fill:#2a2a2a"
+                 inkscape:connector-curvature="0"
+                 d="m 87.792,222.523 c -0.579,4.86 -0.936,16.531 3.586,23.356 4.521,6.793 1.926,6.675 -1.516,2.765 -3.539,-3.845 -5.403,-9.015 -6.148,-14.224 -0.476,-3.293 0.831,-11.207 1.332,-12.614 0.493,-0.925 3.11,-0.63 2.746,0.717 z"
+                 id="path7168" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 87.702,222.872 c -0.547,5.112 -0.864,16.215 3.644,23.025 4.507,6.783 1.8,6.293 -1.483,2.506 -3.369,-3.73 -5.083,-8.669 -5.89,-13.867 -0.519,-3.312 0.691,-10.785 1.152,-12.197 0.446,-0.878 2.908,-0.792 2.577,0.533 z"
+                 id="path7170" />
+              <path
+                 style="fill:#313131"
+                 inkscape:connector-curvature="0"
+                 d="m 87.612,223.221 c -0.515,5.363 -0.792,15.898 3.701,22.693 4.492,6.772 1.674,5.912 -1.451,2.248 -3.2,-3.615 -4.763,-8.324 -5.63,-13.512 -0.563,-3.33 0.551,-10.363 0.972,-11.779 0.399,-0.831 2.707,-0.953 2.408,0.35 z"
+                 id="path7172" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 87.522,223.57 c -0.482,5.616 -0.72,15.581 3.758,22.363 4.479,6.761 1.549,5.53 -1.418,1.987 -3.031,-3.5 -4.442,-7.978 -5.371,-13.154 -0.604,-3.348 0.41,-9.943 0.792,-11.361 0.352,-0.785 2.506,-1.115 2.239,0.165 z"
+                 id="path7174" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 87.432,223.918 c -0.45,5.869 -0.648,15.265 3.815,22.033 4.464,6.75 1.422,5.147 -1.386,1.728 -2.862,-3.384 -4.122,-7.632 -5.112,-12.798 -0.647,-3.366 0.271,-9.522 0.612,-10.944 0.307,-0.737 2.305,-1.278 2.071,-0.019 z"
+                 id="path7176" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 87.343,224.269 c -0.418,6.12 -0.576,14.946 3.873,21.7 4.45,6.74 1.296,4.767 -1.354,1.469 -2.692,-3.27 -3.802,-7.286 -4.853,-12.441 -0.691,-3.383 0.129,-9.101 0.432,-10.527 0.26,-0.691 2.103,-1.44 1.902,-0.201 z"
+                 id="path7178" />
+              <path
+                 style="fill:#414141"
+                 inkscape:connector-curvature="0"
+                 d="m 87.252,224.618 c -0.385,6.373 -0.504,14.631 3.932,21.369 4.436,6.729 1.17,4.385 -1.321,1.211 -2.523,-3.154 -3.481,-6.941 -4.594,-12.086 -0.734,-3.402 -0.011,-8.68 0.252,-10.109 0.212,-0.644 1.901,-1.602 1.731,-0.385 z"
+                 id="path7180" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 87.162,224.967 c -0.353,6.623 -0.432,14.314 3.989,21.037 4.421,6.719 1.044,4.004 -1.289,0.951 -2.354,-3.039 -3.161,-6.595 -4.334,-11.729 -0.778,-3.42 -0.151,-8.258 0.071,-9.691 0.166,-0.597 1.7,-1.763 1.563,-0.568 z"
+                 id="path7182" />
+              <path
+                 style="fill:#484848"
+                 inkscape:connector-curvature="0"
+                 d="m 87.072,225.316 c -0.32,6.876 -0.36,13.997 4.047,20.707 4.406,6.707 0.918,3.622 -1.257,0.692 -2.186,-2.924 -2.841,-6.25 -4.075,-11.373 -0.82,-3.438 -0.292,-7.838 -0.108,-9.273 0.119,-0.551 1.498,-1.926 1.393,-0.753 z"
+                 id="path7184" />
+            </g>
+            <path
+               style="fill:#4c4c4c"
+               inkscape:connector-curvature="0"
+               d="m 86.982,225.665 c -0.288,7.129 -0.288,13.68 4.104,20.377 4.393,6.695 0.792,3.24 -1.224,0.432 -2.016,-2.808 -2.52,-5.904 -3.816,-11.016 -0.863,-3.457 -0.432,-7.416 -0.287,-8.856 0.071,-0.505 1.295,-2.089 1.223,-0.937 z"
+               id="path7186" />
+          </g>
+          <g
+             id="g7188">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 88.782,218.681 c 4.32,-9.433 6.696,-19.584 12.888,-29.448 6.12,-9.792 3.672,-13.608 -0.863,-8.64 -4.536,4.968 -9.504,15.48 -9.504,15.48 0,0 -5.832,9.216 -7.128,19.872 -0.217,1.8 3.887,4.248 4.607,2.736 z"
+               id="path7190" />
+            <g
+               id="g7192">
+              <path
+                 style="fill:#020202"
+                 inkscape:connector-curvature="0"
+                 d="m 88.968,218.071 c 4.279,-9.5 6.615,-19.246 12.586,-28.802 5.901,-9.488 3.608,-13.279 -0.764,-8.472 -4.403,4.847 -9.302,15.236 -9.368,15.381 0,0 -5.637,8.993 -6.877,19.239 -0.209,1.771 3.72,4.145 4.423,2.654 z"
+                 id="path7194" />
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 89.152,217.459 c 4.239,-9.566 6.535,-18.908 12.284,-28.155 5.683,-9.183 3.547,-12.95 -0.663,-8.303 -4.27,4.725 -9.099,14.991 -9.231,15.282 0,0 -5.442,8.766 -6.627,18.605 -0.201,1.741 3.554,4.042 4.237,2.571 z"
+                 id="path7196" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 89.338,216.849 c 4.199,-9.634 6.454,-18.572 11.981,-27.51 5.465,-8.878 3.484,-12.621 -0.563,-8.135 -4.137,4.605 -8.896,14.748 -9.096,15.184 0,0 -5.247,8.542 -6.376,17.972 -0.192,1.713 3.387,3.937 4.054,2.489 z"
+                 id="path7198" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 89.522,216.239 c 4.159,-9.701 6.375,-18.234 11.68,-26.865 5.247,-8.573 3.422,-12.292 -0.461,-7.966 -4.005,4.483 -8.693,14.503 -8.96,15.085 0,0 -5.053,8.317 -6.126,17.337 -0.186,1.684 3.219,3.837 3.867,2.409 z"
+                 id="path7200" />
+              <path
+                 style="fill:#0c0c0c"
+                 inkscape:connector-curvature="0"
+                 d="m 89.708,215.627 c 4.118,-9.769 6.294,-17.897 11.376,-26.218 5.029,-8.268 3.36,-11.962 -0.359,-7.797 -3.871,4.361 -8.49,14.259 -8.823,14.985 0,0 -4.858,8.093 -5.876,16.706 -0.179,1.653 3.051,3.731 3.682,2.324 z"
+                 id="path7202" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 89.893,215.017 c 4.077,-9.836 6.213,-17.56 11.073,-25.573 4.812,-7.963 3.298,-11.633 -0.259,-7.629 -3.738,4.241 -8.288,14.015 -8.688,14.887 0,0 -4.663,7.868 -5.625,16.072 -0.169,1.624 2.886,3.628 3.499,2.243 z"
+                 id="path7204" />
+              <path
+                 style="fill:#111111"
+                 inkscape:connector-curvature="0"
+                 d="m 90.078,214.407 c 4.037,-9.904 6.133,-17.224 10.772,-24.928 4.593,-7.658 3.234,-11.304 -0.159,-7.46 -3.605,4.119 -8.085,13.771 -8.551,14.788 0,0 -4.47,7.645 -5.375,15.439 -0.162,1.594 2.718,3.524 3.313,2.161 z"
+                 id="path7206" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 90.263,213.795 c 3.997,-9.971 6.052,-16.885 10.47,-24.281 4.374,-7.353 3.172,-10.975 -0.059,-7.291 -3.472,3.998 -7.882,13.526 -8.415,14.689 0,0 -4.273,7.418 -5.124,14.805 -0.154,1.565 2.551,3.421 3.128,2.078 z"
+                 id="path7208" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 90.449,213.184 c 3.956,-10.037 5.972,-16.548 10.167,-23.635 4.156,-7.048 3.11,-10.645 0.043,-7.123 -3.34,3.877 -7.68,13.283 -8.279,14.591 0,0 -4.08,7.194 -4.874,14.172 -0.147,1.535 2.383,3.317 2.943,1.995 z"
+                 id="path7210" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 90.634,212.573 c 3.916,-10.105 5.892,-16.209 9.865,-22.989 3.938,-6.743 3.047,-10.316 0.144,-6.954 -3.207,3.755 -7.477,13.038 -8.143,14.491 0,0 -3.886,6.969 -4.624,13.54 -0.139,1.506 2.217,3.213 2.758,1.912 z"
+                 id="path7212" />
+              <path
+                 style="fill:#1c1c1c"
+                 inkscape:connector-curvature="0"
+                 d="m 90.819,211.963 c 3.875,-10.174 5.811,-15.874 9.563,-22.344 3.721,-6.438 2.984,-9.987 0.244,-6.785 -3.073,3.634 -7.274,12.793 -8.007,14.392 0,0 -3.69,6.745 -4.373,12.905 -0.131,1.477 2.049,3.112 2.573,1.832 z"
+                 id="path7214" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 91.004,211.352 c 3.836,-10.24 5.73,-15.536 9.262,-21.698 3.501,-6.133 2.922,-9.658 0.344,-6.617 -2.94,3.513 -7.071,12.55 -7.87,14.293 0,0 -3.496,6.521 -4.123,12.272 -0.124,1.447 1.881,3.009 2.387,1.75 z"
+                 id="path7216" />
+              <path
+                 style="fill:#212121"
+                 inkscape:connector-curvature="0"
+                 d="m 91.189,210.741 c 3.795,-10.307 5.649,-15.198 8.958,-21.052 3.284,-5.828 2.859,-9.328 0.445,-6.448 -2.808,3.392 -6.868,12.305 -7.734,14.195 0,0 -3.301,6.295 -3.872,11.639 -0.115,1.418 1.715,2.904 2.203,1.666 z"
+                 id="path7218" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 91.375,210.129 c 3.754,-10.373 5.569,-14.86 8.655,-20.405 3.066,-5.523 2.797,-8.999 0.547,-6.279 -2.675,3.27 -6.666,12.061 -7.599,14.097 0,0 -3.106,6.07 -3.622,11.004 -0.107,1.388 1.548,2.801 2.019,1.583 z"
+                 id="path7220" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 91.559,209.519 c 3.714,-10.44 5.489,-14.523 8.354,-19.76 2.847,-5.218 2.735,-8.67 0.647,-6.111 -2.542,3.149 -6.463,11.817 -7.462,13.997 0,0 -2.912,5.848 -3.372,10.373 -0.099,1.357 1.381,2.697 1.833,1.501 z"
+                 id="path7222" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 91.745,208.909 c 3.674,-10.509 5.408,-14.187 8.051,-19.115 2.629,-4.913 2.672,-8.341 0.748,-5.942 -2.409,3.028 -6.261,11.573 -7.326,13.898 0,0 -2.717,5.621 -3.121,9.738 -0.092,1.33 1.213,2.595 1.648,1.421 z"
+                 id="path7224" />
+              <path
+                 style="fill:#2b2b2b"
+                 inkscape:connector-curvature="0"
+                 d="m 91.929,208.297 c 3.634,-10.575 5.328,-13.848 7.75,-18.468 2.41,-4.608 2.609,-8.011 0.848,-5.773 -2.275,2.906 -6.058,11.328 -7.189,13.799 0,0 -2.522,5.397 -2.871,9.106 -0.084,1.299 1.046,2.491 1.462,1.336 z"
+                 id="path7226" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 92.115,207.687 c 3.593,-10.643 5.247,-13.512 7.447,-17.823 2.191,-4.303 2.547,-7.682 0.949,-5.605 -2.144,2.786 -5.855,11.085 -7.055,13.701 0,0 -2.327,5.172 -2.62,8.473 -0.076,1.269 0.881,2.386 1.279,1.254 z"
+                 id="path7228" />
+              <path
+                 style="fill:#303030"
+                 inkscape:connector-curvature="0"
+                 d="m 92.301,207.077 c 3.552,-10.71 5.167,-13.175 7.145,-17.178 1.974,-3.998 2.484,-7.353 1.05,-5.436 -2.011,2.664 -5.652,10.84 -6.918,13.602 0,0 -2.133,4.947 -2.37,7.839 -0.07,1.24 0.712,2.283 1.093,1.173 z"
+                 id="path7230" />
+            </g>
+            <path
+               style="fill:#333333"
+               inkscape:connector-curvature="0"
+               d="m 92.485,206.465 c 3.513,-10.778 5.087,-12.837 6.843,-16.531 1.756,-3.694 2.422,-7.024 1.15,-5.268 -1.877,2.543 -5.449,10.596 -6.781,13.502 0,0 -1.938,4.724 -2.12,7.207 -0.061,1.211 0.545,2.18 0.908,1.09 z"
+               id="path7232" />
+          </g>
+          <g
+             id="g7234">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 273.03,225.592 c 2.088,-5.903 1.872,-20.951 -3.456,-30.671 -1.872,-3.528 -3.672,-7.632 -4.752,-7.848 -1.152,-0.216 -3.24,2.088 -3.024,2.448 0.288,0.576 10.009,14.256 7.992,32.832 -0.144,1.513 2.736,4.608 3.24,3.239 z"
+               id="path7236" />
+            <g
+               id="g7238">
+              <path
+                 style="fill:#030303"
+                 inkscape:connector-curvature="0"
+                 d="m 272.936,224.831 c 2.025,-5.719 1.753,-20.379 -3.344,-29.663 -1.815,-3.407 -3.535,-7.374 -4.595,-7.59 -1.122,-0.214 -3.125,2.022 -2.925,2.367 0.258,0.562 9.605,13.778 7.729,31.753 -0.129,1.487 2.647,4.456 3.135,3.133 z"
+                 id="path7240" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 272.841,224.068 c 1.967,-5.532 1.637,-19.808 -3.228,-28.654 -1.762,-3.286 -3.401,-7.115 -4.44,-7.332 -1.091,-0.211 -3.009,1.956 -2.824,2.287 0.227,0.548 9.201,13.299 7.466,30.672 -0.118,1.463 2.555,4.305 3.026,3.027 z"
+                 id="path7242" />
+              <path
+                 style="fill:#0b0b0b"
+                 inkscape:connector-curvature="0"
+                 d="m 272.747,223.305 c 1.904,-5.348 1.518,-19.235 -3.115,-27.645 -1.706,-3.165 -3.265,-6.856 -4.282,-7.073 -1.062,-0.21 -2.896,1.889 -2.727,2.206 0.197,0.534 8.799,12.821 7.203,29.592 -0.103,1.44 2.466,4.153 2.921,2.92 z"
+                 id="path7244" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 272.652,222.542 c 1.843,-5.162 1.398,-18.662 -3.001,-26.635 -1.65,-3.044 -3.13,-6.598 -4.127,-6.815 -1.03,-0.207 -2.779,1.823 -2.626,2.126 0.167,0.52 8.396,12.341 6.94,28.511 -0.09,1.416 2.376,4.001 2.814,2.813 z"
+                 id="path7246" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 272.558,221.779 c 1.78,-4.976 1.279,-18.09 -2.889,-25.626 -1.595,-2.923 -2.994,-6.34 -3.97,-6.557 -1,-0.205 -2.664,1.756 -2.527,2.045 0.137,0.506 7.993,11.861 6.679,27.432 -0.078,1.392 2.285,3.849 2.707,2.706 z"
+                 id="path7248" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 272.463,221.016 c 1.721,-4.79 1.163,-17.518 -2.773,-24.617 -1.539,-2.802 -2.858,-6.081 -3.814,-6.299 -0.969,-0.203 -2.548,1.691 -2.427,1.965 0.106,0.492 7.59,11.383 6.415,26.352 -0.065,1.369 2.194,3.697 2.599,2.599 z"
+                 id="path7250" />
+              <path
+                 style="fill:#1a1a1a"
+                 inkscape:connector-curvature="0"
+                 d="m 272.369,220.254 c 1.659,-4.605 1.044,-16.946 -2.66,-23.609 -1.483,-2.681 -2.723,-5.822 -3.658,-6.04 -0.938,-0.201 -2.434,1.624 -2.326,1.884 0.074,0.478 7.185,10.904 6.15,25.271 -0.051,1.344 2.106,3.546 2.494,2.494 z"
+                 id="path7252" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 272.274,219.491 c 1.598,-4.42 0.926,-16.373 -2.546,-22.6 -1.43,-2.56 -2.587,-5.564 -3.501,-5.782 -0.908,-0.198 -2.319,1.558 -2.229,1.804 0.044,0.464 6.782,10.425 5.889,24.19 -0.037,1.321 2.016,3.396 2.387,2.388 z"
+                 id="path7254" />
+              <path
+                 style="fill:#222222"
+                 inkscape:connector-curvature="0"
+                 d="m 272.18,218.728 c 1.535,-4.233 0.807,-15.802 -2.434,-21.59 -1.373,-2.439 -2.452,-5.306 -3.345,-5.524 -0.877,-0.197 -2.203,1.491 -2.128,1.723 0.014,0.45 6.379,9.947 5.625,23.111 -0.023,1.297 1.927,3.242 2.282,2.28 z"
+                 id="path7256" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 272.085,217.965 c 1.476,-4.049 0.69,-15.229 -2.318,-20.582 -1.317,-2.317 -2.316,-5.046 -3.188,-5.265 -0.847,-0.194 -2.088,1.425 -2.029,1.642 -0.016,0.436 5.977,9.468 5.362,22.032 -0.011,1.272 1.835,3.089 2.173,2.173 z"
+                 id="path7258" />
+              <path
+                 style="fill:#2a2a2a"
+                 inkscape:connector-curvature="0"
+                 d="m 271.991,217.202 c 1.413,-3.861 0.571,-14.656 -2.206,-19.572 -1.262,-2.196 -2.18,-4.788 -3.032,-5.007 -0.815,-0.191 -1.973,1.36 -1.929,1.562 -0.047,0.422 5.573,8.988 5.099,20.951 0.003,1.247 1.746,2.939 2.068,2.066 z"
+                 id="path7260" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 271.896,216.439 c 1.353,-3.677 0.453,-14.084 -2.091,-18.563 -1.207,-2.076 -2.045,-4.529 -2.876,-4.749 -0.786,-0.19 -1.858,1.293 -1.83,1.481 -0.077,0.408 5.17,8.51 4.836,19.87 0.017,1.226 1.656,2.789 1.961,1.961 z"
+                 id="path7262" />
+              <path
+                 style="fill:#313131"
+                 inkscape:connector-curvature="0"
+                 d="m 271.802,215.676 c 1.29,-3.491 0.334,-13.512 -1.979,-17.553 -1.151,-1.956 -1.909,-4.272 -2.72,-4.493 -0.755,-0.187 -1.742,1.227 -1.73,1.401 -0.106,0.394 4.768,8.031 4.573,18.791 0.031,1.202 1.567,2.637 1.856,1.854 z"
+                 id="path7264" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 271.707,214.915 c 1.23,-3.307 0.217,-12.94 -1.864,-16.545 -1.096,-1.834 -1.773,-4.014 -2.563,-4.234 -0.725,-0.185 -1.627,1.16 -1.631,1.32 -0.138,0.38 4.364,7.552 4.311,17.71 0.042,1.176 1.475,2.485 1.747,1.749 z"
+                 id="path7266" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 271.613,214.151 c 1.168,-3.119 0.098,-12.367 -1.751,-15.535 -1.04,-1.714 -1.638,-3.755 -2.407,-3.976 -0.693,-0.183 -1.512,1.094 -1.531,1.24 -0.168,0.366 3.962,7.074 4.049,16.63 0.055,1.153 1.384,2.332 1.64,1.641 z"
+                 id="path7268" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 271.518,213.388 c 1.106,-2.935 -0.021,-11.796 -1.638,-14.527 -0.983,-1.592 -1.502,-3.496 -2.25,-3.716 -0.664,-0.181 -1.396,1.028 -1.432,1.159 -0.198,0.352 3.558,6.594 3.785,15.549 0.07,1.13 1.296,2.183 1.535,1.535 z"
+                 id="path7270" />
+              <path
+                 style="fill:#414141"
+                 inkscape:connector-curvature="0"
+                 d="m 271.424,212.625 c 1.047,-2.75 -0.139,-11.223 -1.522,-13.518 -0.93,-1.471 -1.367,-3.238 -2.094,-3.459 -0.635,-0.178 -1.282,0.962 -1.333,1.079 -0.229,0.338 3.153,6.114 3.521,14.47 0.083,1.106 1.205,2.03 1.428,1.428 z"
+                 id="path7272" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 271.329,211.862 c 0.985,-2.563 -0.256,-10.65 -1.409,-12.508 -0.874,-1.35 -1.23,-2.979 -1.938,-3.2 -0.604,-0.177 -1.166,0.895 -1.233,0.998 -0.259,0.324 2.751,5.636 3.259,13.39 0.096,1.082 1.115,1.876 1.321,1.32 z"
+                 id="path7274" />
+              <path
+                 style="fill:#484848"
+                 inkscape:connector-curvature="0"
+                 d="m 271.235,211.099 c 0.923,-2.377 -0.375,-10.077 -1.296,-11.499 -0.818,-1.229 -1.097,-2.72 -1.781,-2.942 -0.573,-0.174 -1.052,0.829 -1.134,0.918 -0.289,0.309 2.348,5.156 2.996,12.309 0.11,1.058 1.025,1.726 1.215,1.214 z"
+                 id="path7276" />
+            </g>
+            <path
+               style="fill:#4c4c4c"
+               inkscape:connector-curvature="0"
+               d="m 271.14,210.336 c 0.861,-2.192 -0.493,-9.506 -1.183,-10.49 -0.763,-1.107 -0.96,-2.463 -1.625,-2.684 -0.542,-0.172 -0.936,0.762 -1.034,0.836 -0.319,0.297 1.945,4.68 2.733,11.229 0.124,1.035 0.936,1.576 1.109,1.109 z"
+               id="path7278" />
+          </g>
+          <g
+             id="g7280">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 264.822,187.073 c -10.224,-13.968 -23.472,-18.504 -22.104,-14.112 0,0 10.152,5.76 19.08,16.56 1.728,2.088 4.608,-0.288 3.024,-2.448 z"
+               id="path7282" />
+            <g
+               id="g7284">
+              <path
+                 style="fill:#030303"
+                 inkscape:connector-curvature="0"
+                 d="m 264.372,186.687 c -9.924,-13.495 -22.894,-17.912 -21.539,-13.7 0.018,0.012 9.901,5.614 18.609,16.071 1.678,2.016 4.467,-0.285 2.93,-2.371 z"
+                 id="path7286" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 263.922,186.3 c -9.624,-13.022 -22.316,-17.319 -20.975,-13.287 0.036,0.023 9.652,5.467 18.139,15.582 1.628,1.943 4.325,-0.283 2.836,-2.295 z"
+                 id="path7288" />
+              <path
+                 style="fill:#0b0b0b"
+                 inkscape:connector-curvature="0"
+                 d="m 263.472,185.913 c -9.324,-12.549 -21.739,-16.726 -20.41,-12.874 0.053,0.034 9.4,5.32 17.668,15.093 1.578,1.871 4.183,-0.28 2.742,-2.219 z"
+                 id="path7290" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 263.022,185.527 c -9.024,-12.077 -21.162,-16.134 -19.847,-12.462 0.071,0.045 9.151,5.174 17.198,14.604 1.529,1.798 4.043,-0.278 2.649,-2.142 z"
+                 id="path7292" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 262.571,185.14 c -8.723,-11.603 -20.583,-15.541 -19.28,-12.049 0.088,0.056 8.901,5.027 16.728,14.114 1.477,1.726 3.899,-0.275 2.552,-2.065 z"
+                 id="path7294" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 262.121,184.753 c -8.423,-11.13 -20.006,-14.948 -18.716,-11.636 0.106,0.067 8.651,4.88 16.257,13.625 1.428,1.654 3.759,-0.272 2.459,-1.989 z"
+                 id="path7296" />
+              <path
+                 style="fill:#1a1a1a"
+                 inkscape:connector-curvature="0"
+                 d="m 261.671,184.367 c -8.124,-10.658 -19.428,-14.356 -18.15,-11.224 0.124,0.078 8.399,4.734 15.785,13.136 1.378,1.581 3.617,-0.27 2.365,-1.912 z"
+                 id="path7298" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 261.221,183.98 c -7.824,-10.185 -18.851,-13.763 -17.588,-10.811 0.143,0.089 8.151,4.587 15.315,12.647 1.33,1.508 3.477,-0.267 2.273,-1.836 z"
+                 id="path7300" />
+              <path
+                 style="fill:#222222"
+                 inkscape:connector-curvature="0"
+                 d="m 260.771,183.593 c -7.524,-9.711 -18.273,-13.17 -17.022,-10.398 0.159,0.1 7.9,4.44 14.844,12.158 1.279,1.436 3.335,-0.265 2.178,-1.76 z"
+                 id="path7302" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 260.321,183.206 c -7.224,-9.238 -17.695,-12.578 -16.458,-9.985 0.177,0.111 7.65,4.293 14.374,11.668 1.229,1.364 3.193,-0.262 2.084,-1.683 z"
+                 id="path7304" />
+              <path
+                 style="fill:#2a2a2a"
+                 inkscape:connector-curvature="0"
+                 d="m 259.871,182.82 c -6.924,-8.766 -17.118,-11.986 -15.893,-9.573 0.193,0.122 7.398,4.147 13.902,11.179 1.18,1.291 3.053,-0.259 1.991,-1.606 z"
+                 id="path7306" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 259.42,182.433 c -6.623,-8.293 -16.539,-11.393 -15.328,-9.16 0.214,0.133 7.15,4 13.434,10.69 1.128,1.219 2.909,-0.257 1.894,-1.53 z"
+                 id="path7308" />
+              <path
+                 style="fill:#313131"
+                 inkscape:connector-curvature="0"
+                 d="m 258.97,182.046 c -6.323,-7.819 -15.963,-10.8 -14.764,-8.747 0.23,0.144 6.899,3.853 12.962,10.201 1.08,1.146 2.769,-0.254 1.802,-1.454 z"
+                 id="path7310" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 258.52,181.66 c -6.023,-7.347 -15.384,-10.208 -14.199,-8.335 0.248,0.155 6.649,3.707 12.492,9.712 1.028,1.073 2.627,-0.252 1.707,-1.377 z"
+                 id="path7312" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 258.07,181.273 c -5.723,-6.874 -14.807,-9.615 -13.634,-7.922 0.265,0.166 6.398,3.56 12.021,9.222 0.978,1.002 2.485,-0.249 1.613,-1.3 z"
+                 id="path7314" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 257.62,180.886 c -5.423,-6.401 -14.229,-9.021 -13.07,-7.509 0.283,0.177 6.149,3.413 11.552,8.733 0.927,0.929 2.343,-0.246 1.518,-1.224 z"
+                 id="path7316" />
+              <path
+                 style="fill:#414141"
+                 inkscape:connector-curvature="0"
+                 d="m 257.17,180.5 c -5.124,-5.928 -13.65,-8.43 -12.505,-7.097 0.301,0.188 5.898,3.267 11.079,8.244 0.879,0.856 2.203,-0.244 1.426,-1.147 z"
+                 id="path7318" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 256.719,180.113 c -4.823,-5.455 -13.073,-7.837 -11.94,-6.684 0.319,0.199 5.649,3.12 10.609,7.755 0.829,0.784 2.061,-0.241 1.331,-1.071 z"
+                 id="path7320" />
+              <path
+                 style="fill:#484848"
+                 inkscape:connector-curvature="0"
+                 d="m 256.269,179.726 c -4.523,-4.982 -12.495,-7.244 -11.375,-6.271 0.336,0.21 5.397,2.973 10.138,7.266 0.779,0.711 1.92,-0.239 1.237,-0.995 z"
+                 id="path7322" />
+            </g>
+            <path
+               style="fill:#4c4c4c"
+               inkscape:connector-curvature="0"
+               d="m 255.819,179.339 c -4.223,-4.509 -11.918,-6.652 -10.812,-5.859 0.354,0.222 5.148,2.827 9.668,6.777 0.73,0.639 1.779,-0.236 1.144,-0.918 z"
+               id="path7324" />
+          </g>
+          <g
+             id="g7326">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 273.03,225.592 c 0.144,6.265 -5.76,22.248 -7.992,21.673 -2.52,-0.576 0.504,-5.257 2.809,-13.177 0.936,-3.312 1.655,-11.447 1.943,-11.735 0.936,-0.936 3.24,1.728 3.24,3.239 z"
+               id="path7328" />
+            <g
+               id="g7330">
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 272.846,226.116 c 0.103,6.082 -5.638,21.594 -7.797,21.018 -2.422,-0.567 0.548,-5.146 2.814,-12.928 0.899,-3.178 1.595,-10.947 1.887,-11.25 0.914,-0.927 3.147,1.527 3.096,3.16 z"
+                 id="path7332" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 272.662,226.637 c 0.063,5.902 -5.514,20.939 -7.601,20.363 -2.323,-0.558 0.592,-5.035 2.82,-12.681 0.861,-3.041 1.534,-10.446 1.83,-10.761 0.89,-0.917 3.054,1.327 2.951,3.079 z"
+                 id="path7334" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 272.478,227.159 c 0.021,5.721 -5.392,20.284 -7.405,19.711 -2.224,-0.55 0.635,-4.927 2.827,-12.434 0.824,-2.907 1.473,-9.945 1.773,-10.273 0.866,-0.911 2.959,1.125 2.805,2.996 z"
+                 id="path7336" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 272.294,227.68 c -0.02,5.539 -5.268,19.63 -7.21,19.057 -2.125,-0.541 0.68,-4.816 2.835,-12.186 0.786,-2.771 1.412,-9.445 1.717,-9.786 0.84,-0.901 2.863,0.924 2.658,2.915 z"
+                 id="path7338" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 272.11,228.202 c -0.063,5.359 -5.146,18.977 -7.014,18.403 -2.027,-0.532 0.722,-4.706 2.841,-11.938 0.748,-2.637 1.351,-8.944 1.659,-9.299 0.818,-0.893 2.77,0.722 2.514,2.834 z"
+                 id="path7340" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 271.926,228.723 c -0.103,5.179 -5.021,18.322 -6.818,17.75 -1.928,-0.523 0.766,-4.596 2.848,-11.691 0.711,-2.5 1.29,-8.443 1.603,-8.811 0.792,-0.885 2.674,0.522 2.367,2.752 z"
+                 id="path7342" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 271.742,229.245 c -0.144,4.998 -4.9,17.668 -6.623,17.096 -1.83,-0.514 0.811,-4.485 2.854,-11.442 0.673,-2.366 1.229,-7.944 1.545,-8.325 0.771,-0.876 2.583,0.32 2.224,2.671 z"
+                 id="path7344" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 271.558,229.766 c -0.186,4.816 -4.777,17.013 -6.428,16.443 -1.731,-0.506 0.854,-4.377 2.86,-11.196 0.636,-2.231 1.168,-7.443 1.488,-7.837 0.749,-0.866 2.49,0.119 2.08,2.59 z"
+                 id="path7346" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 271.374,230.288 c -0.226,4.637 -4.653,16.359 -6.231,15.789 -1.632,-0.496 0.896,-4.266 2.866,-10.947 0.6,-2.098 1.107,-6.943 1.433,-7.351 0.722,-0.859 2.393,-0.081 1.932,2.509 z"
+                 id="path7348" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 271.19,230.809 c -0.268,4.456 -4.531,15.705 -6.036,15.136 -1.534,-0.489 0.94,-4.155 2.873,-10.7 0.561,-1.961 1.046,-6.443 1.375,-6.863 0.7,-0.848 2.3,-0.282 1.788,2.427 z"
+                 id="path7350" />
+              <path
+                 style="fill:#383838"
+                 inkscape:connector-curvature="0"
+                 d="m 271.006,231.331 c -0.308,4.275 -4.407,15.051 -5.841,14.482 -1.435,-0.48 0.984,-4.046 2.88,-10.453 0.524,-1.826 0.985,-5.941 1.318,-6.375 0.676,-0.84 2.206,-0.483 1.643,2.346 z"
+                 id="path7352" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 270.822,231.853 c -0.35,4.093 -4.285,14.396 -5.645,13.828 -1.338,-0.472 1.027,-3.937 2.886,-10.206 0.485,-1.691 0.924,-5.441 1.261,-5.887 0.653,-0.832 2.113,-0.684 1.498,2.265 z"
+                 id="path7354" />
+              <path
+                 style="fill:#424242"
+                 inkscape:connector-curvature="0"
+                 d="m 270.638,232.374 c -0.392,3.914 -4.162,13.742 -5.45,13.176 -1.238,-0.463 1.072,-3.826 2.893,-9.959 0.449,-1.555 0.863,-4.94 1.204,-5.399 0.629,-0.824 2.019,-0.886 1.353,2.182 z"
+                 id="path7356" />
+              <path
+                 style="fill:#474747"
+                 inkscape:connector-curvature="0"
+                 d="m 270.454,232.896 c -0.432,3.731 -4.039,13.087 -5.254,12.521 -1.14,-0.453 1.115,-3.715 2.9,-9.711 0.411,-1.42 0.802,-4.439 1.146,-4.912 0.606,-0.815 1.925,-1.086 1.208,2.102 z"
+                 id="path7358" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 270.27,233.417 c -0.474,3.553 -3.916,12.434 -5.06,11.869 -1.041,-0.445 1.159,-3.606 2.907,-9.463 0.373,-1.287 0.741,-3.941 1.089,-4.427 0.583,-0.806 1.832,-1.287 1.064,2.021 z"
+                 id="path7360" />
+              <path
+                 style="fill:#515151"
+                 inkscape:connector-curvature="0"
+                 d="m 270.086,233.939 c -0.514,3.37 -3.793,11.778 -4.862,11.214 -0.942,-0.436 1.201,-3.496 2.913,-9.216 0.336,-1.151 0.68,-3.438 1.032,-3.938 0.558,-0.797 1.736,-1.489 0.917,1.94 z"
+                 id="path7362" />
+              <path
+                 style="fill:#565656"
+                 inkscape:connector-curvature="0"
+                 d="m 269.902,234.461 c -0.555,3.188 -3.671,11.123 -4.667,10.56 -0.844,-0.429 1.246,-3.386 2.919,-8.968 0.298,-1.016 0.619,-2.939 0.976,-3.451 0.535,-0.788 1.643,-1.689 0.772,1.859 z"
+                 id="path7364" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 269.718,234.982 c -0.597,3.009 -3.548,10.47 -4.472,9.907 -0.745,-0.42 1.29,-3.275 2.926,-8.721 0.262,-0.881 0.559,-2.438 0.919,-2.963 0.511,-0.781 1.549,-1.89 0.627,1.777 z"
+                 id="path7366" />
+              <path
+                 style="fill:#606060"
+                 inkscape:connector-curvature="0"
+                 d="m 269.534,235.504 c -0.638,2.828 -3.425,9.814 -4.276,9.252 -0.646,-0.409 1.333,-3.166 2.933,-8.473 0.224,-0.746 0.497,-1.938 0.862,-2.476 0.487,-0.769 1.454,-2.09 0.481,1.697 z"
+                 id="path7368" />
+            </g>
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 269.35,236.025 c -0.68,2.647 -3.303,9.161 -4.081,8.599 -0.548,-0.4 1.377,-3.056 2.938,-8.225 0.187,-0.611 0.437,-1.438 0.806,-1.988 0.464,-0.763 1.361,-2.293 0.337,1.614 z"
+               id="path7370" />
+          </g>
+          <g
+             id="g7372">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 251.07,187.865 c -1.537,1.622 -2.903,9.991 0.938,12.893 3.844,2.818 10.59,-2.391 10.59,-5.379 -0.086,-6.746 -9.991,-9.222 -11.528,-7.514 z"
+               id="path7374" />
+            <g
+               id="g7376">
+              <path
+                 style="fill:#010101"
+                 inkscape:connector-curvature="0"
+                 d="m 251.207,188.006 c -1.559,1.611 -2.876,9.823 0.857,12.667 3.731,2.764 10.349,-2.273 10.384,-5.279 -0.047,-6.576 -9.681,-9.083 -11.241,-7.388 z"
+                 id="path7378" />
+              <path
+                 style="fill:#030303"
+                 inkscape:connector-curvature="0"
+                 d="m 251.344,188.146 c -1.582,1.601 -2.85,9.653 0.774,12.438 3.62,2.709 10.109,-2.154 10.178,-5.177 -0.007,-6.404 -9.37,-8.943 -10.952,-7.261 z"
+                 id="path7380" />
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 251.481,188.287 c -1.604,1.589 -2.823,9.484 0.691,12.211 3.511,2.653 9.869,-2.037 9.975,-5.078 0.031,-6.232 -9.061,-8.802 -10.666,-7.133 z"
+                 id="path7382" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 251.617,188.427 c -1.626,1.579 -2.795,9.316 0.611,11.984 3.397,2.6 9.629,-1.918 9.768,-4.976 0.071,-6.062 -8.751,-8.664 -10.379,-7.008 z"
+                 id="path7384" />
+              <path
+                 style="fill:#090909"
+                 inkscape:connector-curvature="0"
+                 d="m 251.754,188.567 c -1.648,1.568 -2.768,9.146 0.529,11.758 3.287,2.543 9.389,-1.802 9.563,-4.875 0.109,-5.892 -8.441,-8.525 -10.092,-6.883 z"
+                 id="path7386" />
+              <path
+                 style="fill:#0b0b0b"
+                 inkscape:connector-curvature="0"
+                 d="m 251.891,188.708 c -1.671,1.557 -2.741,8.978 0.445,11.529 3.177,2.489 9.15,-1.683 9.358,-4.774 0.15,-5.72 -8.13,-8.385 -9.803,-6.755 z"
+                 id="path7388" />
+              <path
+                 style="fill:#0d0d0d"
+                 inkscape:connector-curvature="0"
+                 d="m 252.028,188.848 c -1.694,1.546 -2.715,8.809 0.364,11.302 3.064,2.435 8.908,-1.565 9.152,-4.673 0.189,-5.549 -7.82,-8.245 -9.516,-6.629 z"
+                 id="path7390" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 252.165,188.989 c -1.716,1.535 -2.688,8.64 0.282,11.074 2.953,2.38 8.669,-1.447 8.948,-4.572 0.226,-5.378 -7.512,-8.106 -9.23,-6.502 z"
+                 id="path7392" />
+              <path
+                 style="fill:#111111"
+                 inkscape:connector-curvature="0"
+                 d="m 252.301,189.129 c -1.737,1.524 -2.659,8.471 0.2,10.847 2.844,2.325 8.431,-1.33 8.743,-4.471 0.266,-5.207 -7.201,-7.966 -8.943,-6.376 z"
+                 id="path7394" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 252.438,189.269 c -1.76,1.514 -2.633,8.304 0.118,10.619 2.73,2.271 8.189,-1.212 8.538,-4.369 0.305,-5.036 -6.892,-7.827 -8.656,-6.25 z"
+                 id="path7396" />
+              <path
+                 style="fill:#151515"
+                 inkscape:connector-curvature="0"
+                 d="m 252.575,189.41 c -1.783,1.503 -2.606,8.133 0.036,10.391 2.62,2.216 7.949,-1.094 8.332,-4.268 0.344,-4.865 -6.581,-7.687 -8.368,-6.123 z"
+                 id="path7398" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 252.712,189.55 c -1.805,1.492 -2.58,7.965 -0.046,10.164 2.508,2.162 7.709,-0.975 8.127,-4.167 0.383,-4.694 -6.272,-7.548 -8.081,-5.997 z"
+                 id="path7400" />
+              <path
+                 style="fill:#181818"
+                 inkscape:connector-curvature="0"
+                 d="m 252.849,189.691 c -1.828,1.481 -2.554,7.796 -0.129,9.937 2.397,2.105 7.47,-0.857 7.922,-4.066 0.423,-4.524 -5.961,-7.409 -7.793,-5.871 z"
+                 id="path7402" />
+              <path
+                 style="fill:#1a1a1a"
+                 inkscape:connector-curvature="0"
+                 d="m 252.985,189.831 c -1.85,1.47 -2.525,7.626 -0.21,9.708 2.286,2.053 7.229,-0.74 7.717,-3.964 0.461,-4.352 -5.652,-7.269 -7.507,-5.744 z"
+                 id="path7404" />
+              <path
+                 style="fill:#1c1c1c"
+                 inkscape:connector-curvature="0"
+                 d="m 253.122,189.971 c -1.872,1.46 -2.499,7.459 -0.292,9.482 2.175,1.996 6.989,-0.623 7.511,-3.865 0.501,-4.18 -5.341,-7.128 -7.219,-5.617 z"
+                 id="path7406" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 253.259,190.112 c -1.895,1.448 -2.472,7.289 -0.375,9.254 2.064,1.942 6.75,-0.504 7.308,-3.763 0.539,-4.01 -5.033,-6.99 -6.933,-5.491 z"
+                 id="path7408" />
+              <path
+                 style="fill:#202020"
+                 inkscape:connector-curvature="0"
+                 d="m 253.396,190.252 c -1.917,1.438 -2.445,7.122 -0.457,9.027 1.953,1.888 6.51,-0.386 7.102,-3.662 0.578,-3.839 -4.722,-6.85 -6.645,-5.365 z"
+                 id="path7410" />
+              <path
+                 style="fill:#222222"
+                 inkscape:connector-curvature="0"
+                 d="m 253.533,190.393 c -1.939,1.426 -2.418,6.951 -0.539,8.799 1.841,1.832 6.271,-0.268 6.896,-3.561 0.618,-3.668 -4.412,-6.711 -6.357,-5.238 z"
+                 id="path7412" />
+              <path
+                 style="fill:#242424"
+                 inkscape:connector-curvature="0"
+                 d="m 253.669,190.533 c -1.961,1.416 -2.391,6.783 -0.621,8.572 1.731,1.776 6.03,-0.149 6.692,-3.46 0.657,-3.497 -4.102,-6.571 -6.071,-5.112 z"
+                 id="path7414" />
+            </g>
+            <path
+               style="fill:#262626"
+               inkscape:connector-curvature="0"
+               d="m 253.806,190.673 c -1.984,1.405 -2.364,6.615 -0.703,8.344 1.619,1.724 5.79,-0.032 6.485,-3.358 0.697,-3.326 -3.791,-6.432 -5.782,-4.986 z"
+               id="path7416" />
+          </g>
+          <g
+             id="g7418">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 250.71,256.698 c 1.513,1.512 2.809,-2.232 4.32,-3.457 1.512,-1.224 3.96,-3.888 8.856,-3.888 4.896,0 4.535,-0.144 4.319,-2.017 -0.144,-1.799 -1.584,-1.655 -5.903,-1.008 -4.32,0.576 -7.2,2.809 -8.929,4.824 -1.654,1.945 -3.527,4.681 -2.663,5.546 z"
+               id="path7420" />
+            <g
+               id="g7422">
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 251.043,256.331 c 1.459,1.449 2.703,-2.121 4.205,-3.308 1.501,-1.187 3.931,-3.731 8.64,-3.731 4.71,-0.002 4.415,-0.129 4.209,-1.94 -0.139,-1.743 -1.543,-1.593 -5.749,-0.979 -4.207,0.543 -7.029,2.703 -8.712,4.648 -1.616,1.877 -3.438,4.474 -2.593,5.31 z"
+                 id="path7424" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 251.376,255.961 c 1.406,1.389 2.6,-2.008 4.089,-3.156 1.491,-1.148 3.901,-3.576 8.425,-3.577 4.521,-0.001 4.293,-0.11 4.096,-1.862 -0.132,-1.688 -1.501,-1.531 -5.594,-0.951 -4.093,0.51 -6.857,2.596 -8.495,4.471 -1.575,1.812 -3.348,4.271 -2.521,5.075 z"
+                 id="path7426" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 251.709,255.594 c 1.354,1.326 2.494,-1.895 3.975,-3.008 1.479,-1.111 3.871,-3.42 8.207,-3.422 4.336,-0.002 4.171,-0.094 3.984,-1.785 -0.126,-1.631 -1.46,-1.467 -5.438,-0.924 -3.979,0.479 -6.687,2.492 -8.28,4.297 -1.533,1.747 -3.257,4.066 -2.448,4.842 z"
+                 id="path7428" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 252.042,255.226 c 1.302,1.265 2.39,-1.783 3.858,-2.856 1.47,-1.076 3.842,-3.266 7.991,-3.268 4.149,-0.002 4.05,-0.077 3.873,-1.709 -0.119,-1.575 -1.419,-1.404 -5.284,-0.895 -3.865,0.444 -6.515,2.385 -8.063,4.121 -1.49,1.678 -3.165,3.861 -2.375,4.607 z"
+                 id="path7430" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 252.374,254.859 c 1.249,1.202 2.285,-1.671 3.744,-2.708 1.458,-1.037 3.813,-3.109 7.774,-3.111 3.963,-0.004 3.929,-0.061 3.761,-1.633 -0.113,-1.519 -1.377,-1.341 -5.128,-0.867 -3.751,0.414 -6.344,2.279 -7.847,3.945 -1.449,1.613 -3.075,3.656 -2.304,4.374 z"
+                 id="path7432" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 252.707,254.491 c 1.196,1.141 2.182,-1.559 3.628,-2.558 1.448,-1 3.783,-2.954 7.56,-2.957 3.775,-0.003 3.806,-0.043 3.648,-1.556 -0.106,-1.461 -1.336,-1.277 -4.974,-0.838 -3.637,0.379 -6.172,2.174 -7.63,3.77 -1.408,1.546 -2.984,3.451 -2.232,4.139 z"
+                 id="path7434" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 253.04,254.124 c 1.144,1.078 2.076,-1.447 3.514,-2.41 1.437,-0.961 3.753,-2.797 7.342,-2.799 3.589,-0.004 3.685,-0.027 3.537,-1.48 -0.101,-1.405 -1.294,-1.215 -4.818,-0.811 -3.524,0.349 -6.001,2.068 -7.415,3.594 -1.367,1.48 -2.894,3.245 -2.16,3.906 z"
+                 id="path7436" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 253.373,253.754 c 1.09,1.018 1.972,-1.334 3.398,-2.258 1.426,-0.926 3.723,-2.642 7.125,-2.646 3.402,-0.005 3.563,-0.011 3.426,-1.403 -0.095,-1.349 -1.253,-1.15 -4.664,-0.781 -3.409,0.314 -5.829,1.961 -7.198,3.418 -1.325,1.415 -2.803,3.041 -2.087,3.67 z"
+                 id="path7438" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 253.706,253.388 c 1.038,0.954 1.866,-1.222 3.282,-2.11 1.416,-0.887 3.694,-2.486 6.909,-2.49 3.217,-0.004 3.441,0.008 3.313,-1.326 -0.088,-1.293 -1.212,-1.088 -4.508,-0.754 -3.296,0.283 -5.658,1.857 -6.981,3.244 -1.284,1.345 -2.712,2.836 -2.015,3.436 z"
+                 id="path7440" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 254.039,253.02 c 0.985,0.893 1.762,-1.109 3.167,-1.96 1.405,-0.851 3.664,-2.33 6.693,-2.335 3.029,-0.006 3.32,0.023 3.202,-1.249 -0.082,-1.237 -1.171,-1.024 -4.354,-0.726 -3.182,0.25 -5.485,1.75 -6.765,3.066 -1.243,1.282 -2.622,2.634 -1.943,3.204 z"
+                 id="path7442" />
+              <path
+                 style="fill:#383838"
+                 inkscape:connector-curvature="0"
+                 d="m 254.372,252.652 c 0.933,0.831 1.657,-0.998 3.051,-1.81 1.396,-0.813 3.636,-2.174 6.478,-2.18 2.843,-0.006 3.199,0.039 3.09,-1.172 -0.076,-1.181 -1.129,-0.963 -4.198,-0.697 -3.068,0.217 -5.314,1.644 -6.55,2.891 -1.202,1.214 -2.531,2.427 -1.871,2.968 z"
+                 id="path7444" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 254.704,252.284 c 0.88,0.771 1.553,-0.885 2.938,-1.66 1.383,-0.775 3.604,-2.019 6.26,-2.024 2.656,-0.007 3.078,0.058 2.979,-1.095 -0.069,-1.125 -1.088,-0.899 -4.044,-0.67 -2.954,0.185 -5.144,1.539 -6.333,2.715 -1.16,1.148 -2.441,2.222 -1.8,2.734 z"
+                 id="path7446" />
+              <path
+                 style="fill:#424242"
+                 inkscape:connector-curvature="0"
+                 d="m 255.037,251.917 c 0.827,0.707 1.448,-0.773 2.821,-1.51 1.373,-0.738 3.576,-1.863 6.044,-1.871 2.47,-0.007 2.956,0.074 2.867,-1.018 -0.063,-1.068 -1.046,-0.836 -3.889,-0.641 -2.841,0.151 -4.973,1.433 -6.116,2.539 -1.119,1.083 -2.35,2.018 -1.727,2.501 z"
+                 id="path7448" />
+              <path
+                 style="fill:#474747"
+                 inkscape:connector-curvature="0"
+                 d="m 255.37,251.549 c 0.774,0.645 1.344,-0.661 2.706,-1.362 1.362,-0.7 3.545,-1.706 5.828,-1.713 2.283,-0.009 2.834,0.09 2.754,-0.942 -0.057,-1.012 -1.005,-0.773 -3.733,-0.613 -2.727,0.119 -4.801,1.328 -5.899,2.365 -1.078,1.013 -2.26,1.81 -1.656,2.265 z"
+                 id="path7450" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 255.703,251.181 c 0.721,0.584 1.239,-0.55 2.59,-1.212 1.353,-0.663 3.517,-1.551 5.612,-1.559 2.096,-0.009 2.713,0.107 2.643,-0.865 -0.051,-0.955 -0.964,-0.709 -3.577,-0.584 -2.613,0.086 -4.631,1.222 -5.686,2.188 -1.035,0.949 -2.168,1.607 -1.582,2.032 z"
+                 id="path7452" />
+              <path
+                 style="fill:#515151"
+                 inkscape:connector-curvature="0"
+                 d="m 256.036,250.813 c 0.669,0.521 1.134,-0.436 2.476,-1.063 1.341,-0.625 3.485,-1.395 5.395,-1.402 1.91,-0.01 2.591,0.124 2.531,-0.789 -0.044,-0.898 -0.922,-0.646 -3.423,-0.557 -2.499,0.055 -4.458,1.117 -5.469,2.014 -0.994,0.882 -2.077,1.402 -1.51,1.797 z"
+                 id="path7454" />
+              <path
+                 style="fill:#565656"
+                 inkscape:connector-curvature="0"
+                 d="m 256.369,250.446 c 0.616,0.459 1.029,-0.324 2.36,-0.912 1.33,-0.589 3.456,-1.24 5.178,-1.248 1.723,-0.01 2.47,0.141 2.42,-0.713 -0.039,-0.842 -0.881,-0.582 -3.268,-0.527 -2.387,0.021 -4.287,1.01 -5.252,1.836 -0.953,0.816 -1.987,1.199 -1.438,1.564 z"
+                 id="path7456" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 256.701,250.079 c 0.564,0.397 0.926,-0.213 2.245,-0.764 1.319,-0.551 3.427,-1.084 4.963,-1.093 1.536,-0.011 2.348,0.157 2.307,-0.636 -0.031,-0.785 -0.839,-0.52 -3.112,-0.5 -2.271,-0.01 -4.116,0.906 -5.035,1.662 -0.913,0.751 -1.898,0.993 -1.368,1.331 z"
+                 id="path7458" />
+              <path
+                 style="fill:#606060"
+                 inkscape:connector-curvature="0"
+                 d="m 257.034,249.709 c 0.511,0.336 0.821,-0.1 2.13,-0.612 1.309,-0.515 3.397,-0.929 4.746,-0.938 1.351,-0.01 2.227,0.176 2.196,-0.558 -0.026,-0.729 -0.799,-0.457 -2.958,-0.472 -2.158,-0.043 -3.945,0.799 -4.82,1.486 -0.87,0.682 -1.805,0.788 -1.294,1.094 z"
+                 id="path7460" />
+            </g>
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 257.367,249.342 c 0.458,0.273 0.716,0.012 2.014,-0.465 1.299,-0.476 3.368,-0.771 4.53,-0.781 1.163,-0.012 2.105,0.191 2.084,-0.482 -0.02,-0.673 -0.757,-0.393 -2.803,-0.443 -2.044,-0.076 -3.773,0.693 -4.604,1.311 -0.828,0.616 -1.714,0.582 -1.221,0.86 z"
+               id="path7462" />
+          </g>
+          <g
+             id="g7464">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 270.222,247.265 c 0,2.304 4.68,3.096 9.144,3.743 4.392,0.648 7.92,1.513 8.136,6.121 0.216,4.535 -0.936,7.775 1.08,7.416 4.32,-0.793 5.904,-5.473 5.832,-7.633 0,-2.16 -3.168,-6.047 -8.855,-8.207 -4.177,-1.584 -7.2,-2.305 -10.872,-2.449 -4.897,-0.214 -4.465,1.009 -4.465,1.009 z"
+               id="path7466" />
+            <g
+               id="g7468">
+              <path
+                 style="fill:#030303"
+                 inkscape:connector-curvature="0"
+                 d="m 270.348,247.304 c 0.012,2.239 4.643,2.97 9.049,3.639 4.352,0.675 7.75,1.511 8.11,6.002 0.345,4.415 -0.854,7.515 1.136,7.188 4.145,-0.739 5.688,-5.2 5.607,-7.332 -0.015,-2.151 -3.118,-5.91 -8.733,-8.038 -4.129,-1.563 -7.11,-2.298 -10.74,-2.452 -4.754,-0.217 -4.438,0.952 -4.429,0.993 z"
+                 id="path7470" />
+              <path
+                 style="fill:#070707"
+                 inkscape:connector-curvature="0"
+                 d="m 270.474,247.342 c 0.023,2.174 4.605,2.845 8.953,3.533 4.312,0.701 7.58,1.508 8.087,5.885 0.471,4.295 -0.771,7.252 1.189,6.963 3.97,-0.689 5.472,-4.93 5.384,-7.033 -0.028,-2.145 -3.068,-5.773 -8.61,-7.87 -4.082,-1.543 -7.022,-2.291 -10.609,-2.456 -4.612,-0.218 -4.412,0.896 -4.394,0.978 z"
+                 id="path7472" />
+              <path
+                 style="fill:#0b0b0b"
+                 inkscape:connector-curvature="0"
+                 d="m 270.6,247.379 c 0.035,2.109 4.568,2.721 8.857,3.431 4.271,0.728 7.411,1.506 8.063,5.767 0.599,4.174 -0.689,6.988 1.245,6.735 3.795,-0.638 5.257,-4.66 5.159,-6.733 -0.044,-2.137 -3.019,-5.636 -8.488,-7.701 -4.035,-1.522 -6.933,-2.285 -10.478,-2.459 -4.469,-0.219 -4.384,0.837 -4.358,0.96 z"
+                 id="path7474" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 270.726,247.418 c 0.047,2.043 4.531,2.595 8.762,3.324 4.232,0.754 7.242,1.504 8.039,5.649 0.725,4.052 -0.608,6.728 1.299,6.509 3.621,-0.586 5.041,-4.389 4.937,-6.436 -0.06,-2.127 -2.971,-5.496 -8.367,-7.53 -3.988,-1.502 -6.842,-2.278 -10.346,-2.464 -4.328,-0.22 -4.359,0.784 -4.324,0.948 z"
+                 id="path7476" />
+              <path
+                 style="fill:#131313"
+                 inkscape:connector-curvature="0"
+                 d="m 270.852,247.458 c 0.059,1.978 4.495,2.469 8.667,3.219 4.19,0.781 7.071,1.502 8.014,5.531 0.854,3.932 -0.526,6.465 1.354,6.283 3.445,-0.535 4.824,-4.119 4.712,-6.137 -0.074,-2.119 -2.92,-5.359 -8.245,-7.361 -3.941,-1.482 -6.753,-2.271 -10.213,-2.469 -4.186,-0.221 -4.333,0.726 -4.289,0.934 z"
+                 id="path7478" />
+              <path
+                 style="fill:#161616"
+                 inkscape:connector-curvature="0"
+                 d="m 270.978,247.495 c 0.07,1.914 4.458,2.344 8.57,3.115 4.151,0.807 6.903,1.5 7.99,5.413 0.98,3.812 -0.443,6.202 1.409,6.056 3.271,-0.482 4.609,-3.848 4.488,-5.836 -0.088,-2.111 -2.871,-5.222 -8.123,-7.193 -3.894,-1.461 -6.663,-2.264 -10.081,-2.471 -4.043,-0.223 -4.306,0.67 -4.253,0.916 z"
+                 id="path7480" />
+              <path
+                 style="fill:#1a1a1a"
+                 inkscape:connector-curvature="0"
+                 d="m 271.104,247.534 c 0.082,1.848 4.422,2.219 8.476,3.01 4.111,0.832 6.734,1.498 7.965,5.295 1.108,3.69 -0.36,5.94 1.464,5.83 3.097,-0.433 4.394,-3.578 4.265,-5.537 -0.104,-2.104 -2.821,-5.084 -8,-7.023 -3.848,-1.441 -6.575,-2.26 -9.949,-2.477 -3.905,-0.223 -4.283,0.613 -4.221,0.902 z"
+                 id="path7482" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 271.23,247.573 c 0.094,1.781 4.385,2.092 8.381,2.904 4.07,0.859 6.563,1.495 7.939,5.178 1.236,3.568 -0.278,5.678 1.52,5.602 2.921,-0.381 4.177,-3.305 4.04,-5.237 -0.118,-2.097 -2.771,-4.946 -7.878,-6.854 -3.8,-1.42 -6.485,-2.252 -9.817,-2.479 -3.762,-0.226 -4.256,0.556 -4.185,0.886 z"
+                 id="path7484" />
+              <path
+                 style="fill:#222222"
+                 inkscape:connector-curvature="0"
+                 d="m 271.356,247.61 c 0.105,1.717 4.348,1.969 8.285,2.801 4.029,0.885 6.395,1.493 7.916,5.059 1.362,3.449 -0.197,5.416 1.573,5.377 2.746,-0.329 3.962,-3.036 3.816,-4.939 -0.133,-2.087 -2.722,-4.808 -7.756,-6.684 -3.753,-1.4 -6.396,-2.247 -9.686,-2.484 -3.618,-0.227 -4.227,0.499 -4.148,0.87 z"
+                 id="path7486" />
+              <path
+                 style="fill:#262626"
+                 inkscape:connector-curvature="0"
+                 d="m 271.482,247.648 c 0.118,1.651 4.311,1.843 8.189,2.694 3.99,0.914 6.226,1.492 7.892,4.943 1.491,3.328 -0.115,5.152 1.629,5.149 2.571,-0.278 3.746,-2.765 3.592,-4.64 -0.146,-2.08 -2.672,-4.672 -7.634,-6.516 -3.705,-1.38 -6.306,-2.24 -9.553,-2.488 -3.478,-0.225 -4.203,0.446 -4.115,0.858 z"
+                 id="path7488" />
+              <path
+                 style="fill:#2a2a2a"
+                 inkscape:connector-curvature="0"
+                 d="m 271.608,247.687 c 0.129,1.587 4.273,1.716 8.094,2.59 3.95,0.938 6.056,1.489 7.867,4.825 1.618,3.206 -0.033,4.891 1.684,4.922 2.396,-0.227 3.53,-2.494 3.368,-4.34 -0.162,-2.072 -2.623,-4.534 -7.512,-6.348 -3.658,-1.358 -6.216,-2.232 -9.421,-2.492 -3.336,-0.226 -4.177,0.39 -4.08,0.843 z"
+                 id="path7490" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 271.734,247.725 c 0.141,1.521 4.237,1.591 7.999,2.484 3.909,0.967 5.886,1.488 7.842,4.707 1.746,3.086 0.05,4.629 1.739,4.697 2.221,-0.176 3.313,-2.225 3.144,-4.041 -0.177,-2.064 -2.572,-4.396 -7.389,-6.178 -3.612,-1.339 -6.128,-2.227 -9.29,-2.497 -3.194,-0.227 -4.151,0.334 -4.045,0.828 z"
+                 id="path7492" />
+              <path
+                 style="fill:#313131"
+                 inkscape:connector-curvature="0"
+                 d="m 271.86,247.763 c 0.153,1.456 4.2,1.466 7.903,2.381 3.869,0.991 5.717,1.485 7.817,4.589 1.873,2.965 0.132,4.365 1.794,4.469 2.046,-0.123 3.099,-1.953 2.92,-3.742 -0.191,-2.055 -2.523,-4.258 -7.267,-6.008 -3.565,-1.318 -6.038,-2.22 -9.158,-2.5 -3.051,-0.229 -4.124,0.276 -4.009,0.811 z"
+                 id="path7494" />
+              <path
+                 style="fill:#353535"
+                 inkscape:connector-curvature="0"
+                 d="m 271.986,247.801 c 0.165,1.392 4.163,1.341 7.808,2.275 3.829,1.018 5.547,1.483 7.794,4.473 2,2.843 0.213,4.103 1.848,4.242 1.873,-0.074 2.883,-1.683 2.696,-3.443 -0.206,-2.047 -2.474,-4.12 -7.145,-5.838 -3.517,-1.299 -5.948,-2.215 -9.026,-2.506 -2.91,-0.229 -4.099,0.221 -3.975,0.797 z"
+                 id="path7496" />
+              <path
+                 style="fill:#393939"
+                 inkscape:connector-curvature="0"
+                 d="m 272.112,247.84 c 0.176,1.326 4.126,1.215 7.712,2.17 3.789,1.045 5.378,1.482 7.771,4.354 2.127,2.723 0.295,3.842 1.901,4.016 1.698,-0.021 2.667,-1.412 2.474,-3.144 -0.222,-2.038 -2.426,-3.981 -7.023,-5.669 -3.47,-1.277 -5.859,-2.208 -8.894,-2.509 -2.769,-0.231 -4.074,0.164 -3.941,0.782 z"
+                 id="path7498" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 272.238,247.877 c 0.188,1.262 4.089,1.09 7.617,2.066 3.749,1.071 5.208,1.479 7.745,4.236 2.255,2.602 0.377,3.578 1.957,3.789 1.522,0.029 2.451,-1.141 2.249,-2.844 -0.236,-2.033 -2.375,-3.846 -6.901,-5.5 -3.423,-1.258 -5.769,-2.203 -8.762,-2.514 -2.626,-0.231 -4.046,0.109 -3.905,0.767 z"
+                 id="path7500" />
+              <path
+                 style="fill:#414141"
+                 inkscape:connector-curvature="0"
+                 d="m 272.364,247.917 c 0.2,1.195 4.052,0.965 7.522,1.961 3.708,1.098 5.037,1.477 7.72,4.119 2.383,2.479 0.46,3.315 2.012,3.562 1.348,0.081 2.236,-0.87 2.025,-2.545 -0.251,-2.022 -2.325,-3.707 -6.778,-5.331 -3.377,-1.237 -5.681,-2.195 -8.631,-2.518 -2.485,-0.233 -4.02,0.05 -3.87,0.752 z"
+                 id="path7502" />
+              <path
+                 style="fill:#444444"
+                 inkscape:connector-curvature="0"
+                 d="m 272.49,247.956 c 0.212,1.129 4.015,0.838 7.426,1.855 3.668,1.124 4.869,1.475 7.696,4 2.51,2.359 0.542,3.055 2.067,3.336 1.173,0.133 2.02,-0.6 1.801,-2.246 -0.266,-2.016 -2.276,-3.568 -6.656,-5.16 -3.329,-1.218 -5.591,-2.189 -8.499,-2.521 -2.343,-0.235 -3.994,-0.007 -3.835,0.736 z"
+                 id="path7504" />
+              <path
+                 style="fill:#484848"
+                 inkscape:connector-curvature="0"
+                 d="m 272.616,247.993 c 0.223,1.065 3.979,0.715 7.331,1.752 3.628,1.15 4.699,1.473 7.671,3.883 2.638,2.238 0.624,2.791 2.122,3.108 0.998,0.185 1.804,-0.329 1.577,-1.946 -0.28,-2.008 -2.227,-3.432 -6.534,-4.992 -3.282,-1.196 -5.501,-2.182 -8.367,-2.525 -2.201,-0.235 -3.968,-0.064 -3.8,0.72 z"
+                 id="path7506" />
+            </g>
+            <path
+               style="fill:#4c4c4c"
+               inkscape:connector-curvature="0"
+               d="m 272.742,248.032 c 0.235,1 3.941,0.588 7.235,1.645 3.588,1.178 4.529,1.472 7.646,3.766 2.766,2.118 0.706,2.529 2.177,2.883 0.823,0.235 1.589,-0.059 1.354,-1.648 -0.295,-1.998 -2.177,-3.293 -6.412,-4.822 -3.235,-1.176 -5.412,-2.176 -8.235,-2.529 -2.059,-0.239 -3.942,-0.119 -3.765,0.705 z"
+               id="path7508" />
+          </g>
+          <g
+             id="g7510">
+            <path
+               style="fill:#4c4c4c"
+               inkscape:connector-curvature="0"
+               d="m 287.565,252.854 c 1.646,1 1.353,2.059 2.412,2.766 0.528,0.352 1.412,0.352 0.882,-1 -0.706,-1.588 -1.294,-2.472 -4.941,-3.943 -2.353,-0.941 -1.882,0.059 1.647,2.177 z"
+               id="path7512" />
+            <g
+               id="g7514">
+              <path
+                 style="fill:#505050"
+                 inkscape:connector-curvature="0"
+                 d="m 287.609,252.868 c 1.605,0.975 1.32,2.008 2.353,2.696 0.517,0.343 1.377,0.343 0.86,-0.976 -0.689,-1.549 -1.262,-2.41 -4.82,-3.846 -2.295,-0.917 -1.836,0.059 1.607,2.126 z"
+                 id="path7516" />
+              <path
+                 style="fill:#545454"
+                 inkscape:connector-curvature="0"
+                 d="m 287.652,252.879 c 1.567,0.951 1.287,1.957 2.294,2.629 0.503,0.334 1.343,0.334 0.839,-0.951 -0.671,-1.51 -1.23,-2.35 -4.699,-3.749 -2.238,-0.893 -1.79,0.058 1.566,2.071 z"
+                 id="path7518" />
+              <path
+                 style="fill:#575757"
+                 inkscape:connector-curvature="0"
+                 d="m 287.696,252.891 c 1.526,0.926 1.254,1.908 2.235,2.563 0.489,0.325 1.308,0.325 0.816,-0.928 -0.653,-1.471 -1.199,-2.289 -4.578,-3.652 -2.179,-0.872 -1.743,0.055 1.527,2.017 z"
+                 id="path7520" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 287.74,252.903 c 1.485,0.902 1.22,1.857 2.175,2.494 0.479,0.318 1.274,0.318 0.796,-0.902 -0.637,-1.432 -1.167,-2.229 -4.457,-3.556 -2.122,-0.849 -1.697,0.054 1.486,1.964 z"
+                 id="path7522" />
+              <path
+                 style="fill:#5f5f5f"
+                 inkscape:connector-curvature="0"
+                 d="m 287.783,252.915 c 1.446,0.879 1.188,1.808 2.117,2.426 0.464,0.31 1.239,0.31 0.773,-0.877 -0.619,-1.394 -1.136,-2.168 -4.336,-3.459 -2.064,-0.826 -1.65,0.052 1.446,1.91 z"
+                 id="path7524" />
+              <path
+                 style="fill:#636363"
+                 inkscape:connector-curvature="0"
+                 d="m 287.827,252.926 c 1.405,0.854 1.154,1.758 2.057,2.359 0.452,0.301 1.205,0.301 0.754,-0.853 -0.603,-1.354 -1.104,-2.108 -4.216,-3.363 -2.007,-0.801 -1.605,0.053 1.405,1.857 z"
+                 id="path7526" />
+              <path
+                 style="fill:#676767"
+                 inkscape:connector-curvature="0"
+                 d="m 287.871,252.94 c 1.364,0.828 1.121,1.705 1.998,2.29 0.438,0.292 1.17,0.292 0.731,-0.828 -0.585,-1.315 -1.072,-2.047 -4.095,-3.267 -1.948,-0.779 -1.558,0.05 1.366,1.805 z"
+                 id="path7528" />
+              <path
+                 style="fill:#6b6b6b"
+                 inkscape:connector-curvature="0"
+                 d="m 287.914,252.952 c 1.325,0.805 1.088,1.655 1.94,2.223 0.425,0.283 1.135,0.283 0.709,-0.803 -0.568,-1.277 -1.041,-1.988 -3.974,-3.17 -1.891,-0.757 -1.512,0.047 1.325,1.75 z"
+                 id="path7530" />
+              <path
+                 style="fill:#6e6e6e"
+                 inkscape:connector-curvature="0"
+                 d="m 287.958,252.963 c 1.284,0.779 1.056,1.605 1.88,2.156 0.413,0.274 1.102,0.274 0.688,-0.779 -0.551,-1.238 -1.009,-1.926 -3.853,-3.073 -1.833,-0.733 -1.466,0.046 1.285,1.696 z"
+                 id="path7532" />
+              <path
+                 style="fill:#727272"
+                 inkscape:connector-curvature="0"
+                 d="m 288.002,252.976 c 1.243,0.755 1.021,1.554 1.821,2.087 0.399,0.266 1.066,0.266 0.666,-0.755 -0.533,-1.199 -0.977,-1.865 -3.731,-2.976 -1.776,-0.71 -1.421,0.045 1.244,1.644 z"
+                 id="path7534" />
+              <path
+                 style="fill:#767676"
+                 inkscape:connector-curvature="0"
+                 d="m 288.045,252.989 c 1.203,0.73 0.989,1.504 1.763,2.02 0.387,0.257 1.031,0.257 0.645,-0.731 -0.516,-1.159 -0.946,-1.805 -3.61,-2.879 -1.72,-0.688 -1.376,0.042 1.202,1.59 z"
+                 id="path7536" />
+              <path
+                 style="fill:#7a7a7a"
+                 inkscape:connector-curvature="0"
+                 d="m 288.089,253 c 1.163,0.705 0.955,1.453 1.703,1.951 0.373,0.25 0.997,0.25 0.623,-0.705 -0.499,-1.121 -0.914,-1.744 -3.489,-2.783 -1.661,-0.664 -1.329,0.041 1.163,1.537 z"
+                 id="path7538" />
+              <path
+                 style="fill:#7e7e7e"
+                 inkscape:connector-curvature="0"
+                 d="m 288.133,253.012 c 1.122,0.682 0.923,1.404 1.644,1.885 0.361,0.24 0.962,0.24 0.602,-0.682 -0.481,-1.082 -0.882,-1.684 -3.367,-2.687 -1.605,-0.64 -1.285,0.041 1.121,1.484 z"
+                 id="path7540" />
+              <path
+                 style="fill:#828282"
+                 inkscape:connector-curvature="0"
+                 d="m 288.176,253.025 c 1.082,0.657 0.89,1.353 1.586,1.815 0.348,0.232 0.927,0.232 0.578,-0.656 -0.463,-1.043 -0.85,-1.623 -3.245,-2.59 -1.547,-0.618 -1.237,0.039 1.081,1.431 z"
+                 id="path7542" />
+              <path
+                 style="fill:#858585"
+                 inkscape:connector-curvature="0"
+                 d="m 288.22,253.038 c 1.042,0.631 0.855,1.301 1.524,1.748 0.335,0.223 0.894,0.223 0.559,-0.633 -0.446,-1.005 -0.818,-1.563 -3.125,-2.492 -1.488,-0.596 -1.19,0.037 1.042,1.377 z"
+                 id="path7544" />
+              <path
+                 style="fill:#898989"
+                 inkscape:connector-curvature="0"
+                 d="m 288.264,253.049 c 1.001,0.607 0.821,1.252 1.466,1.681 0.322,0.214 0.857,0.214 0.536,-0.608 -0.43,-0.965 -0.786,-1.502 -3.004,-2.396 -1.43,-0.573 -1.144,0.034 1.002,1.323 z"
+                 id="path7546" />
+              <path
+                 style="fill:#8d8d8d"
+                 inkscape:connector-curvature="0"
+                 d="m 288.307,253.061 c 0.961,0.584 0.79,1.201 1.407,1.613 0.309,0.205 0.823,0.205 0.515,-0.584 -0.412,-0.926 -0.755,-1.441 -2.883,-2.299 -1.373,-0.548 -1.098,0.034 0.961,1.27 z"
+                 id="path7548" />
+              <path
+                 style="fill:#919191"
+                 inkscape:connector-curvature="0"
+                 d="m 288.351,253.073 c 0.921,0.559 0.756,1.151 1.348,1.547 0.296,0.196 0.789,0.196 0.493,-0.56 -0.395,-0.888 -0.723,-1.381 -2.762,-2.204 -1.315,-0.525 -1.052,0.033 0.921,1.217 z"
+                 id="path7550" />
+              <path
+                 style="fill:#959595"
+                 inkscape:connector-curvature="0"
+                 d="m 288.395,253.084 c 0.88,0.535 0.723,1.102 1.289,1.479 0.282,0.189 0.754,0.189 0.471,-0.534 -0.377,-0.849 -0.691,-1.321 -2.641,-2.106 -1.257,-0.505 -1.006,0.031 0.881,1.161 z"
+                 id="path7552" />
+            </g>
+            <path
+               style="fill:#999999"
+               inkscape:connector-curvature="0"
+               d="m 288.438,253.097 c 0.84,0.51 0.689,1.05 1.229,1.409 0.271,0.181 0.721,0.181 0.45,-0.51 -0.36,-0.81 -0.66,-1.26 -2.52,-2.01 -1.199,-0.48 -0.959,0.031 0.841,1.111 z"
+               id="path7554" />
+          </g>
+          <g
+             id="g7556">
+            <path
+               inkscape:connector-curvature="0"
+               d="m 222.275,107.427 c -0.738,0.902 0.574,8.365 5.412,13.285 4.839,4.838 7.791,4.838 9.759,2.706 3.771,-4.018 0.738,-7.791 -1.558,-10.415 -2.297,-2.624 -5.248,-1.722 -7.955,-4.346 -2.706,-2.624 -4.592,-2.46 -5.658,-1.23 z"
+               id="path7558" />
+            <g
+               id="g7560">
+              <path
+                 style="fill:#050505"
+                 inkscape:connector-curvature="0"
+                 d="m 222.345,107.494 c -0.732,0.895 0.569,8.3 5.369,13.182 4.803,4.801 7.731,4.801 9.685,2.685 3.742,-3.987 0.731,-7.73 -1.546,-10.334 -2.278,-2.604 -5.208,-1.709 -7.894,-4.312 -2.684,-2.604 -4.556,-2.441 -5.614,-1.221 z"
+                 id="path7562" />
+              <path
+                 style="fill:#0a0a0a"
+                 inkscape:connector-curvature="0"
+                 d="m 222.416,107.561 c -0.727,0.888 0.565,8.235 5.328,13.079 4.763,4.763 7.67,4.763 9.607,2.664 3.713,-3.956 0.727,-7.67 -1.534,-10.253 -2.26,-2.584 -5.166,-1.696 -7.831,-4.279 -2.664,-2.583 -4.521,-2.422 -5.57,-1.211 z"
+                 id="path7564" />
+              <path
+                 style="fill:#0f0f0f"
+                 inkscape:connector-curvature="0"
+                 d="m 222.486,107.628 c -0.721,0.881 0.561,8.17 5.286,12.976 4.726,4.725 7.608,4.725 9.532,2.642 3.684,-3.924 0.72,-7.609 -1.522,-10.172 -2.243,-2.563 -5.126,-1.682 -7.77,-4.244 -2.643,-2.563 -4.485,-2.403 -5.526,-1.202 z"
+                 id="path7566" />
+              <path
+                 style="fill:#141414"
+                 inkscape:connector-curvature="0"
+                 d="m 222.556,107.695 c -0.716,0.874 0.557,8.105 5.243,12.872 4.689,4.688 7.55,4.688 9.456,2.622 3.655,-3.893 0.716,-7.549 -1.51,-10.091 -2.224,-2.543 -5.085,-1.669 -7.707,-4.211 -2.621,-2.543 -4.449,-2.384 -5.482,-1.192 z"
+                 id="path7568" />
+              <path
+                 style="fill:#191919"
+                 inkscape:connector-curvature="0"
+                 d="m 222.627,107.762 c -0.71,0.867 0.552,8.04 5.202,12.769 4.65,4.65 7.488,4.65 9.379,2.601 3.626,-3.862 0.71,-7.489 -1.497,-10.011 -2.207,-2.522 -5.044,-1.655 -7.646,-4.177 -2.602,-2.522 -4.414,-2.364 -5.438,-1.182 z"
+                 id="path7570" />
+              <path
+                 style="fill:#1e1e1e"
+                 inkscape:connector-curvature="0"
+                 d="m 222.697,107.829 c -0.704,0.86 0.547,7.975 5.16,12.666 4.613,4.612 7.428,4.612 9.304,2.579 3.596,-3.83 0.703,-7.427 -1.486,-9.929 -2.188,-2.502 -5.003,-1.642 -7.584,-4.143 -2.579,-2.502 -4.378,-2.346 -5.394,-1.173 z"
+                 id="path7572" />
+              <path
+                 style="fill:#232323"
+                 inkscape:connector-curvature="0"
+                 d="m 222.767,107.896 c -0.697,0.853 0.543,7.91 5.117,12.562 4.576,4.575 7.367,4.575 9.229,2.559 3.567,-3.8 0.698,-7.367 -1.473,-9.848 -2.171,-2.482 -4.963,-1.629 -7.522,-4.11 -2.559,-2.481 -4.343,-2.326 -5.351,-1.163 z"
+                 id="path7574" />
+              <path
+                 style="fill:#282828"
+                 inkscape:connector-curvature="0"
+                 d="m 222.838,107.963 c -0.691,0.846 0.538,7.845 5.076,12.459 4.537,4.537 7.307,4.537 9.152,2.538 3.537,-3.769 0.691,-7.307 -1.461,-9.768 -2.154,-2.461 -4.922,-1.615 -7.461,-4.076 -2.538,-2.461 -4.307,-2.307 -5.306,-1.153 z"
+                 id="path7576" />
+              <path
+                 style="fill:#2d2d2d"
+                 inkscape:connector-curvature="0"
+                 d="m 222.908,108.03 c -0.686,0.839 0.534,7.78 5.034,12.355 4.5,4.499 7.246,4.499 9.076,2.516 3.509,-3.737 0.686,-7.246 -1.449,-9.686 -2.135,-2.441 -4.881,-1.602 -7.399,-4.042 -2.516,-2.44 -4.271,-2.287 -5.262,-1.143 z"
+                 id="path7578" />
+              <path
+                 style="fill:#333333"
+                 inkscape:connector-curvature="0"
+                 d="m 222.978,108.096 c -0.681,0.832 0.529,7.715 4.992,12.253 4.463,4.462 7.186,4.462 9.001,2.496 3.479,-3.706 0.68,-7.186 -1.438,-9.605 -2.118,-2.42 -4.841,-1.588 -7.337,-4.008 -2.496,-2.42 -4.235,-2.27 -5.218,-1.136 z"
+                 id="path7580" />
+              <path
+                 style="fill:#383838"
+                 inkscape:connector-curvature="0"
+                 d="m 223.048,108.163 c -0.674,0.825 0.526,7.65 4.95,12.15 4.425,4.425 7.125,4.425 8.925,2.475 3.45,-3.675 0.676,-7.125 -1.425,-9.525 -2.099,-2.4 -4.8,-1.575 -7.274,-3.975 -2.475,-2.399 -4.201,-2.25 -5.176,-1.125 z"
+                 id="path7582" />
+              <path
+                 style="fill:#3d3d3d"
+                 inkscape:connector-curvature="0"
+                 d="m 223.119,108.23 c -0.669,0.818 0.521,7.585 4.908,12.047 4.387,4.387 7.063,4.387 8.849,2.453 3.42,-3.643 0.669,-7.064 -1.413,-9.443 -2.082,-2.38 -4.759,-1.562 -7.214,-3.941 -2.453,-2.38 -4.164,-2.231 -5.13,-1.116 z"
+                 id="path7584" />
+              <path
+                 style="fill:#424242"
+                 inkscape:connector-curvature="0"
+                 d="m 223.189,108.297 c -0.663,0.811 0.516,7.52 4.866,11.944 4.35,4.349 7.004,4.349 8.772,2.432 3.392,-3.612 0.663,-7.004 -1.4,-9.363 -2.064,-2.359 -4.719,-1.548 -7.151,-3.907 -2.433,-2.359 -4.129,-2.212 -5.087,-1.106 z"
+                 id="path7586" />
+              <path
+                 style="fill:#474747"
+                 inkscape:connector-curvature="0"
+                 d="m 223.259,108.364 c -0.656,0.804 0.513,7.455 4.824,11.84 4.313,4.312 6.944,4.312 8.697,2.412 3.362,-3.582 0.658,-6.944 -1.388,-9.282 -2.046,-2.339 -4.679,-1.535 -7.09,-3.874 -2.411,-2.338 -4.093,-2.192 -5.043,-1.096 z"
+                 id="path7588" />
+              <path
+                 style="fill:#4c4c4c"
+                 inkscape:connector-curvature="0"
+                 d="m 223.33,108.431 c -0.651,0.797 0.507,7.39 4.782,11.737 4.274,4.274 6.882,4.274 8.621,2.39 3.332,-3.55 0.651,-6.883 -1.377,-9.201 -2.028,-2.318 -4.636,-1.521 -7.028,-3.839 -2.39,-2.318 -4.057,-2.174 -4.998,-1.087 z"
+                 id="path7590" />
+              <path
+                 style="fill:#515151"
+                 inkscape:connector-curvature="0"
+                 d="m 223.4,108.498 c -0.646,0.79 0.503,7.325 4.74,11.634 4.236,4.236 6.821,4.236 8.545,2.369 3.304,-3.519 0.646,-6.822 -1.364,-9.12 -2.01,-2.298 -4.596,-1.508 -6.966,-3.806 -2.369,-2.298 -4.022,-2.154 -4.955,-1.077 z"
+                 id="path7592" />
+              <path
+                 style="fill:#565656"
+                 inkscape:connector-curvature="0"
+                 d="m 223.47,108.565 c -0.641,0.783 0.499,7.26 4.697,11.53 4.199,4.199 6.763,4.199 8.471,2.349 3.273,-3.488 0.64,-6.762 -1.353,-9.039 -1.993,-2.278 -4.556,-1.495 -6.905,-3.773 -2.347,-2.277 -3.985,-2.135 -4.91,-1.067 z"
+                 id="path7594" />
+              <path
+                 style="fill:#5b5b5b"
+                 inkscape:connector-curvature="0"
+                 d="m 223.541,108.632 c -0.635,0.776 0.493,7.195 4.656,11.427 4.161,4.161 6.701,4.161 8.393,2.327 3.245,-3.456 0.636,-6.701 -1.34,-8.958 -1.975,-2.257 -4.514,-1.48 -6.843,-3.738 -2.327,-2.257 -3.95,-2.116 -4.866,-1.058 z"
+                 id="path7596" />
+              <path
+                 style="fill:#606060"
+                 inkscape:connector-curvature="0"
+                 d="m 223.611,108.699 c -0.629,0.769 0.489,7.13 4.614,11.324 4.124,4.123 6.64,4.123 8.317,2.306 3.215,-3.425 0.628,-6.641 -1.328,-8.877 -1.957,-2.237 -4.474,-1.468 -6.78,-3.705 -2.306,-2.236 -3.915,-2.097 -4.823,-1.048 z"
+                 id="path7598" />
+            </g>
+            <path
+               style="fill:#666666"
+               inkscape:connector-curvature="0"
+               d="m 223.681,108.765 c -0.623,0.762 0.484,7.065 4.571,11.221 4.086,4.086 6.58,4.086 8.242,2.285 3.187,-3.394 0.623,-6.58 -1.315,-8.796 -1.939,-2.217 -4.434,-1.455 -6.72,-3.671 -2.284,-2.216 -3.878,-2.078 -4.778,-1.039 z"
+               id="path7600" />
+          </g>
+        </g>
+        <g
+           id="g7602">
+          <g
+             id="g7604">
+            <path
+               style="fill:#ffcc00"
+               inkscape:connector-curvature="0"
+               d="m 137.79,109.277 c 1.978,1.366 2.031,1.607 4.948,3.514 4.64,3.768 12.885,4.616 16.922,4.75 9.233,1.467 25.738,-7.161 32.273,-11.111 3.291,-2.463 9.38,-7.551 11.659,-7.637 1.405,1.485 -0.66,1.792 -3.587,3.775 -3.906,2.779 -7.25,5.156 -13.172,8.515 -6.338,3.316 -16.078,8.794 -28.548,8.054 -6.542,-0.959 -6.566,-1.024 -10.606,-3.086 -2.4,-1.732 -7.901,-4.608 -9.889,-6.774 z"
+               id="path7606" />
+            <g
+               id="g7608">
+              <linearGradient
+                 id="SVGID_3_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.342"
+                 y1="259.30521"
+                 x2="195.5984"
+                 y2="259.30521"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#FAC700"
+                   id="stop7611" />
+                <stop
+                   offset="0.415"
+                   stop-color="#F7C400"
+                   id="stop7613" />
+                <stop
+                   offset="1"
+                   stop-color="#F7C400"
+                   id="stop7615" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9566)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.742,109.259 c 1.926,1.274 2.165,1.643 5.083,3.554 4.616,3.734 12.716,4.616 16.796,4.763 9.365,1.452 26.05,-7.294 32.356,-11.159 3.357,-2.506 9.344,-7.498 11.595,-7.604 1.365,1.472 -0.728,1.768 -3.688,3.814 -3.889,2.753 -7.119,5.065 -12.972,8.383 -6.29,3.291 -16.078,8.795 -28.536,8.104 -6.561,-0.945 -6.851,-1.07 -10.758,-3.079 -2.468,-1.755 -7.876,-4.587 -9.876,-6.776 z"
+                 id="path7617" />
+              <linearGradient
+                 id="SVGID_4_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.2932"
+                 y1="259.311"
+                 x2="195.5535"
+                 y2="259.311"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#F6C200"
+                   id="stop7620" />
+                <stop
+                   offset="0.415"
+                   stop-color="#EFBC00"
+                   id="stop7622" />
+                <stop
+                   offset="1"
+                   stop-color="#EFBC00"
+                   id="stop7624" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9568)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.693,109.24 c 1.876,1.183 2.3,1.68 5.218,3.595 4.593,3.7 12.548,4.616 16.67,4.776 9.498,1.437 26.364,-7.428 32.44,-11.207 3.425,-2.55 9.308,-7.444 11.528,-7.57 1.326,1.457 -0.795,1.743 -3.788,3.854 -3.87,2.725 -6.99,4.973 -12.771,8.25 -6.243,3.266 -16.078,8.796 -28.525,8.154 -6.579,-0.931 -7.134,-1.117 -10.908,-3.073 -2.536,-1.779 -7.852,-4.567 -9.864,-6.779 z"
+                 id="path7626" />
+              <linearGradient
+                 id="SVGID_5_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.24541"
+                 y1="259.31689"
+                 x2="195.50951"
+                 y2="259.31689"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#F1BD00"
+                   id="stop7629" />
+                <stop
+                   offset="0.415"
+                   stop-color="#E8B500"
+                   id="stop7631" />
+                <stop
+                   offset="1"
+                   stop-color="#E8B500"
+                   id="stop7633" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9570)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.645,109.222 c 1.825,1.091 2.434,1.715 5.352,3.635 4.569,3.665 12.38,4.615 16.544,4.789 9.631,1.422 26.677,-7.562 32.524,-11.255 3.491,-2.594 9.271,-7.392 11.463,-7.538 1.287,1.442 -0.861,1.718 -3.889,3.893 -3.853,2.699 -6.86,4.882 -12.57,8.119 -6.195,3.241 -16.078,8.797 -28.513,8.203 -6.6,-0.916 -7.418,-1.163 -11.061,-3.066 -2.603,-1.801 -7.826,-4.546 -9.85,-6.78 z"
+                 id="path7635" />
+              <linearGradient
+                 id="SVGID_6_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.1965"
+                 y1="259.32181"
+                 x2="195.4646"
+                 y2="259.32181"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#EDB800"
+                   id="stop7638" />
+                <stop
+                   offset="0.415"
+                   stop-color="#E0AD00"
+                   id="stop7640" />
+                <stop
+                   offset="1"
+                   stop-color="#E0AD00"
+                   id="stop7642" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9572)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.596,109.203 c 1.774,1 2.568,1.752 5.487,3.676 4.545,3.631 12.211,4.615 16.418,4.801 9.764,1.408 26.989,-7.695 32.608,-11.302 3.557,-2.637 9.236,-7.338 11.396,-7.505 1.247,1.427 -0.928,1.693 -3.99,3.932 -3.833,2.672 -6.729,4.791 -12.369,7.986 -6.148,3.217 -16.078,8.799 -28.501,8.254 -6.619,-0.902 -7.702,-1.21 -11.21,-3.059 -2.672,-1.825 -7.803,-4.525 -9.839,-6.783 z"
+                 id="path7644" />
+              <linearGradient
+                 id="SVGID_7_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.14771"
+                 y1="259.32669"
+                 x2="195.4216"
+                 y2="259.32669"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#E9B300"
+                   id="stop7647" />
+                <stop
+                   offset="0.415"
+                   stop-color="#D8A500"
+                   id="stop7649" />
+                <stop
+                   offset="1"
+                   stop-color="#D8A500"
+                   id="stop7651" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9574)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.548,109.184 c 1.724,0.909 2.703,1.788 5.622,3.717 4.522,3.597 12.043,4.615 16.292,4.814 9.896,1.393 27.303,-7.829 32.692,-11.35 3.624,-2.681 9.2,-7.286 11.331,-7.472 1.208,1.412 -0.995,1.668 -4.092,3.972 -3.814,2.644 -6.6,4.698 -12.168,7.853 -6.101,3.192 -16.077,8.8 -28.489,8.303 -6.638,-0.887 -7.986,-1.256 -11.361,-3.052 -2.741,-1.848 -7.779,-4.504 -9.827,-6.785 z"
+                 id="path7653" />
+              <linearGradient
+                 id="SVGID_8_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.09891"
+                 y1="259.33151"
+                 x2="195.37869"
+                 y2="259.33151"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#E4AE00"
+                   id="stop7656" />
+                <stop
+                   offset="0.415"
+                   stop-color="#D19E00"
+                   id="stop7658" />
+                <stop
+                   offset="1"
+                   stop-color="#D19E00"
+                   id="stop7660" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9576)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.499,109.166 c 1.673,0.817 2.838,1.824 5.757,3.757 4.499,3.562 11.875,4.614 16.166,4.827 10.029,1.378 27.615,-7.963 32.776,-11.398 3.691,-2.725 9.164,-7.232 11.265,-7.439 1.169,1.397 -1.061,1.644 -4.191,4.01 -3.796,2.618 -6.469,4.608 -11.968,7.722 -6.053,3.167 -16.077,8.801 -28.478,8.353 -6.657,-0.873 -8.27,-1.303 -11.512,-3.046 -2.809,-1.87 -7.755,-4.483 -9.815,-6.786 z"
+                 id="path7662" />
+              <linearGradient
+                 id="SVGID_9_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.05099"
+                 y1="259.3364"
+                 x2="195.3376"
+                 y2="259.3364"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#E0A900"
+                   id="stop7665" />
+                <stop
+                   offset="0.415"
+                   stop-color="#C99600"
+                   id="stop7667" />
+                <stop
+                   offset="1"
+                   stop-color="#C99600"
+                   id="stop7669" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9578)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.451,109.147 c 1.622,0.726 2.972,1.86 5.892,3.798 4.475,3.528 11.705,4.614 16.04,4.84 10.161,1.362 27.929,-8.097 32.859,-11.447 3.757,-2.767 9.128,-7.178 11.2,-7.405 1.13,1.382 -1.128,1.619 -4.294,4.049 -3.777,2.592 -6.339,4.517 -11.767,7.589 -6.005,3.143 -16.077,8.803 -28.466,8.404 -6.676,-0.859 -8.553,-1.35 -11.663,-3.039 -2.876,-1.894 -7.729,-4.462 -9.801,-6.789 z"
+                 id="path7671" />
+              <linearGradient
+                 id="SVGID_10_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="129.0032"
+                 y1="259.3403"
+                 x2="195.2957"
+                 y2="259.3403"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#DCA400"
+                   id="stop7674" />
+                <stop
+                   offset="0.415"
+                   stop-color="#C18E00"
+                   id="stop7676" />
+                <stop
+                   offset="1"
+                   stop-color="#C18E00"
+                   id="stop7678" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9580)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.403,109.129 c 1.571,0.634 3.105,1.896 6.026,3.838 4.45,3.494 11.536,4.614 15.913,4.852 10.295,1.348 28.241,-8.23 32.943,-11.494 3.824,-2.811 9.092,-7.125 11.134,-7.373 1.092,1.367 -1.194,1.594 -4.394,4.088 -3.759,2.565 -6.209,4.425 -11.566,7.457 -5.957,3.118 -16.077,8.804 -28.454,8.453 -6.694,-0.844 -8.837,-1.396 -11.813,-3.032 -2.945,-1.916 -7.706,-4.44 -9.789,-6.789 z"
+                 id="path7680" />
+              <linearGradient
+                 id="SVGID_11_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.9543"
+                 y1="259.34329"
+                 x2="195.25459"
+                 y2="259.34329"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#D79F00"
+                   id="stop7683" />
+                <stop
+                   offset="0.415"
+                   stop-color="#BA8700"
+                   id="stop7685" />
+                <stop
+                   offset="1"
+                   stop-color="#BA8700"
+                   id="stop7687" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9582)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.354,109.11 c 1.521,0.543 3.241,1.932 6.161,3.879 4.428,3.459 11.368,4.613 15.788,4.865 10.427,1.333 28.554,-8.364 33.026,-11.542 3.892,-2.855 9.057,-7.073 11.068,-7.339 1.052,1.353 -1.261,1.569 -4.495,4.127 -3.74,2.538 -6.078,4.334 -11.365,7.325 -5.91,3.093 -16.077,8.805 -28.441,8.503 -6.716,-0.83 -9.121,-1.443 -11.966,-3.026 -3.012,-1.939 -7.68,-4.42 -9.776,-6.792 z"
+                 id="path7689" />
+              <linearGradient
+                 id="SVGID_12_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.90649"
+                 y1="259.34811"
+                 x2="195.21561"
+                 y2="259.34811"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#D39B00"
+                   id="stop7692" />
+                <stop
+                   offset="0.415"
+                   stop-color="#B27F00"
+                   id="stop7694" />
+                <stop
+                   offset="1"
+                   stop-color="#B27F00"
+                   id="stop7696" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9584)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.306,109.091 c 1.47,0.451 3.375,1.969 6.296,3.919 4.403,3.426 11.2,4.614 15.662,4.879 10.559,1.318 28.865,-8.498 33.109,-11.59 3.958,-2.899 9.021,-7.02 11.003,-7.306 1.013,1.337 -1.328,1.544 -4.596,4.167 -3.722,2.511 -5.949,4.242 -11.165,7.192 -5.862,3.068 -16.077,8.807 -28.43,8.553 -6.734,-0.816 -9.405,-1.489 -12.116,-3.019 -3.08,-1.963 -7.656,-4.4 -9.763,-6.795 z"
+                 id="path7698" />
+              <linearGradient
+                 id="SVGID_13_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.8567"
+                 y1="259.3501"
+                 x2="195.17551"
+                 y2="259.3501"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#CF9600"
+                   id="stop7701" />
+                <stop
+                   offset="0.415"
+                   stop-color="#AA7700"
+                   id="stop7703" />
+                <stop
+                   offset="1"
+                   stop-color="#AA7700"
+                   id="stop7705" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9586)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.257,109.073 c 1.421,0.359 3.511,2.005 6.432,3.959 4.38,3.392 11.032,4.614 15.536,4.892 10.691,1.303 29.179,-8.631 33.193,-11.638 4.024,-2.942 8.984,-6.967 10.938,-7.274 0.973,1.323 -1.396,1.521 -4.697,4.206 -3.703,2.484 -5.818,4.151 -10.964,7.06 -5.814,3.043 -16.077,8.808 -28.418,8.603 -6.753,-0.802 -9.689,-1.535 -12.268,-3.012 -3.149,-1.986 -7.632,-4.378 -9.752,-6.796 z"
+                 id="path7707" />
+              <linearGradient
+                 id="SVGID_14_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.80881"
+                 y1="259.354"
+                 x2="195.13651"
+                 y2="259.354"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#CA9100"
+                   id="stop7710" />
+                <stop
+                   offset="0.415"
+                   stop-color="#A37000"
+                   id="stop7712" />
+                <stop
+                   offset="1"
+                   stop-color="#A37000"
+                   id="stop7714" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9588)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.209,109.054 c 1.368,0.268 3.645,2.041 6.565,4 4.356,3.357 10.864,4.613 15.41,4.904 10.824,1.289 29.493,-8.764 33.277,-11.685 4.092,-2.986 8.948,-6.914 10.871,-7.241 0.935,1.308 -1.461,1.496 -4.797,4.245 -3.685,2.457 -5.688,4.06 -10.763,6.928 -5.768,3.018 -16.077,8.809 -28.407,8.653 -6.771,-0.788 -9.972,-1.582 -12.418,-3.006 -3.216,-2.008 -7.607,-4.357 -9.738,-6.798 z"
+                 id="path7716" />
+              <linearGradient
+                 id="SVGID_15_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.75999"
+                 y1="259.35599"
+                 x2="195.0994"
+                 y2="259.35599"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#C68C00"
+                   id="stop7719" />
+                <stop
+                   offset="0.415"
+                   stop-color="#9B6800"
+                   id="stop7721" />
+                <stop
+                   offset="1"
+                   stop-color="#9B6800"
+                   id="stop7723" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9590)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.16,109.036 c 1.318,0.176 3.779,2.077 6.701,4.04 4.333,3.323 10.695,4.613 15.284,4.917 10.957,1.274 29.805,-8.898 33.36,-11.733 4.158,-3.03 8.912,-6.86 10.807,-7.208 0.894,1.292 -1.528,1.471 -4.899,4.284 -3.666,2.43 -5.558,3.968 -10.562,6.796 -5.72,2.993 -16.077,8.81 -28.396,8.702 -6.791,-0.773 -10.256,-1.628 -12.568,-2.999 -3.285,-2.031 -7.583,-4.336 -9.727,-6.799 z"
+                 id="path7725" />
+              <linearGradient
+                 id="SVGID_16_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.7122"
+                 y1="259.35791"
+                 x2="195.0623"
+                 y2="259.35791"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#C28700"
+                   id="stop7728" />
+                <stop
+                   offset="0.415"
+                   stop-color="#936000"
+                   id="stop7730" />
+                <stop
+                   offset="1"
+                   stop-color="#936000"
+                   id="stop7732" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9592)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.112,109.017 c 1.267,0.085 3.912,2.113 6.835,4.081 4.31,3.289 10.527,4.613 15.158,4.93 11.09,1.258 30.118,-9.032 33.445,-11.782 4.225,-3.072 8.877,-6.807 10.739,-7.174 0.855,1.278 -1.595,1.446 -5,4.323 -3.647,2.404 -5.427,3.877 -10.36,6.663 -5.673,2.969 -16.077,8.812 -28.384,8.753 -6.811,-0.759 -10.54,-1.675 -12.719,-2.992 -3.353,-2.055 -7.559,-4.315 -9.714,-6.802 z"
+                 id="path7734" />
+              <linearGradient
+                 id="SVGID_17_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.6633"
+                 y1="259.35989"
+                 x2="195.0251"
+                 y2="259.35989"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#BD8200"
+                   id="stop7737" />
+                <stop
+                   offset="0.415"
+                   stop-color="#8C5900"
+                   id="stop7739" />
+                <stop
+                   offset="1"
+                   stop-color="#8C5900"
+                   id="stop7741" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9594)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.063,108.998 c 1.217,-0.006 4.047,2.15 6.97,4.122 4.286,3.254 10.359,4.612 15.032,4.943 11.223,1.243 30.431,-9.166 33.53,-11.83 4.289,-3.116 8.84,-6.753 10.673,-7.141 0.815,1.263 -1.661,1.421 -5.101,4.362 -3.63,2.377 -5.298,3.785 -10.161,6.531 -5.624,2.944 -16.075,8.813 -28.37,8.802 -6.83,-0.744 -10.824,-1.721 -12.87,-2.985 -3.422,-2.077 -7.535,-4.294 -9.703,-6.804 z"
+                 id="path7743" />
+              <linearGradient
+                 id="SVGID_18_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.61549"
+                 y1="259.36179"
+                 x2="194.989"
+                 y2="259.36179"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#B97D00"
+                   id="stop7746" />
+                <stop
+                   offset="0.415"
+                   stop-color="#845100"
+                   id="stop7748" />
+                <stop
+                   offset="1"
+                   stop-color="#845100"
+                   id="stop7750" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9596)"
+                 inkscape:connector-curvature="0"
+                 d="m 137.015,108.98 c 1.166,-0.098 4.181,2.185 7.104,4.162 4.262,3.22 10.19,4.612 14.906,4.955 11.354,1.229 30.743,-9.299 33.613,-11.877 4.356,-3.16 8.804,-6.7 10.607,-7.108 0.776,1.248 -1.728,1.397 -5.202,4.401 -3.61,2.35 -5.167,3.694 -9.96,6.399 -5.576,2.919 -16.076,8.814 -28.358,8.852 -6.85,-0.73 -11.108,-1.768 -13.021,-2.979 -3.489,-2.1 -7.51,-4.273 -9.689,-6.805 z"
+                 id="path7752" />
+              <linearGradient
+                 id="SVGID_19_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.5667"
+                 y1="259.3638"
+                 x2="194.9539"
+                 y2="259.3638"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#B57800"
+                   id="stop7755" />
+                <stop
+                   offset="0.415"
+                   stop-color="#7C4900"
+                   id="stop7757" />
+                <stop
+                   offset="1"
+                   stop-color="#7C4900"
+                   id="stop7759" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9598)"
+                 inkscape:connector-curvature="0"
+                 d="m 136.967,108.961 c 1.115,-0.189 4.315,2.222 7.239,4.203 4.239,3.186 10.021,4.612 14.78,4.968 11.488,1.214 31.057,-9.433 33.697,-11.925 4.424,-3.203 8.768,-6.647 10.542,-7.075 0.736,1.233 -1.795,1.372 -5.303,4.44 -3.593,2.323 -5.038,3.603 -9.759,6.266 -5.529,2.895 -16.077,8.816 -28.348,8.903 -6.868,-0.716 -11.392,-1.815 -13.172,-2.972 -3.557,-2.124 -7.485,-4.252 -9.676,-6.808 z"
+                 id="path7761" />
+              <linearGradient
+                 id="SVGID_20_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.51781"
+                 y1="259.36569"
+                 x2="194.91769"
+                 y2="259.36569"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#B07300"
+                   id="stop7764" />
+                <stop
+                   offset="0.415"
+                   stop-color="#754200"
+                   id="stop7766" />
+                <stop
+                   offset="1"
+                   stop-color="#754200"
+                   id="stop7768" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9600)"
+                 inkscape:connector-curvature="0"
+                 d="m 136.918,108.943 c 1.064,-0.281 4.45,2.257 7.374,4.243 4.216,3.151 9.854,4.611 14.654,4.981 11.621,1.199 31.37,-9.567 33.781,-11.973 4.49,-3.247 8.731,-6.594 10.476,-7.042 0.698,1.218 -1.861,1.347 -5.403,4.479 -3.573,2.296 -4.906,3.511 -9.558,6.134 -5.48,2.87 -16.076,8.817 -28.336,8.952 -6.887,-0.701 -11.675,-1.861 -13.323,-2.965 -3.626,-2.146 -7.462,-4.231 -9.665,-6.809 z"
+                 id="path7770" />
+              <linearGradient
+                 id="SVGID_21_"
+                 gradientUnits="userSpaceOnUse"
+                 x1="128.47"
+                 y1="259.3667"
+                 x2="194.8855"
+                 y2="259.3667"
+                 gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+                <stop
+                   offset="0"
+                   stop-color="#AC6E00"
+                   id="stop7773" />
+                <stop
+                   offset="0.415"
+                   stop-color="#6D3A00"
+                   id="stop7775" />
+                <stop
+                   offset="1"
+                   stop-color="#6D3A00"
+                   id="stop7777" />
+              </linearGradient>
+              <path
+                 style="fill:url(#linearGradient9602)"
+                 inkscape:connector-curvature="0"
+                 d="m 136.87,108.924 c 1.013,-0.372 4.584,2.294 7.509,4.284 4.191,3.117 9.685,4.611 14.528,4.994 11.753,1.184 31.682,-9.701 33.864,-12.021 4.557,-3.291 8.695,-6.542 10.411,-7.009 0.657,1.203 -1.929,1.322 -5.504,4.518 -3.557,2.269 -4.777,3.42 -9.358,6.002 -5.434,2.845 -16.076,8.818 -28.324,9.002 -6.907,-0.687 -11.959,-1.908 -13.474,-2.959 -3.694,-2.169 -7.437,-4.21 -9.652,-6.811 z"
+                 id="path7779" />
+            </g>
+            <linearGradient
+               id="SVGID_22_"
+               gradientUnits="userSpaceOnUse"
+               x1="128.4211"
+               y1="259.36871"
+               x2="194.8503"
+               y2="259.36871"
+               gradientTransform="matrix(1,0,0,-1,8.3999,368.2998)">
+              <stop
+                 offset="0"
+                 stop-color="#A86A00"
+                 id="stop7782" />
+              <stop
+                 offset="0.415"
+                 stop-color="#663200"
+                 id="stop7784" />
+              <stop
+                 offset="1"
+                 stop-color="#663200"
+                 id="stop7786" />
+            </linearGradient>
+            <path
+               style="fill:url(#linearGradient9604)"
+               inkscape:connector-curvature="0"
+               d="m 136.821,108.905 c 0.963,-0.464 4.719,2.33 7.644,4.324 4.168,3.083 9.517,4.611 14.402,5.007 11.886,1.169 31.995,-9.834 33.948,-12.069 4.624,-3.334 8.66,-6.487 10.345,-6.976 0.619,1.188 -1.995,1.298 -5.604,4.558 -3.537,2.242 -4.647,3.328 -9.157,5.869 -5.386,2.82 -16.076,8.82 -28.313,9.052 -6.926,-0.673 -12.243,-1.954 -13.625,-2.952 -3.762,-2.192 -7.413,-4.189 -9.64,-6.813 z"
+               id="path7788" />
+          </g>
+        </g>
+      </g>
+    </g>
+    <path
+       style="fill:#000000;fill-opacity:1;stroke:none"
+       d="m 192.9122,118.22375 -22.17144,18.37897 15.3158,0 0,40.21515 -15.3158,0 22.17144,18.37896 22.60906,-18.37896 -14.87821,0 0,-40.21515 14.87821,0 z"
+       id="rect9619"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccccccccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;stroke:none"
+       d="m 352.52995,118.22375 -22.17144,18.37897 15.3158,0 0,40.21515 -15.3158,0 22.17144,18.37896 22.60904,-18.37896 -14.87821,0 0,-40.21515 14.87821,0 z"
+       id="rect9619-9"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccccccccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;stroke:none"
+       d="m 514.23148,118.22375 -22.17145,18.37897 15.3158,0 0,40.21515 -15.3158,0 22.17145,18.37896 22.60904,-18.37896 -14.87821,0 0,-40.21515 14.87821,0 z"
+       id="rect9619-5"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccccccccc" />
+  </g>
+</svg>
diff --git a/latex/geometry.sty b/latex/geometry.sty
new file mode 100644
--- /dev/null
+++ b/latex/geometry.sty
@@ -0,0 +1,1130 @@
+%%
+%% This is file `geometry.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% geometry.dtx  (with options: `package')
+%% 
+%% Copyright (C) 1996-2010
+%% by Hideo Umeki <latexgeometry@gmail.com>
+%% 
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3c of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in
+%%    http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% 
+%% This work is "maintained" (as per the LPPL maintenance status)
+%% by Hideo Umeki.
+%% 
+%% This work consists of the files geometry.dtx and
+%% the derived files: geometry.{sty,ins,drv}, geometry-samples.tex.
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{geometry}
+  [2010/09/12 v5.6 Page Geometry]
+\RequirePackage{keyval}%
+\RequirePackage{ifpdf}%
+\RequirePackage{ifvtex}%
+\RequirePackage{ifxetex}%
+\newif\ifGm@verbose
+\newif\ifGm@landscape
+\newif\ifGm@swap@papersize
+\newif\ifGm@includehead
+\newif\ifGm@includefoot
+\newif\ifGm@includemp
+\newif\ifGm@hbody
+\newif\ifGm@vbody
+\newif\ifGm@heightrounded
+\newif\ifGm@showframe
+\newif\ifGm@showcrop
+\newif\ifGm@pass
+\newif\ifGm@resetpaper
+\newif\ifGm@layout
+\newif\ifGm@newgm
+\newcount\Gm@cnth
+\newcount\Gm@cntv
+\newcount\c@Gm@tempcnt
+\newdimen\Gm@bindingoffset
+\newdimen\Gm@wd@mp
+\newdimen\Gm@odd@mp
+\newdimen\Gm@even@mp
+\newdimen\Gm@layoutwidth
+\newdimen\Gm@layoutheight
+\newdimen\Gm@layouthoffset
+\newdimen\Gm@layoutvoffset
+\newtoks\Gm@dimlist
+\def\Gm@warning#1{\PackageWarningNoLine{geometry}{#1}}%
+\def\ifGm@preamble#1{%
+  \ifGm@newgm
+   \Gm@warning{`#1': not available in `\string\newgeometry'; skipped}%
+  \else
+    \expandafter\@firstofone
+  \fi}%
+\def\Gm@Dhratio{1:1}% = left:right default for oneside
+\def\Gm@Dhratiotwo{2:3}% = inner:outer default for twoside.
+\def\Gm@Dvratio{2:3}% = top:bottom default
+\def\Gm@Dhscale{0.7}%
+\def\Gm@Dvscale{0.7}%
+\def\Gm@dvips{dvips}%
+\def\Gm@dvipdfm{dvipdfm}%
+\def\Gm@pdftex{pdftex}%
+\def\Gm@xetex{xetex}%
+\def\Gm@vtex{vtex}%
+\def\Gm@true{true}%
+\def\Gm@false{false}%
+\edef\Gm@orgpw{\the\paperwidth}%
+\edef\Gm@orgph{\the\paperheight}%
+\def\Gm@savelength#1{%
+  \g@addto@macro\Gm@restore{\expandafter\noexpand\expandafter\csname
+  #1\endcsname\expandafter=\expandafter\the\csname #1\endcsname\relax}}%
+\def\Gm@saveboolean#1{%
+  \csname if#1\endcsname
+    \g@addto@macro\Gm@restore{\expandafter\noexpand\csname #1true\endcsname}%
+  \else
+    \g@addto@macro\Gm@restore{\expandafter\noexpand\csname #1false\endcsname}%
+  \fi}%
+\def\Gm@restore{}%
+\def\Gm@save{%
+  \Gm@savelength{paperwidth}%
+  \Gm@savelength{paperheight}%
+  \Gm@savelength{textwidth}%
+  \Gm@savelength{textheight}%
+  \Gm@savelength{evensidemargin}%
+  \Gm@savelength{oddsidemargin}%
+  \Gm@savelength{topmargin}%
+  \Gm@savelength{headheight}%
+  \Gm@savelength{headsep}%
+  \Gm@savelength{topskip}%
+  \Gm@savelength{footskip}%
+  \Gm@savelength{baselineskip}%
+  \Gm@savelength{marginparwidth}%
+  \Gm@savelength{marginparsep}%
+  \Gm@savelength{columnsep}%
+  \Gm@savelength{hoffset}%
+  \Gm@savelength{voffset}
+  \Gm@savelength{Gm@layoutwidth}%
+  \Gm@savelength{Gm@layoutheight}%
+  \Gm@savelength{Gm@layouthoffset}%
+  \Gm@savelength{Gm@layoutvoffset}%
+  \Gm@saveboolean{@twocolumn}%
+  \Gm@saveboolean{@twoside}%
+  \Gm@saveboolean{@mparswitch}%
+  \Gm@saveboolean{@reversemargin}}%
+\def\Gm@initnewgm{%
+  \Gm@passfalse
+  \Gm@swap@papersizefalse
+  \Gm@dimlist={}
+  \Gm@hbodyfalse
+  \Gm@vbodyfalse
+  \Gm@heightroundedfalse
+  \Gm@includeheadfalse
+  \Gm@includefootfalse
+  \Gm@includempfalse
+  \let\Gm@width\@undefined
+  \let\Gm@height\@undefined
+  \let\Gm@textwidth\@undefined
+  \let\Gm@textheight\@undefined
+  \let\Gm@lines\@undefined
+  \let\Gm@hscale\@undefined
+  \let\Gm@vscale\@undefined
+  \let\Gm@hmarginratio\@undefined
+  \let\Gm@vmarginratio\@undefined
+  \let\Gm@lmargin\@undefined
+  \let\Gm@rmargin\@undefined
+  \let\Gm@tmargin\@undefined
+  \let\Gm@bmargin\@undefined
+  \Gm@layoutfalse
+  \Gm@layouthoffset\z@
+  \Gm@layoutvoffset\z@
+  \Gm@bindingoffset\z@}%
+\def\Gm@initall{%
+  \let\Gm@driver\@empty
+  \let\Gm@truedimen\@empty
+  \let\Gm@paper\@undefined
+  \Gm@resetpaperfalse
+  \Gm@landscapefalse
+  \Gm@verbosefalse
+  \Gm@showframefalse
+  \Gm@showcropfalse
+  \Gm@newgmfalse
+  \Gm@initnewgm}%
+\def\Gm@setdriver#1{%
+  \expandafter\let\expandafter\Gm@driver\csname Gm@#1\endcsname}%
+\def\Gm@unsetdriver#1{%
+  \expandafter\ifx\csname Gm@#1\endcsname\Gm@driver\let\Gm@driver\@empty\fi}%
+\def\Gm@setbool{\@dblarg\Gm@@setbool}%
+\def\Gm@setboolrev{\@dblarg\Gm@@setboolrev}%
+\def\Gm@@setbool[#1]#2#3{\Gm@doif{#1}{#3}{\csname Gm@#2\Gm@bool\endcsname}}%
+\def\Gm@@setboolrev[#1]#2#3{\Gm@doifelse{#1}{#3}%
+  {\csname Gm@#2\Gm@false\endcsname}{\csname Gm@#2\Gm@true\endcsname}}%
+\def\Gm@doif#1#2#3{%
+  \lowercase{\def\Gm@bool{#2}}%
+  \ifx\Gm@bool\@empty
+    \let\Gm@bool\Gm@true
+  \fi
+  \ifx\Gm@bool\Gm@true
+  \else
+    \ifx\Gm@bool\Gm@false
+    \else
+      \let\Gm@bool\relax
+    \fi
+  \fi
+  \ifx\Gm@bool\relax
+    \Gm@warning{`#1' should be set to `true' or `false'}%
+  \else
+    #3
+  \fi}%
+\def\Gm@doifelse#1#2#3#4{%
+  \Gm@doif{#1}{#2}{\ifx\Gm@bool\Gm@true #3\else #4\fi}}%
+\def\Gm@reverse#1{%
+  \csname ifGm@#1\endcsname
+  \csname Gm@#1false\endcsname\else\csname Gm@#1true\endcsname\fi}%
+\def\Gm@defbylen#1#2{%
+  \begingroup\setlength\@tempdima{#2}%
+  \expandafter\xdef\csname Gm@#1\endcsname{\the\@tempdima}\endgroup}%
+\def\Gm@defbycnt#1#2{%
+  \begingroup\setcounter{Gm@tempcnt}{#2}%
+  \expandafter\xdef\csname Gm@#1\endcsname{\the\value{Gm@tempcnt}}\endgroup}%
+\def\Gm@sep@ratio#1:#2{\@tempcnta=#1\@tempcntb=#2}%
+\def\Gm@setbyratio[#1]#2#3#4{% determine #4 by ratio
+  \expandafter\Gm@sep@ratio\Gm@mratio\relax
+  \if#1b
+    \edef\@@tempa{\the\@tempcnta}%
+    \@tempcnta=\@tempcntb
+    \@tempcntb=\@@tempa\relax
+  \fi
+  \expandafter\setlength\expandafter\@tempdimb\expandafter
+    {\csname Gm@#3\endcsname}%
+  \ifnum\@tempcntb>\z@
+    \multiply\@tempdimb\@tempcnta
+    \divide\@tempdimb\@tempcntb
+  \fi
+  \expandafter\edef\csname Gm@#4\endcsname{\the\@tempdimb}}%
+\def\Gm@detiv#1#2#3#4{% determine #4.
+  \expandafter\setlength\expandafter\@tempdima\expandafter
+    {\csname Gm@layout#1\endcsname}%
+  \expandafter\setlength\expandafter\@tempdimb\expandafter
+    {\csname Gm@#2\endcsname}%
+  \addtolength\@tempdima{-\@tempdimb}%
+  \expandafter\setlength\expandafter\@tempdimb\expandafter
+    {\csname Gm@#3\endcsname}%
+  \addtolength\@tempdima{-\@tempdimb}%
+  \ifdim\@tempdima<\z@
+    \Gm@warning{`#4' results in NEGATIVE (\the\@tempdima).%
+    ^^J\@spaces `#2' or `#3' should be shortened in length}%
+  \fi
+  \expandafter\edef\csname Gm@#4\endcsname{\the\@tempdima}}%
+\def\Gm@detiiandiii#1#2#3{% determine #2 and #3.
+  \expandafter\setlength\expandafter\@tempdima\expandafter
+    {\csname Gm@layout#1\endcsname}%
+  \expandafter\setlength\expandafter\@tempdimb\expandafter
+    {\csname Gm@#1\endcsname}%
+  \addtolength\@tempdima{-\@tempdimb}%
+  \ifdim\@tempdima<\z@
+    \Gm@warning{`#2' and `#3' result in NEGATIVE (\the\@tempdima).%
+                  ^^J\@spaces `#1' should be shortened in length}%
+  \fi
+  \ifx\Gm@mratio\@undefined
+    \expandafter\Gm@sep@ratio\Gm@Dmratio\relax
+  \else
+    \expandafter\Gm@sep@ratio\Gm@mratio\relax
+    \ifnum\@tempcntb>\z@\else
+      \Gm@warning{margin ratio a:b should be non-zero; default used}%
+      \expandafter\Gm@sep@ratio\Gm@Dmratio\relax
+    \fi
+  \fi
+  \@tempdimb=\@tempdima
+  \advance\@tempcntb\@tempcnta
+  \divide\@tempdima\@tempcntb
+  \multiply\@tempdima\@tempcnta
+  \advance\@tempdimb-\@tempdima
+  \expandafter\edef\csname Gm@#2\endcsname{\the\@tempdima}%
+  \expandafter\edef\csname Gm@#3\endcsname{\the\@tempdimb}}%
+\def\Gm@detall#1#2#3#4{%
+  \@tempcnta\z@
+  \if#1h
+    \let\Gm@mratio\Gm@hmarginratio
+    \edef\Gm@Dmratio{\if@twoside\Gm@Dhratiotwo\else\Gm@Dhratio\fi}%
+  \else
+    \let\Gm@mratio\Gm@vmarginratio
+    \edef\Gm@Dmratio{\Gm@Dvratio}%
+  \fi
+  \if#1h
+    \ifx\Gm@lmargin\@undefined\else\advance\@tempcnta4\relax\fi
+    \ifGm@hbody\advance\@tempcnta2\relax\fi
+    \ifx\Gm@rmargin\@undefined\else\advance\@tempcnta1\relax\fi
+    \Gm@cnth\@tempcnta
+  \else
+    \ifx\Gm@tmargin\@undefined\else\advance\@tempcnta4\relax\fi
+    \ifGm@vbody\advance\@tempcnta2\relax\fi
+    \ifx\Gm@bmargin\@undefined\else\advance\@tempcnta1\relax\fi
+    \Gm@cntv\@tempcnta
+  \fi
+  \ifcase\@tempcnta
+    \if#1h
+      \Gm@defbylen{width}{\Gm@Dhscale\Gm@layoutwidth}%
+    \else
+      \Gm@defbylen{height}{\Gm@Dvscale\Gm@layoutheight}%
+    \fi
+    \Gm@detiiandiii{#2}{#3}{#4}%
+  \or
+    \ifx\Gm@mratio\@undefined
+      \if#1h
+        \Gm@defbylen{width}{\Gm@Dhscale\Gm@layoutwidth}%
+      \else
+        \Gm@defbylen{height}{\Gm@Dvscale\Gm@layoutheight}%
+      \fi
+      \setlength\@tempdimc{\@nameuse{Gm@#4}}%
+      \Gm@detiiandiii{#2}{#3}{#4}%
+      \expandafter\let\csname Gm@#2\endcsname\@undefined
+      \Gm@defbylen{#4}{\@tempdimc}%
+    \else
+      \Gm@setbyratio[f]{#1}{#4}{#3}%
+    \fi
+    \Gm@detiv{#2}{#3}{#4}{#2}%
+  \or\Gm@detiiandiii{#2}{#3}{#4}%
+  \or\Gm@detiv{#2}{#2}{#4}{#3}%
+  \or
+    \ifx\Gm@mratio\@undefined
+      \if#1h
+        \Gm@defbylen{width}{\Gm@Dhscale\Gm@layoutwidth}%
+      \else
+        \Gm@defbylen{height}{\Gm@Dvscale\Gm@layoutheight}%
+      \fi
+      \setlength\@tempdimc{\@nameuse{Gm@#3}}%
+      \Gm@detiiandiii{#2}{#4}{#3}%
+      \expandafter\let\csname Gm@#2\endcsname\@undefined
+      \Gm@defbylen{#3}{\@tempdimc}%
+    \else
+      \Gm@setbyratio[b]{#1}{#3}{#4}%
+    \fi
+    \Gm@detiv{#2}{#3}{#4}{#2}%
+  \or\Gm@detiv{#2}{#3}{#4}{#2}%
+  \or\Gm@detiv{#2}{#2}{#3}{#4}%
+  \or\Gm@warning{Over-specification in `#1'-direction.%
+                  ^^J\@spaces `#2' (\@nameuse{Gm@#2}) is ignored}%
+    \Gm@detiv{#2}{#3}{#4}{#2}%
+  \else\fi}%
+\def\Gm@clean{%
+  \ifnum\Gm@cnth<4\let\Gm@lmargin\@undefined\fi
+  \ifodd\Gm@cnth\else\let\Gm@rmargin\@undefined\fi
+  \ifnum\Gm@cntv<4\let\Gm@tmargin\@undefined\fi
+  \ifodd\Gm@cntv\else\let\Gm@bmargin\@undefined\fi
+  \ifGm@hbody\else
+    \let\Gm@hscale\@undefined
+    \let\Gm@width\@undefined
+    \let\Gm@textwidth\@undefined
+  \fi
+  \ifGm@vbody\else
+    \let\Gm@vscale\@undefined
+    \let\Gm@height\@undefined
+    \let\Gm@textheight\@undefined
+  \fi
+  }%
+\def\Gm@parse@divide#1#2#3#4{%
+  \def\Gm@star{*}%
+  \@tempcnta\z@
+  \@for\Gm@tmp:=#1\do{%
+    \expandafter\KV@@sp@def\expandafter\Gm@frag\expandafter{\Gm@tmp}%
+    \edef\Gm@value{\Gm@frag}%
+    \ifcase\@tempcnta\relax\edef\Gm@key{#2}%
+      \or\edef\Gm@key{#3}%
+      \else\edef\Gm@key{#4}%
+    \fi
+    \@nameuse{Gm@set\Gm@key false}%
+    \ifx\empty\Gm@value\else
+    \ifx\Gm@star\Gm@value\else
+      \setkeys{Gm}{\Gm@key=\Gm@value}%
+    \fi\fi
+    \advance\@tempcnta\@ne}%
+  \let\Gm@star\relax}%
+\def\Gm@branch#1#2#3{%
+  \@tempcnta\z@
+  \@for\Gm@tmp:=#1\do{%
+    \KV@@sp@def\Gm@frag{\Gm@tmp}%
+    \edef\Gm@value{\Gm@frag}%
+    \ifcase\@tempcnta\relax% cnta == 0
+      \setkeys{Gm}{#2=\Gm@value}%
+    \or% cnta == 1
+      \setkeys{Gm}{#3=\Gm@value}%
+    \else\fi
+    \advance\@tempcnta\@ne}%
+  \ifnum\@tempcnta=\@ne
+    \setkeys{Gm}{#3=\Gm@value}%
+  \fi}%
+\def\Gm@magtooffset{%
+  \@tempdima=\mag\Gm@truedimen sp%
+  \@tempdimb=1\Gm@truedimen in%
+  \divide\@tempdimb\@tempdima
+  \multiply\@tempdimb\@m
+  \addtolength{\hoffset}{1\Gm@truedimen in}%
+  \addtolength{\voffset}{1\Gm@truedimen in}%
+  \addtolength{\hoffset}{-\the\@tempdimb}%
+  \addtolength{\voffset}{-\the\@tempdimb}}%
+\def\Gm@setlength#1#2{%
+  \let\Gm@len=\relax\let\Gm@td=\relax
+  \edef\addtolist{\noexpand\Gm@dimlist=%
+  {\the\Gm@dimlist \Gm@len{#1}{#2}}}\addtolist}%
+\def\Gm@expandlengths{%
+  \def\Gm@td{\Gm@truedimen}%
+  \def\Gm@len##1##2{\setlength{##1}{##2}}%
+  \the\Gm@dimlist}%
+\def\Gm@setsize#1(#2,#3)#4{%
+  \let\Gm@td\relax
+  \expandafter\Gm@setlength\csname #1width\endcsname{#2\Gm@td #4}%
+  \expandafter\Gm@setlength\csname #1height\endcsname{#3\Gm@td #4}%
+  \ifGm@landscape\Gm@swap@papersizetrue\else\Gm@swap@papersizefalse\fi}%
+\def\Gm@setpaper@ifpre#1{%
+  \ifGm@preamble{#1}{\def\Gm@paper{#1}\@nameuse{Gm@#1}{paper}}}%
+\@namedef{Gm@a0paper}#1{\Gm@setsize{#1}(841,1189){mm}}% ISO A0
+\@namedef{Gm@a1paper}#1{\Gm@setsize{#1}(594,841){mm}}% ISO A1
+\@namedef{Gm@a2paper}#1{\Gm@setsize{#1}(420,594){mm}}% ISO A2
+\@namedef{Gm@a3paper}#1{\Gm@setsize{#1}(297,420){mm}}% ISO A3
+\@namedef{Gm@a4paper}#1{\Gm@setsize{#1}(210,297){mm}}% ISO A4
+\@namedef{Gm@a5paper}#1{\Gm@setsize{#1}(148,210){mm}}% ISO A5
+\@namedef{Gm@a6paper}#1{\Gm@setsize{#1}(105,148){mm}}% ISO A6
+\@namedef{Gm@b0paper}#1{\Gm@setsize{#1}(1000,1414){mm}}% ISO B0
+\@namedef{Gm@b1paper}#1{\Gm@setsize{#1}(707,1000){mm}}% ISO B1
+\@namedef{Gm@b2paper}#1{\Gm@setsize{#1}(500,707){mm}}% ISO B2
+\@namedef{Gm@b3paper}#1{\Gm@setsize{#1}(353,500){mm}}% ISO B3
+\@namedef{Gm@b4paper}#1{\Gm@setsize{#1}(250,353){mm}}% ISO B4
+\@namedef{Gm@b5paper}#1{\Gm@setsize{#1}(176,250){mm}}% ISO B5
+\@namedef{Gm@b6paper}#1{\Gm@setsize{#1}(125,176){mm}}% ISO B6
+\@namedef{Gm@c0paper}#1{\Gm@setsize{#1}(917,1297){mm}}% ISO C0
+\@namedef{Gm@c1paper}#1{\Gm@setsize{#1}(648,917){mm}}% ISO C1
+\@namedef{Gm@c2paper}#1{\Gm@setsize{#1}(458,648){mm}}% ISO C2
+\@namedef{Gm@c3paper}#1{\Gm@setsize{#1}(324,458){mm}}% ISO C3
+\@namedef{Gm@c4paper}#1{\Gm@setsize{#1}(229,324){mm}}% ISO C4
+\@namedef{Gm@c5paper}#1{\Gm@setsize{#1}(162,229){mm}}% ISO C5
+\@namedef{Gm@c6paper}#1{\Gm@setsize{#1}(114,162){mm}}% ISO C6
+\@namedef{Gm@b0j}#1{\Gm@setsize{#1}(1030,1456){mm}}% JIS B0
+\@namedef{Gm@b1j}#1{\Gm@setsize{#1}(728,1030){mm}}% JIS B1
+\@namedef{Gm@b2j}#1{\Gm@setsize{#1}(515,728){mm}}% JIS B2
+\@namedef{Gm@b3j}#1{\Gm@setsize{#1}(364,515){mm}}% JIS B3
+\@namedef{Gm@b4j}#1{\Gm@setsize{#1}(257,364){mm}}% JIS B4
+\@namedef{Gm@b5j}#1{\Gm@setsize{#1}(182,257){mm}}% JIS B5
+\@namedef{Gm@b6j}#1{\Gm@setsize{#1}(128,182){mm}}% JIS B6
+\@namedef{Gm@ansiapaper}#1{\Gm@setsize{#1}(8.5,11){in}}%
+\@namedef{Gm@ansibpaper}#1{\Gm@setsize{#1}(11,17){in}}%
+\@namedef{Gm@ansicpaper}#1{\Gm@setsize{#1}(17,22){in}}%
+\@namedef{Gm@ansidpaper}#1{\Gm@setsize{#1}(22,34){in}}%
+\@namedef{Gm@ansiepaper}#1{\Gm@setsize{#1}(34,44){in}}%
+\@namedef{Gm@letterpaper}#1{\Gm@setsize{#1}(8.5,11){in}}%
+\@namedef{Gm@legalpaper}#1{\Gm@setsize{#1}(8.5,14){in}}%
+\@namedef{Gm@executivepaper}#1{\Gm@setsize{#1}(7.25,10.5){in}}%
+\@namedef{Gm@screen}#1{\Gm@setsize{#1}(225,180){mm}}%
+\define@key{Gm}{paper}{\setkeys{Gm}{#1}}%
+\let\KV@Gm@papername\KV@Gm@paper
+\define@key{Gm}{a0paper}[true]{\Gm@setpaper@ifpre{a0paper}}%
+\define@key{Gm}{a1paper}[true]{\Gm@setpaper@ifpre{a1paper}}%
+\define@key{Gm}{a2paper}[true]{\Gm@setpaper@ifpre{a2paper}}%
+\define@key{Gm}{a3paper}[true]{\Gm@setpaper@ifpre{a3paper}}%
+\define@key{Gm}{a4paper}[true]{\Gm@setpaper@ifpre{a4paper}}%
+\define@key{Gm}{a5paper}[true]{\Gm@setpaper@ifpre{a5paper}}%
+\define@key{Gm}{a6paper}[true]{\Gm@setpaper@ifpre{a6paper}}%
+\define@key{Gm}{b0paper}[true]{\Gm@setpaper@ifpre{b0paper}}%
+\define@key{Gm}{b1paper}[true]{\Gm@setpaper@ifpre{b1paper}}%
+\define@key{Gm}{b2paper}[true]{\Gm@setpaper@ifpre{b2paper}}%
+\define@key{Gm}{b3paper}[true]{\Gm@setpaper@ifpre{b3paper}}%
+\define@key{Gm}{b4paper}[true]{\Gm@setpaper@ifpre{b4paper}}%
+\define@key{Gm}{b5paper}[true]{\Gm@setpaper@ifpre{b5paper}}%
+\define@key{Gm}{b6paper}[true]{\Gm@setpaper@ifpre{b6paper}}%
+\define@key{Gm}{c0paper}[true]{\Gm@setpaper@ifpre{c0paper}}%
+\define@key{Gm}{c1paper}[true]{\Gm@setpaper@ifpre{c1paper}}%
+\define@key{Gm}{c2paper}[true]{\Gm@setpaper@ifpre{c2paper}}%
+\define@key{Gm}{c3paper}[true]{\Gm@setpaper@ifpre{c3paper}}%
+\define@key{Gm}{c4paper}[true]{\Gm@setpaper@ifpre{c4paper}}%
+\define@key{Gm}{c5paper}[true]{\Gm@setpaper@ifpre{c5paper}}%
+\define@key{Gm}{c6paper}[true]{\Gm@setpaper@ifpre{c6paper}}%
+\define@key{Gm}{b0j}[true]{\Gm@setpaper@ifpre{b0j}}%
+\define@key{Gm}{b1j}[true]{\Gm@setpaper@ifpre{b1j}}%
+\define@key{Gm}{b2j}[true]{\Gm@setpaper@ifpre{b2j}}%
+\define@key{Gm}{b3j}[true]{\Gm@setpaper@ifpre{b3j}}%
+\define@key{Gm}{b4j}[true]{\Gm@setpaper@ifpre{b4j}}%
+\define@key{Gm}{b5j}[true]{\Gm@setpaper@ifpre{b5j}}%
+\define@key{Gm}{b6j}[true]{\Gm@setpaper@ifpre{b6j}}%
+\define@key{Gm}{ansiapaper}[true]{\Gm@setpaper@ifpre{ansiapaper}}%
+\define@key{Gm}{ansibpaper}[true]{\Gm@setpaper@ifpre{ansibpaper}}%
+\define@key{Gm}{ansicpaper}[true]{\Gm@setpaper@ifpre{ansicpaper}}%
+\define@key{Gm}{ansidpaper}[true]{\Gm@setpaper@ifpre{ansidpaper}}%
+\define@key{Gm}{ansiepaper}[true]{\Gm@setpaper@ifpre{ansiepaper}}%
+\define@key{Gm}{letterpaper}[true]{\Gm@setpaper@ifpre{letterpaper}}%
+\define@key{Gm}{legalpaper}[true]{\Gm@setpaper@ifpre{legalpaper}}%
+\define@key{Gm}{executivepaper}[true]{\Gm@setpaper@ifpre{executivepaper}}%
+\define@key{Gm}{screen}[true]{\Gm@setpaper@ifpre{screen}}%
+\define@key{Gm}{paperwidth}{\ifGm@preamble{paperwidth}{%
+  \def\Gm@paper{custom}\Gm@setlength\paperwidth{#1}}}%
+\define@key{Gm}{paperheight}{\ifGm@preamble{paperheight}{%
+  \def\Gm@paper{custom}\Gm@setlength\paperheight{#1}}}%
+\define@key{Gm}{papersize}{\ifGm@preamble{papersize}{%
+  \def\Gm@paper{custom}\Gm@branch{#1}{paperwidth}{paperheight}}}%
+\define@key{Gm}{layout}{\Gm@layouttrue\@nameuse{Gm@#1}{Gm@layout}}%
+\let\KV@Gm@layoutname\KV@Gm@layout
+\define@key{Gm}{layoutwidth}{\Gm@layouttrue\Gm@setlength\Gm@layoutwidth{#1}}%
+\define@key{Gm}{layoutheight}{\Gm@layouttrue\Gm@setlength\Gm@layoutheight{#1}}%
+\define@key{Gm}{layoutsize}{\Gm@branch{#1}{layoutwidth}{layoutheight}}%
+\define@key{Gm}{landscape}[true]{\ifGm@preamble{landscape}{%
+  \Gm@doifelse{landscape}{#1}%
+  {\ifGm@landscape\else\Gm@landscapetrue\Gm@reverse{swap@papersize}\fi}%
+  {\ifGm@landscape\Gm@landscapefalse\Gm@reverse{swap@papersize}\fi}}}%
+\define@key{Gm}{portrait}[true]{\ifGm@preamble{portrait}{%
+  \Gm@doifelse{portrait}{#1}%
+  {\ifGm@landscape\Gm@landscapefalse\Gm@reverse{swap@papersize}\fi}%
+  {\ifGm@landscape\else\Gm@landscapetrue\Gm@reverse{swap@papersize}\fi}}}%
+\define@key{Gm}{hscale}{\Gm@hbodytrue\edef\Gm@hscale{#1}}%
+\define@key{Gm}{vscale}{\Gm@vbodytrue\edef\Gm@vscale{#1}}%
+\define@key{Gm}{scale}{\Gm@branch{#1}{hscale}{vscale}}%
+\define@key{Gm}{width}{\Gm@hbodytrue\Gm@defbylen{width}{#1}}%
+\define@key{Gm}{height}{\Gm@vbodytrue\Gm@defbylen{height}{#1}}%
+\define@key{Gm}{total}{\Gm@branch{#1}{width}{height}}%
+\let\KV@Gm@totalwidth\KV@Gm@width
+\let\KV@Gm@totalheight\KV@Gm@height
+\define@key{Gm}{textwidth}{\Gm@hbodytrue\Gm@defbylen{textwidth}{#1}}%
+\define@key{Gm}{textheight}{\Gm@vbodytrue\Gm@defbylen{textheight}{#1}}%
+\define@key{Gm}{text}{\Gm@branch{#1}{textwidth}{textheight}}%
+\let\KV@Gm@body\KV@Gm@text
+\define@key{Gm}{lines}{\Gm@vbodytrue\Gm@defbycnt{lines}{#1}}%
+\define@key{Gm}{includehead}[true]{\Gm@setbool{includehead}{#1}}%
+\define@key{Gm}{includefoot}[true]{\Gm@setbool{includefoot}{#1}}%
+\define@key{Gm}{includeheadfoot}[true]{\Gm@doifelse{includeheadfoot}{#1}%
+  {\Gm@includeheadtrue\Gm@includefoottrue}%
+  {\Gm@includeheadfalse\Gm@includefootfalse}}%
+\define@key{Gm}{includemp}[true]{\Gm@setbool{includemp}{#1}}%
+\define@key{Gm}{includeall}[true]{\Gm@doifelse{includeall}{#1}%
+  {\Gm@includeheadtrue\Gm@includefoottrue\Gm@includemptrue}%
+  {\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse}}%
+\define@key{Gm}{ignorehead}[true]{%
+  \Gm@setboolrev[ignorehead]{includehead}{#1}}%
+\define@key{Gm}{ignorefoot}[true]{%
+  \Gm@setboolrev[ignorefoot]{includefoot}{#1}}%
+\define@key{Gm}{ignoreheadfoot}[true]{\Gm@doifelse{ignoreheadfoot}{#1}%
+  {\Gm@includeheadfalse\Gm@includefootfalse}%
+  {\Gm@includeheadtrue\Gm@includefoottrue}}%
+\define@key{Gm}{ignoremp}[true]{%
+  \Gm@setboolrev[ignoremp]{includemp}{#1}}%
+\define@key{Gm}{ignoreall}[true]{\Gm@doifelse{ignoreall}{#1}%
+  {\Gm@includeheadfalse\Gm@includefootfalse\Gm@includempfalse}%
+  {\Gm@includeheadtrue\Gm@includefoottrue\Gm@includemptrue}}%
+\define@key{Gm}{heightrounded}[true]{\Gm@setbool{heightrounded}{#1}}%
+\define@key{Gm}{hdivide}{\Gm@parse@divide{#1}{lmargin}{width}{rmargin}}%
+\define@key{Gm}{vdivide}{\Gm@parse@divide{#1}{tmargin}{height}{bmargin}}%
+\define@key{Gm}{divide}{\Gm@parse@divide{#1}{lmargin}{width}{rmargin}%
+  \Gm@parse@divide{#1}{tmargin}{height}{bmargin}}%
+\define@key{Gm}{lmargin}{\Gm@defbylen{lmargin}{#1}}%
+\define@key{Gm}{rmargin}{\Gm@defbylen{rmargin}{#1}}%
+\let\KV@Gm@left\KV@Gm@lmargin
+\let\KV@Gm@inner\KV@Gm@lmargin
+\let\KV@Gm@innermargin\KV@Gm@lmargin
+\let\KV@Gm@right\KV@Gm@rmargin
+\let\KV@Gm@outer\KV@Gm@rmargin
+\let\KV@Gm@outermargin\KV@Gm@rmargin
+\define@key{Gm}{tmargin}{\Gm@defbylen{tmargin}{#1}}%
+\define@key{Gm}{bmargin}{\Gm@defbylen{bmargin}{#1}}%
+\let\KV@Gm@top\KV@Gm@tmargin
+\let\KV@Gm@bottom\KV@Gm@bmargin
+\define@key{Gm}{hmargin}{\Gm@branch{#1}{lmargin}{rmargin}}%
+\define@key{Gm}{vmargin}{\Gm@branch{#1}{tmargin}{bmargin}}%
+\define@key{Gm}{margin}{\Gm@branch{#1}{lmargin}{tmargin}%
+  \Gm@branch{#1}{rmargin}{bmargin}}%
+\define@key{Gm}{hmarginratio}{\edef\Gm@hmarginratio{#1}}%
+\define@key{Gm}{vmarginratio}{\edef\Gm@vmarginratio{#1}}%
+\define@key{Gm}{marginratio}{\Gm@branch{#1}{hmarginratio}{vmarginratio}}%
+\let\KV@Gm@hratio\KV@Gm@hmarginratio
+\let\KV@Gm@vratio\KV@Gm@vmarginratio
+\let\KV@Gm@ratio\KV@Gm@marginratio
+\define@key{Gm}{hcentering}[true]{\Gm@doifelse{hcentering}{#1}%
+  {\def\Gm@hmarginratio{1:1}}{}}%
+\define@key{Gm}{vcentering}[true]{\Gm@doifelse{vcentering}{#1}%
+  {\def\Gm@vmarginratio{1:1}}{}}%
+\define@key{Gm}{centering}[true]{\Gm@doifelse{centering}{#1}%
+  {\def\Gm@hmarginratio{1:1}\def\Gm@vmarginratio{1:1}}{}}%
+\define@key{Gm}{twoside}[true]{\Gm@doifelse{twoside}{#1}%
+  {\@twosidetrue\@mparswitchtrue}{\@twosidefalse\@mparswitchfalse}}%
+\define@key{Gm}{asymmetric}[true]{\Gm@doifelse{asymmetric}{#1}%
+  {\@twosidetrue\@mparswitchfalse}{}}%
+\define@key{Gm}{bindingoffset}{\Gm@setlength\Gm@bindingoffset{#1}}%
+\define@key{Gm}{headheight}{\Gm@setlength\headheight{#1}}%
+\define@key{Gm}{headsep}{\Gm@setlength\headsep{#1}}%
+\define@key{Gm}{footskip}{\Gm@setlength\footskip{#1}}%
+\let\KV@Gm@head\KV@Gm@headheight
+\let\KV@Gm@foot\KV@Gm@footskip
+\define@key{Gm}{nohead}[true]{\Gm@doifelse{nohead}{#1}%
+  {\Gm@setlength\headheight\z@\Gm@setlength\headsep\z@}{}}%
+\define@key{Gm}{nofoot}[true]{\Gm@doifelse{nofoot}{#1}%
+  {\Gm@setlength\footskip\z@}{}}%
+\define@key{Gm}{noheadfoot}[true]{\Gm@doifelse{noheadfoot}{#1}%
+  {\Gm@setlength\headheight\z@\Gm@setlength\headsep
+  \z@\Gm@setlength\footskip\z@}{}}%
+\define@key{Gm}{footnotesep}{\Gm@setlength{\skip\footins}{#1}}%
+\define@key{Gm}{marginparwidth}{\Gm@setlength\marginparwidth{#1}}%
+\let\KV@Gm@marginpar\KV@Gm@marginparwidth
+\define@key{Gm}{marginparsep}{\Gm@setlength\marginparsep{#1}}%
+\define@key{Gm}{nomarginpar}[true]{\Gm@doifelse{nomarginpar}{#1}%
+  {\Gm@setlength\marginparwidth\z@\Gm@setlength\marginparsep\z@}{}}%
+\define@key{Gm}{columnsep}{\Gm@setlength\columnsep{#1}}%
+\define@key{Gm}{hoffset}{\Gm@setlength\hoffset{#1}}%
+\define@key{Gm}{voffset}{\Gm@setlength\voffset{#1}}%
+\define@key{Gm}{offset}{\Gm@branch{#1}{hoffset}{voffset}}%
+\define@key{Gm}{layouthoffset}{\Gm@setlength\Gm@layouthoffset{#1}}%
+\define@key{Gm}{layoutvoffset}{\Gm@setlength\Gm@layoutvoffset{#1}}%
+\define@key{Gm}{layoutoffset}{\Gm@branch{#1}{layouthoffset}{layoutvoffset}}%
+\define@key{Gm}{twocolumn}[true]{%
+  \Gm@doif{twocolumn}{#1}{\csname @twocolumn\Gm@bool\endcsname}}%
+\define@key{Gm}{onecolumn}[true]{%
+  \Gm@doifelse{onecolumn}{#1}{\@twocolumnfalse}{\@twocolumntrue}}%
+\define@key{Gm}{reversemp}[true]{%
+  \Gm@doif{reversemp}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
+\define@key{Gm}{reversemarginpar}[true]{%
+  \Gm@doif{reversemarginpar}{#1}{\csname @reversemargin\Gm@bool\endcsname}}%
+\define@key{Gm}{driver}{\ifGm@preamble{driver}{%
+  \edef\@@tempa{#1}\edef\@@auto{auto}\edef\@@none{none}%
+  \ifx\@@tempa\@empty\let\Gm@driver\relax\else
+  \ifx\@@tempa\@@none\let\Gm@driver\relax\else
+  \ifx\@@tempa\@@auto\let\Gm@driver\@empty\else
+  \setkeys{Gm}{#1}\fi\fi\fi\let\@@auto\relax\let\@@none\relax}}%
+\define@key{Gm}{dvips}[true]{\ifGm@preamble{dvips}{%
+  \Gm@doifelse{dvips}{#1}{\Gm@setdriver{dvips}}{\Gm@unsetdriver{dvips}}}}%
+\define@key{Gm}{dvipdfm}[true]{\ifGm@preamble{dvipdfm}{%
+  \Gm@doifelse{dvipdfm}{#1}{\Gm@setdriver{dvipdfm}}{\Gm@unsetdriver{dvipdfm}}}}%
+\define@key{Gm}{pdftex}[true]{\ifGm@preamble{pdftex}{%
+  \Gm@doifelse{pdftex}{#1}{\Gm@setdriver{pdftex}}{\Gm@unsetdriver{pdftex}}}}%
+\define@key{Gm}{xetex}[true]{\ifGm@preamble{xetex}{%
+  \Gm@doifelse{xetex}{#1}{\Gm@setdriver{xetex}}{\Gm@unsetdriver{xetex}}}}%
+\define@key{Gm}{vtex}[true]{\ifGm@preamble{vtex}{%
+  \Gm@doifelse{vtex}{#1}{\Gm@setdriver{vtex}}{\Gm@unsetdriver{vtex}}}}%
+\define@key{Gm}{verbose}[true]{\ifGm@preamble{verbose}{\Gm@setbool{verbose}{#1}}}%
+\define@key{Gm}{reset}[true]{\ifGm@preamble{reset}{%
+  \Gm@doifelse{reset}{#1}{\Gm@restore@org\Gm@initall
+  \ProcessOptionsKV[c]{Gm}\Gm@setdefaultpaper}{}}}%
+\define@key{Gm}{resetpaper}[true]{\ifGm@preamble{resetpaper}{%
+  \Gm@setbool{resetpaper}{#1}}}%
+\define@key{Gm}{mag}{\ifGm@preamble{mag}{\mag=#1}}%
+\define@key{Gm}{truedimen}[true]{\ifGm@preamble{truedimen}{%
+  \Gm@doifelse{truedimen}{#1}{\let\Gm@truedimen\Gm@true}%
+  {\let\Gm@truedimen\@empty}}}%
+\define@key{Gm}{pass}[true]{\ifGm@preamble{pass}{\Gm@setbool{pass}{#1}}}%
+\define@key{Gm}{showframe}[true]{\Gm@setbool{showframe}{#1}}%
+\define@key{Gm}{showcrop}[true]{\Gm@setbool{showcrop}{#1}}%
+\def\Gm@setdefaultpaper{%
+  \ifx\Gm@paper\@undefined
+    \Gm@setsize{paper}(\strip@pt\paperwidth,\strip@pt\paperheight){pt}%
+    \Gm@setsize{Gm@layout}(\strip@pt\paperwidth,\strip@pt\paperheight){pt}%
+    \Gm@swap@papersizefalse
+  \fi}%
+\def\Gm@adjustpaper{%
+  \ifdim\paperwidth>\p@\else
+    \PackageError{geometry}{%
+    \string\paperwidth\space(\the\paperwidth) too short}{%
+    Set a paper type (e.g., `a4paper').}%
+  \fi
+  \ifdim\paperheight>\p@\else
+    \PackageError{geometry}{%
+    \string\paperheight\space(\the\paperheight) too short}{%
+    Set a paper type (e.g., `a4paper').}%
+  \fi
+  \ifGm@swap@papersize
+    \setlength\@tempdima{\paperwidth}%
+    \setlength\paperwidth{\paperheight}%
+    \setlength\paperheight{\@tempdima}%
+  \fi
+  \ifGm@layout\else
+    \setlength\Gm@layoutwidth{\paperwidth}%
+    \setlength\Gm@layoutheight{\paperheight}%
+  \fi}%
+\def\Gm@checkmp{%
+  \ifGm@includemp\else
+    \@tempcnta\z@\@tempcntb\@ne
+    \if@twocolumn
+      \@tempcnta\@ne
+    \else
+      \if@reversemargin
+        \@tempcnta\@ne\@tempcntb\z@
+      \fi
+    \fi
+    \@tempdima\marginparwidth
+    \advance\@tempdima\marginparsep
+    \ifnum\@tempcnta=\@ne
+      \@tempdimc\@tempdima
+      \setlength\@tempdimb{\Gm@lmargin}%
+      \advance\@tempdimc-\@tempdimb
+      \ifdim\@tempdimc>\z@
+        \Gm@warning{The marginal notes overrun the paper edge.^^J
+        \@spaces Add \the\@tempdimc\space and more to the left margin}%
+      \fi
+    \fi
+    \ifnum\@tempcntb=\@ne
+      \@tempdimc\@tempdima
+      \setlength\@tempdimb{\Gm@rmargin}%
+      \advance\@tempdimc-\@tempdimb
+      \ifdim\@tempdimc>\z@
+        \Gm@warning{The marginal notes overrun the paper.^^J
+        \@spaces Add \the\@tempdimc\space and more to the right margin}%
+      \fi
+    \fi
+  \fi}%
+\def\Gm@adjustmp{%
+  \ifGm@includemp
+    \@tempdimb\marginparwidth
+    \advance\@tempdimb\marginparsep
+    \Gm@wd@mp\@tempdimb
+    \Gm@odd@mp\z@
+    \Gm@even@mp\z@
+    \if@twocolumn
+      \Gm@wd@mp2\@tempdimb
+      \Gm@odd@mp\@tempdimb
+      \Gm@even@mp\@tempdimb
+    \else
+      \if@reversemargin
+        \Gm@odd@mp\@tempdimb
+        \if@mparswitch\else
+          \Gm@even@mp\@tempdimb
+        \fi
+      \else
+        \if@mparswitch
+          \Gm@even@mp\@tempdimb
+        \fi
+      \fi
+    \fi
+  \fi}%
+\def\Gm@adjustbody{
+  \ifGm@hbody
+    \ifx\Gm@width\@undefined
+      \ifx\Gm@hscale\@undefined
+        \Gm@defbylen{width}{\Gm@Dhscale\Gm@layoutwidth}%
+      \else
+        \Gm@defbylen{width}{\Gm@hscale\Gm@layoutwidth}%
+      \fi
+    \fi
+    \ifx\Gm@textwidth\@undefined\else
+      \setlength\@tempdima{\Gm@textwidth}%
+      \ifGm@includemp
+        \advance\@tempdima\Gm@wd@mp
+      \fi
+      \edef\Gm@width{\the\@tempdima}%
+    \fi
+  \fi
+  \ifGm@vbody
+    \ifx\Gm@height\@undefined
+      \ifx\Gm@vscale\@undefined
+        \Gm@defbylen{height}{\Gm@Dvscale\Gm@layoutheight}%
+      \else
+        \Gm@defbylen{height}{\Gm@vscale\Gm@layoutheight}%
+      \fi
+    \fi
+    \ifx\Gm@lines\@undefined\else
+      \ifdim\topskip<\ht\strutbox
+        \setlength\@tempdima{\topskip}%
+        \setlength\topskip{\ht\strutbox}%
+        \Gm@warning{\noexpand\topskip was changed from \the\@tempdima\space
+        to \the\topskip}%
+      \fi
+      \setlength\@tempdima{\baselineskip}%
+      \multiply\@tempdima\Gm@lines
+      \addtolength\@tempdima{\topskip}%
+      \addtolength\@tempdima{-\baselineskip}%
+      \edef\Gm@textheight{\the\@tempdima}%
+    \fi
+    \ifx\Gm@textheight\@undefined\else
+      \setlength\@tempdima{\Gm@textheight}%
+      \ifGm@includehead
+        \addtolength\@tempdima{\headheight}%
+        \addtolength\@tempdima{\headsep}%
+      \fi
+      \ifGm@includefoot
+        \addtolength\@tempdima{\footskip}%
+      \fi
+      \edef\Gm@height{\the\@tempdima}%
+    \fi
+  \fi}%
+\def\Gm@process{%
+  \ifGm@pass
+    \Gm@restore@org
+  \else
+    \Gm@@process
+  \fi}%
+\def\Gm@@process{%
+  \Gm@expandlengths
+  \Gm@adjustpaper
+  \addtolength\Gm@layoutwidth{-\Gm@bindingoffset}%
+  \Gm@adjustmp
+  \Gm@adjustbody
+  \Gm@detall{h}{width}{lmargin}{rmargin}%
+  \Gm@detall{v}{height}{tmargin}{bmargin}%
+  \setlength\textwidth{\Gm@width}%
+  \setlength\textheight{\Gm@height}%
+  \setlength\topmargin{\Gm@tmargin}%
+  \setlength\oddsidemargin{\Gm@lmargin}%
+  \addtolength\oddsidemargin{-1\Gm@truedimen in}%
+  \ifGm@includemp
+    \advance\textwidth-\Gm@wd@mp
+    \advance\oddsidemargin\Gm@odd@mp
+  \fi
+  \if@mparswitch
+    \setlength\evensidemargin{\Gm@rmargin}%
+    \addtolength\evensidemargin{-1\Gm@truedimen in}%
+    \ifGm@includemp
+      \advance\evensidemargin\Gm@even@mp
+    \fi
+  \else
+    \evensidemargin\oddsidemargin
+  \fi
+  \advance\oddsidemargin\Gm@bindingoffset
+  \addtolength\topmargin{-1\Gm@truedimen in}%
+  \ifGm@includehead
+    \addtolength\textheight{-\headheight}%
+    \addtolength\textheight{-\headsep}%
+  \else
+    \addtolength\topmargin{-\headheight}%
+    \addtolength\topmargin{-\headsep}%
+  \fi
+  \ifGm@includefoot
+    \addtolength\textheight{-\footskip}%
+  \fi
+  \ifGm@heightrounded
+    \setlength\@tempdima{\textheight}%
+    \addtolength\@tempdima{-\topskip}%
+    \@tempcnta\@tempdima
+    \@tempcntb\baselineskip
+    \divide\@tempcnta\@tempcntb
+    \setlength\@tempdimb{\baselineskip}%
+    \multiply\@tempdimb\@tempcnta
+    \advance\@tempdima-\@tempdimb
+    \multiply\@tempdima\tw@
+    \ifdim\@tempdima>\baselineskip
+      \addtolength\@tempdimb{\baselineskip}%
+    \fi
+    \addtolength\@tempdimb{\topskip}%
+    \textheight\@tempdimb
+  \fi
+  \advance\oddsidemargin\Gm@layouthoffset%
+  \advance\evensidemargin\Gm@layouthoffset%
+  \advance\topmargin\Gm@layoutvoffset%
+  \addtolength\Gm@layoutwidth{\Gm@bindingoffset}%
+  }% end of \Gm@@process
+\def\Gm@detectdriver{%
+  \ifx\Gm@driver\@empty
+    \typeout{*geometry* driver: auto-detecting}%
+    \ifpdf
+      \Gm@setdriver{pdftex}%
+    \else
+      \Gm@setdriver{dvips}%
+    \fi
+    \ifvtex
+      \Gm@setdriver{vtex}%
+    \fi
+    \ifxetex
+      \Gm@setdriver{xetex}
+    \fi
+  \else
+    \ifx\Gm@driver\Gm@xetex %%
+      \ifxetex\else
+        \Gm@warning{Wrong driver setting: `xetex'; trying `pdftex' driver}%
+        \Gm@setdriver{pdftex}
+      \fi
+    \fi
+    \ifx\Gm@driver\Gm@vtex
+      \ifvtex\else
+        \Gm@warning{Wrong driver setting: `vtex'; trying `dvips' driver}%
+        \Gm@setdriver{dvips}%
+      \fi
+    \fi
+  \fi
+  \ifx\Gm@driver\relax
+    \typeout{*geometry* detected driver: <none>}%
+  \else
+    \typeout{*geometry* detected driver: \Gm@driver}%
+  \fi}%
+\def\Gm@showparams#1{%
+  \ifGm@verbose\expandafter\typeout\else\expandafter\wlog\fi
+  {\Gm@logcontent{#1}}}%
+\def\Gm@showdim#1{* \string#1=\the#1^^J}%
+\def\Gm@showbool#1{\@nameuse{ifGm@#1}#1\space\fi}%
+\def\Gm@logcontent#1{%
+  *geometry* verbose mode - [ #1 ] result:^^J%
+  \ifGm@pass * pass: disregarded the geometry package!^^J%
+  \else
+  * driver: \if\Gm@driver<none>\else\Gm@driver\fi^^J%
+  * paper: \ifx\Gm@paper\@undefined<default>\else\Gm@paper\fi^^J%
+  * layout: \ifGm@layout<custom>\else<same size as paper>\fi^^J%
+  \ifGm@layout
+  * layout(width,height): (\the\Gm@layoutwidth,\the\Gm@layoutheight)^^J%
+  \fi
+  * layoutoffset:(h,v)=(\the\Gm@layouthoffset,\the\Gm@layoutvoffset)^^J%
+  \@ifundefined{Gm@lines}{}{* lines: \Gm@lines^^J}%
+  \@ifundefined{Gm@hmarginratio}{}{* hratio: \Gm@hmarginratio^^J}%
+  \@ifundefined{Gm@vmarginratio}{}{* vratio: \Gm@vmarginratio^^J}%
+  \ifdim\Gm@bindingoffset=\z@\else
+  * bindingoffset: \the\Gm@bindingoffset^^J\fi
+  * modes: %
+   \Gm@showbool{landscape}%
+   \Gm@showbool{includehead}%
+   \Gm@showbool{includefoot}%
+   \Gm@showbool{includemp}%
+   \if@twoside twoside\space\fi%
+   \if@mparswitch\else\if@twoside asymmetric\space\fi\fi%
+   \Gm@showbool{heightrounded}%
+   \ifx\Gm@truedimen\@empty\else truedimen\space\fi%
+   \Gm@showbool{showframe}%
+   \Gm@showbool{showcrop}%
+  ^^J%
+  * h-part:(L,W,R)=(\Gm@lmargin, \Gm@width, \Gm@rmargin)^^J%
+  * v-part:(T,H,B)=(\Gm@tmargin, \Gm@height, \Gm@bmargin)^^J%
+  \fi
+  \Gm@showdim{\paperwidth}%
+  \Gm@showdim{\paperheight}%
+  \Gm@showdim{\textwidth}%
+  \Gm@showdim{\textheight}%
+  \Gm@showdim{\oddsidemargin}%
+  \Gm@showdim{\evensidemargin}%
+  \Gm@showdim{\topmargin}%
+  \Gm@showdim{\headheight}%
+  \Gm@showdim{\headsep}%
+  \Gm@showdim{\topskip}%
+  \Gm@showdim{\footskip}%
+  \Gm@showdim{\marginparwidth}%
+  \Gm@showdim{\marginparsep}%
+  \Gm@showdim{\columnsep}%
+  * \string\skip\string\footins=\the\skip\footins^^J%
+  \Gm@showdim{\hoffset}%
+  \Gm@showdim{\voffset}%
+  \Gm@showdim{\mag}%
+  * \string\@twocolumn\if@twocolumn true\else false\fi^^J%
+  * \string\@twoside\if@twoside true\else false\fi^^J%
+  * \string\@mparswitch\if@mparswitch true\else false\fi^^J%
+  * \string\@reversemargin\if@reversemargin true\else false\fi^^J%
+  * (1in=72.27pt=25.4mm, 1cm=28.453pt)^^J}%
+\def\Gm@cropmark(#1,#2,#3,#4){%
+  \begin{picture}(0,0)
+    \setlength\unitlength{1truemm}%
+    \linethickness{0.25pt}%
+    \put(#3,0){\line(#1,0){17}}%
+    \put(0,#4){\line(0,#2){17}}%
+  \end{picture}}%
+\providecommand*\vb@xt@{\vbox to}%
+\def\Gm@vrule{\vrule width 0.2pt height\textheight depth\z@}%
+\def\Gm@hrule{\hrule height 0.2pt depth\z@ width\textwidth}%
+\def\Gm@hruled{\hrule height\z@ depth0.2pt width\textwidth}%
+\newcommand*{\Gm@vrules@mpi}{%
+  \hb@xt@\@tempdima{\llap{\Gm@vrule}\ignorespaces
+  \hskip \textwidth\Gm@vrule\hskip \marginparsep
+  \llap{\Gm@vrule}\hfil\Gm@vrule}}%
+\newcommand*{\Gm@vrules@mpii}{%
+  \hb@xt@\@tempdima{\hskip-\marginparwidth\hskip-\marginparsep
+  \llap{\Gm@vrule}\ignorespaces
+  \hskip \marginparwidth\rlap{\Gm@vrule}\hskip \marginparsep
+  \llap{\Gm@vrule}\hskip\textwidth\rlap{\Gm@vrule}\hss}}%
+\newcommand*{\Gm@pageframes}{%
+  \vb@xt@\z@{%
+   \ifGm@showcrop
+    \vb@xt@\z@{\vskip-1\Gm@truedimen in\vskip\Gm@layoutvoffset%
+     \hb@xt@\z@{\hskip-1\Gm@truedimen in\hskip\Gm@layouthoffset%
+      \vb@xt@\Gm@layoutheight{%
+       \let\protect\relax
+       \hb@xt@\Gm@layoutwidth{\Gm@cropmark(-1,1,-3,3)\hfil\Gm@cropmark(1,1,3,3)}%
+       \vfil
+       \hb@xt@\Gm@layoutwidth{\Gm@cropmark(-1,-1,-3,-3)\hfil\Gm@cropmark(1,-1,3,-3)}}%
+     \hss}%
+    \vss}%
+   \fi%
+   \ifGm@showframe
+    \if@twoside
+     \ifodd\count\z@
+       \let\@themargin\oddsidemargin
+     \else
+       \let\@themargin\evensidemargin
+     \fi
+    \fi
+    \moveright\@themargin%
+    \vb@xt@\z@{%
+     \vskip\topmargin\vb@xt@\z@{\vss\Gm@hrule}%
+     \vskip\headheight\vb@xt@\z@{\vss\Gm@hruled}%
+     \vskip\headsep\vb@xt@\z@{\vss\Gm@hrule}%
+     \@tempdima\textwidth
+     \advance\@tempdima by \marginparsep
+     \advance\@tempdima by \marginparwidth
+     \if@mparswitch
+      \ifodd\count\z@
+       \Gm@vrules@mpi
+      \else
+       \Gm@vrules@mpii
+      \fi
+     \else
+      \Gm@vrules@mpi
+     \fi
+     \vb@xt@\z@{\vss\Gm@hrule}%
+     \vskip\footskip\vb@xt@\z@{\vss\Gm@hruled}%
+     \vss}%
+    \fi%
+  }}%
+\def\ProcessOptionsKV{\@ifnextchar[%]
+  {\@ProcessOptionsKV}{\@ProcessOptionsKV[]}}%
+\def\@ProcessOptionsKV[#1]#2{%
+  \let\@tempa\@empty
+  \@tempcnta\z@
+  \if#1p\@tempcnta\@ne\else\if#1c\@tempcnta\tw@\fi\fi
+  \ifodd\@tempcnta
+   \edef\@tempa{\@ptionlist{\@currname.\@currext}}%
+  \else
+    \@for\CurrentOption:=\@classoptionslist\do{%
+      \@ifundefined{KV@#2@\CurrentOption}%
+      {}{\edef\@tempa{\@tempa,\CurrentOption,}}}%
+    \ifnum\@tempcnta=\z@
+      \edef\@tempa{\@tempa,\@ptionlist{\@currname.\@currext}}%
+    \fi
+  \fi
+  \edef\@tempa{\noexpand\setkeys{#2}{\@tempa}}%
+  \@tempa
+  \AtEndOfPackage{\let\@unprocessedoptions\relax}}%
+\def\Gm@setkeys{\setkeys{Gm}}%
+\def\Gm@processconfig{%
+  \let\Gm@origExecuteOptions\ExecuteOptions
+  \let\ExecuteOptions\Gm@setkeys
+  \InputIfFileExists{geometry.cfg}{}{}
+  \let\ExecuteOptions\Gm@origExecuteOptions}%
+\Gm@save
+\edef\Gm@restore@org{\Gm@restore}%
+\Gm@initall
+\Gm@processconfig
+\ProcessOptionsKV[c]{Gm}%
+\Gm@setdefaultpaper
+\ProcessOptionsKV[p]{Gm}%
+\Gm@process
+\AtBeginDocument{%
+  \Gm@savelength{paperwidth}%
+  \Gm@savelength{paperheight}%
+  \edef\Gm@restore@org{\Gm@restore}%
+  \ifGm@resetpaper
+    \edef\Gm@pw{\Gm@orgpw}%
+    \edef\Gm@ph{\Gm@orgph}%
+  \else
+    \edef\Gm@pw{\the\paperwidth}%
+    \edef\Gm@ph{\the\paperheight}%
+  \fi
+  \ifGm@pass\else
+    \ifnum\mag=\@m\else
+      \Gm@magtooffset
+      \divide\paperwidth\@m
+      \multiply\paperwidth\the\mag
+      \divide\paperheight\@m
+      \multiply\paperheight\the\mag
+    \fi
+  \fi
+  \Gm@detectdriver
+  \ifx\Gm@driver\Gm@xetex
+    \@ifundefined{pdfpagewidth}{}{%
+      \setlength\pdfpagewidth{\Gm@pw}%
+      \setlength\pdfpageheight{\Gm@ph}}%
+    \ifnum\mag=\@m\else
+      \ifx\Gm@truedimen\Gm@true
+        \setlength\paperwidth{\Gm@pw}%
+        \setlength\paperheight{\Gm@ph}%
+      \fi
+    \fi
+  \fi
+  \ifx\Gm@driver\Gm@pdftex
+    \@ifundefined{pdfpagewidth}{}{%
+      \setlength\pdfpagewidth{\Gm@pw}%
+      \setlength\pdfpageheight{\Gm@ph}}%
+    \ifnum\mag=\@m\else
+      \@tempdima=\mag sp%
+      \@ifundefined{pdfhorigin}{}{%
+        \divide\pdfhorigin\@tempdima
+        \multiply\pdfhorigin\@m
+        \divide\pdfvorigin\@tempdima
+        \multiply\pdfvorigin\@m}%
+      \ifx\Gm@truedimen\Gm@true
+        \setlength\paperwidth{\Gm@pw}%
+        \setlength\paperheight{\Gm@ph}%
+      \fi
+    \fi
+  \fi
+  \ifx\Gm@driver\Gm@vtex
+    \@ifundefined{mediawidth}{}{%
+      \mediawidth=\paperwidth
+      \mediaheight=\paperheight}%
+    \ifvtexdvi
+      \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+    \fi
+  \fi
+  \ifx\Gm@driver\Gm@dvips
+    \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+    \ifx\Gm@driver\Gm@dvips\ifGm@landscape
+      \AtBeginDvi{\special{! /landplus90 true store}}%
+    \fi\fi
+  \else\ifx\Gm@driver\Gm@dvipdfm
+    \ifcase\ifx\AtBeginShipoutFirst\relax\@ne\else
+        \ifx\AtBeginShipoutFirst\@undefined\@ne\else\z@\fi\fi
+      \AtBeginShipoutFirst{\special{papersize=\the\paperwidth,\the\paperheight}}%
+    \or
+      \AtBeginDvi{\special{papersize=\the\paperwidth,\the\paperheight}}%
+    \fi
+  \fi\fi
+  \@tempswafalse
+  \ifGm@showframe
+    \@tempswatrue
+  \else\ifGm@showcrop
+    \@tempswatrue
+  \fi\fi
+  \if@tempswa
+    \RequirePackage{atbegshi}%
+      \AtBeginShipout{\setbox\AtBeginShipoutBox=\vbox{%
+        \baselineskip\z@skip\lineskip\z@skip\lineskiplimit\z@
+        \Gm@pageframes\box\AtBeginShipoutBox}}%
+  \fi
+  \Gm@save
+  \edef\Gm@restore@pkg{\Gm@restore}%
+  \ifGm@verbose\ifGm@pass\else\Gm@checkmp\fi\fi
+  \Gm@showparams{preamble}%
+  \let\Gm@pw\relax
+  \let\Gm@ph\relax
+  }% end of \AtBeginDocument
+\newcommand{\geometry}[1]{%
+  \Gm@clean
+  \setkeys{Gm}{#1}%
+  \Gm@process}%
+\@onlypreamble\geometry
+\DeclareRobustCommand\Gm@changelayout{%
+  \setlength{\@colht}{\textheight}
+  \setlength{\@colroom}{\textheight}%
+  \setlength{\vsize}{\textheight}
+  \setlength{\columnwidth}{\textwidth}%
+  \if@twocolumn%
+    \advance\columnwidth-\columnsep
+    \divide\columnwidth\tw@%
+    \@firstcolumntrue%
+  \fi%
+  \setlength{\hsize}{\columnwidth}%
+  \setlength{\linewidth}{\hsize}}%
+\newcommand{\newgeometry}[1]{%
+  \clearpage
+  \Gm@restore@org
+  \Gm@initnewgm
+  \Gm@newgmtrue
+  \setkeys{Gm}{#1}%
+  \Gm@newgmfalse
+  \Gm@process
+  \ifnum\mag=\@m\else\Gm@magtooffset\fi
+  \Gm@changelayout
+  \Gm@showparams{newgeometry}}%
+\newcommand{\restoregeometry}{%
+  \clearpage
+  \Gm@restore@pkg
+  \Gm@changelayout}%
+\newcommand*{\savegeometry}[1]{%
+  \Gm@save
+  \expandafter\edef\csname Gm@restore@@#1\endcsname{\Gm@restore}}%
+\newcommand*{\loadgeometry}[1]{%
+  \clearpage
+  \@ifundefined{Gm@restore@@#1}{%
+    \PackageError{geometry}{%
+    \string\loadgeometry : name `#1' undefined}{%
+    The name `#1' should be predefined with \string\savegeometry}%
+  }{\@nameuse{Gm@restore@@#1}%
+  \Gm@changelayout}}%
+\endinput
+%%
+%% End of file `geometry.sty'.
diff --git a/latex/noweb.sty b/latex/noweb.sty
new file mode 100644
--- /dev/null
+++ b/latex/noweb.sty
@@ -0,0 +1,983 @@
+% Noweb is copyright 1989-2000 by Norman Ramsey.  All rights reserved.
+%
+% Noweb is protected by copyright.  It is not public-domain
+% software or shareware, and it is not protected by a ``copyleft''
+% agreement like the one used by the Free Software Foundation.
+%
+% Noweb is available free for any use in any field of endeavor.  You may 
+% redistribute noweb in whole or in part provided you acknowledge its 
+% source and include this COPYRIGHT file.  You may modify noweb and 
+% create derived works, provided you retain this copyright notice, but 
+% the result may not be called noweb without my written consent.
+%
+% You may sell noweb if you wish.  For example, you may sell a CD-ROM
+% including noweb.
+%
+% You may sell a derived work, provided that all source code for your
+% derived work is available, at no additional charge, to anyone who buys
+% your derived work in any form.  You must give permisson for said
+% source code to be used and modified under the terms of this license.
+% You must state clearly that your work uses or is based on noweb and 
+% that noweb is available free of change.  You must also request that
+% bug reports on your work be reported to you.
+%
+% noweb.sty -- LaTeX support for noweb
+% DON'T read or edit this file!  Use ...noweb-source/tex/support.nw instead.
+{\obeyspaces\AtBeginDocument{\global\let =\ }} % from texbook, p 381
+\def\nwopt@nomargintag{\let\nwmargintag=\@gobble}
+\def\nwopt@margintag{%
+  \def\nwmargintag##1{\leavevmode\llap{##1\kern\nwmarginglue\kern\codemargin}}}
+\def\nwopt@margintag{%
+  \def\nwmargintag##1{\leavevmode\kern-\codemargin\nwthemargintag{##1}\kern\codemargin}}
+\def\nwthemargintag#1{\llap{#1\kern\nwmarginglue}}
+\nwopt@margintag
+\newdimen\nwmarginglue
+\nwmarginglue=0.3in
+\def\nwtagstyle{\footnotesize\Rm}
+% make \hsize in code sufficient for 88 columns
+\setbox0=\hbox{\tt m}
+\newdimen\codehsize
+\codehsize=91\wd0 % 88 columns wasn't enough; I don't know why
+\newdimen\codemargin
+\codemargin=0pt
+\newdimen\nwdefspace
+\nwdefspace=\codehsize
+% need to use \textwidth in {\LaTeX} to handle styles with
+% non-standard margins (David Bruce).  Don't know why we sometimes
+% wanted \hsize.  27 August 1997.
+%% \advance\nwdefspace by -\hsize\relax
+\ifx\textwidth\undefined
+  \advance\nwdefspace by -\hsize\relax
+\else
+  \advance\nwdefspace by -\textwidth\relax
+\fi
+\chardef\other=12
+\def\setupcode{%
+  \chardef\\=`\\
+  \chardef\{=`\{
+  \chardef\}=`\}
+  \catcode`\$=\other
+  \catcode`\&=\other
+  \catcode`\#=\other
+  \catcode`\%=\other
+  \catcode`\~=\other
+  \catcode`\_=\other
+  \catcode`\^=\other
+  \catcode`\"=\other    % fixes problem with german.sty
+  \obeyspaces\Tt
+}
+%\let\nwlbrace=\{
+%\let\nwrbrace=\}
+\def\nwendquote{\relax\ifhmode\spacefactor=1000 \fi}
+{\catcode`\^^M=\active % make CR an active character
+  \gdef\newlines{\catcode`\^^M=\active % make CR an active character
+         \def^^M{\par\startline}}%
+  \gdef\eatline#1^^M{\relax}%
+}
+%%% DON'T   \gdef^^M{\par\startline}}% in case ^^M appears in a \write
+\def\startline{\noindent\hskip\parindent\ignorespaces}
+\def\nwnewline{\ifvmode\else\hfil\break\leavevmode\hbox{}\fi}
+\def\setupmodname{%
+  \catcode`\$=3
+  \catcode`\&=4
+  \catcode`\#=6
+  \catcode`\%=14
+  \catcode`\~=13
+  \catcode`\_=8
+  \catcode`\^=7
+  \catcode`\ =10
+  \catcode`\^^M=5
+  \let\nwlbrace\lbrace
+  \let\nwrbrace\rbrace
+  \let\{\nwlbrace
+  \let\}\nwrbrace
+  % bad news --- don't know what catcode to give "
+  \Rm}
+\def\LA{\begingroup\maybehbox\bgroup\setupmodname\It$\langle$}
+\def\RA{\/$\rangle$\egroup\endgroup}
+\def\code{\leavevmode\begingroup\setupcode\newlines}
+\def\edoc{\endgroup}
+\let\maybehbox\relax
+\newbox\equivbox
+\setbox\equivbox=\hbox{$\equiv$}
+\newbox\plusequivbox
+\setbox\plusequivbox=\hbox{$\mathord{+}\mathord{\equiv}$}
+% \moddef can't have an argument because there might be \code...\edoc
+\def\moddef{\leavevmode\kern-\codemargin\LA}
+\def\endmoddef{\RA\ifmmode\equiv\else\unhcopy\equivbox\fi
+               \nobreak\hfill\nobreak}
+\def\plusendmoddef{\RA\ifmmode\mathord{+}\mathord{\equiv}\else\unhcopy\plusequivbox\fi
+               \nobreak\hfill\nobreak}
+\def\chunklist{%
+\errhelp{I changed \chunklist to \nowebchunks.  
+I'll try to avoid such incompatible changes in the future.}%
+\errmessage{Use \string\nowebchunks\space instead of \string\chunklist}}
+\def\nowebchunks{\message{<Warning: You need noweave -x to use \string\nowebchunks>}}
+\def\nowebindex{\message{<Warning: You need noweave -index to use \string\nowebindex>}}
+% here is support for the new-style (capitalized) font-changing commands
+% thanks to Dave Love
+\ifx\documentstyle\undefined
+  \let\Rm=\rm \let\It=\it \let\Tt=\tt       % plain
+\else\ifx\selectfont\undefined
+  \let\Rm=\rm \let\It=\it \let\Tt=\tt       % LaTeX OFSS
+\else                                       % LaTeX NFSS
+  \def\Rm{\reset@font\rm}
+  \def\It{\reset@font\it}
+  \def\Tt{\reset@font\tt}
+  \def\Bf{\reset@font\bf}
+\fi\fi
+\ifx\reset@font\undefined \let\reset@font=\relax \fi
+\def\noweboptions#1{%
+  \def\@nwoptionlist{#1}%
+  \@for\@nwoption:=\@nwoptionlist\do{%
+    \@ifundefined{nwopt@\@nwoption}{%
+        \@latexerr{There is no such noweb option as '\@nwoption'}\@eha}{%
+        \csname nwopt@\@nwoption\endcsname}}}
+\codemargin=10pt
+\advance\codehsize by \codemargin       % make room for indentation of code
+\advance\nwdefspace by \codemargin      % and fix adjustment for def/use
+\def\setcodemargin#1{%
+  \advance\codehsize by -\codemargin       % make room for indentation of code
+  \advance\nwdefspace by -\codemargin   % and fix adjustment for def/use
+  \codemargin=#1
+  \advance\codehsize by \codemargin       % make room for indentation of code
+  \advance\nwdefspace by \codemargin    % and fix adjustment for
+                                        % def/use
+}
+\def\nwopt@shift{%
+  \dimen@=-0.8in
+  \if@twoside                 % Values for two-sided printing:
+     \advance\evensidemargin by \dimen@
+  \else                       % Values for one-sided printing:
+     \advance\evensidemargin by \dimen@
+     \advance\oddsidemargin by \dimen@
+  \fi
+%  \advance \marginparwidth -\dimen@
+}
+\let\nwopt@noshift\@empty
+\def\nwbegincode#1{%
+  \begingroup
+    \topsep \nwcodetopsep
+    \@beginparpenalty \@highpenalty
+    \@endparpenalty -\@highpenalty
+  \@begincode }
+\def\nwendcode{\endtrivlist \endgroup \filbreak} % keeps code on 1 page
+
+\newenvironment{webcode}{%
+  \@begincode
+}{%
+  \endtrivlist}
+\def\@begincode{%
+    \trivlist \item[]%
+    \leftskip\@totalleftmargin \advance\leftskip\codemargin
+    \rightskip\hsize \advance\rightskip -\codehsize
+    \parskip\z@ \parindent\z@ \parfillskip\@flushglue
+  \linewidth\codehsize
+    \@@par
+    \def\par{\leavevmode\null \@@par \penalty\nwcodepenalty}%
+    \obeylines
+    \@noligs   \ifx\verbatim@nolig@list\undefined\else
+                 \let\do=\nw@makeother \verbatim@nolig@list \do@noligs\`
+               \fi
+    \setupcode \frenchspacing \@vobeyspaces
+  \nowebsize \setupcode
+  \let\maybehbox\mbox }
+  \newskip\nwcodetopsep \nwcodetopsep = 3pt plus 1.2pt minus 1pt
+  \let\nowebsize=\normalsize
+  \def\nwopt@tinycode{\let\nowebsize=\tiny}
+  \def\nwopt@footnotesizecode{\let\nowebsize=\footnotesize}
+  \def\nwopt@scriptsizecode{\let\nowebsize=\scriptsize}
+  \def\nwopt@smallcode{\let\nowebsize=\small}
+  \def\nwopt@normalsizecode{\let\nowebsize=\normalsize}
+  \def\nwopt@largecode{\let\nowebsize=\large}
+  \def\nwopt@Largecode{\let\nowebsize=\Large}
+  \def\nwopt@LARGEcode{\let\nowebsize=\LARGE}
+  \def\nwopt@hugecode{\let\nowebsize=\huge}
+  \def\nwopt@Hugecode{\let\nowebsize=\Huge}
+\newcount\nwcodepenalty  \nwcodepenalty=\@highpenalty
+\def\nw@makeother#1{\catcode`#1=12 }
+\def\nwbegindocs#1{\ifvmode\noindent\fi}
+\let\nwenddocs=\relax
+\let\nwdocspar=\filbreak
+\def\@nwsemifilbreak#1{\vskip0pt plus#1\penalty-200\vskip0pt plus -#1}
+\newdimen\nwbreakcodespace
+\nwbreakcodespace=0.2in  % by default, leave no more than this on a page
+\def\nwopt@breakcode{%
+  \def\nwdocspar{\@nwsemifilbreak{0.2in}}%
+  \def\nwendcode{\endtrivlist\endgroup} % ditches filbreak
+}
+\raggedbottom
+\def\code{\leavevmode\begingroup\setupcode\@vobeyspaces\obeylines}
+\let\edoc=\endgroup
+\newdimen\@original@textwidth
+\def\ps@noweb{%
+  \@original@textwidth=\textwidth
+  \let\@mkboth\@gobbletwo
+  \def\@oddfoot{}\def\@evenfoot{}%       No feet.
+  \if@twoside         % If two-sided printing.
+    \def\@evenhead{\hbox to \@original@textwidth{%
+           \Rm \thepage\qquad{\Tt\leftmark}\hfil\today}}%        Left heading.
+    \def\@oddhead{\hbox to \@original@textwidth{%
+           \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
+  \else               % If one-sided printing.
+    \def\@oddhead{\hbox to \@original@textwidth{%
+           \Rm \today\hfil{\Tt\leftmark}\qquad\thepage}}% Right heading.
+    \let\@evenhead\@oddhead
+  \fi
+  \let\chaptermark\@gobble
+  \let\sectionmark\@gobble
+  \let\subsectionmark\@gobble
+  \let\subsubsectionmark\@gobble
+  \let\paragraphmark\@gobble
+  \let\subparagraphmark\@gobble
+  \def\nwfilename{\begingroup\let\do\@makeother\dospecials
+                \catcode`\{=1 \catcode`\}=2 \nw@filename}
+  \def\nw@filename##1{\endgroup\markboth{##1}{##1}\let\nw@filename=\nw@laterfilename}%
+}
+\def\nw@laterfilename#1{\endgroup\clearpage \markboth{#1}{#1}}
+\let\nwfilename=\@gobble
+\def\nwcodecomment#1{\@@par\penalty\nwcodepenalty
+    \if@firstnwcodecomment
+      \vskip\nwcodecommentsep\penalty\nwcodepenalty\@firstnwcodecommentfalse
+    \fi%
+    \hspace{-\codemargin}{%
+        \rightskip=0pt plus1in
+        \interlinepenalty\nwcodepenalty
+        \let\\\relax\footnotesize\Rm #1\@@par\penalty\nwcodepenalty}}
+\def\@nwalsodefined#1{\nwcodecomment{\@nwlangdepdef\ \nwpageprep\ \@pagesl{#1}.}}
+\def\@nwused#1{\nwcodecomment{\@nwlangdepcud\ \nwpageprep\ \@pagesl{#1}.}}
+\def\@nwnotused#1{\nwcodecomment{\@nwlangdeprtc.}}
+\def\nwoutput#1{\nwcodecomment{\@nwlangdepcwf\ {\Tt \@stripstar#1*\stripped}.}}
+\def\@stripstar#1*#2\stripped{#1}
+\newcommand{\nwprevdefptr}[1]{%
+  \mbox{$\mathord{\triangleleft}\,\mathord{\mbox{\subpageref{#1}}}$}}
+\newcommand{\nwnextdefptr}[1]{%
+  \mbox{$\mathord{\mbox{\subpageref{#1}}}\,\mathord{\triangleright}$}}
+
+\newcommand{\@nwprevnextdefs}[2]{%
+  {\nwtagstyle
+  \ifx\relax#1\else ~~\nwprevdefptr{#1}\fi
+  \ifx\relax#2\else ~~\nwnextdefptr{#2}\fi}}
+\newcommand{\@nwusesondefline}[1]{{\nwtagstyle~~(\@pagenumsl{#1})}}
+\newcommand{\@nwstartdeflinemarkup}{\nobreak\hskip 1.5em plus 1fill\nobreak}
+\newcommand{\@nwenddeflinemarkup}{\nobreak\hskip \nwdefspace minus\nwdefspace\nobreak}
+\def\nwopt@longxref{%
+  \let\nwalsodefined\@nwalsodefined
+  \let\nwused\@nwused
+  \let\nwnotused\@nwnotused
+  \let\nwprevnextdefs\@gobbletwo
+  \let\nwusesondefline\@gobble
+  \let\nwstartdeflinemarkup\relax
+  \let\nwenddeflinemarkup\relax
+}
+\def\nwopt@shortxref{%
+  \let\nwalsodefined\@gobble
+  \let\nwused\@gobble
+  \let\nwnotused\@gobble
+  \let\nwprevnextdefs\@nwprevnextdefs
+  \let\nwusesondefline\@nwusesondefline
+  \let\nwstartdeflinemarkup\@nwstartdeflinemarkup
+  \let\nwenddeflinemarkup\@nwenddeflinemarkup
+}
+\def\nwopt@noxref{%
+  \let\nwalsodefined\@gobble
+  \let\nwused\@gobble
+  \let\nwnotused\@gobble
+  \let\nwprevnextdefs\@gobbletwo
+  \let\nwusesondefline\@gobble
+  \let\nwstartdeflinemarkup\relax
+  \let\nwenddeflinemarkup\relax
+}
+\nwopt@shortxref % to hell with backward compatibility!
+\newskip\nwcodecommentsep \nwcodecommentsep=3pt plus 1pt minus 1pt
+\newif\if@firstnwcodecomment\@firstnwcodecommenttrue
+\newcount\@nwlopage\newcount\@nwhipage  % range lo..hi-1
+\newcount\@nwlosub              % subpage of lo
+\newcount\@nwhisub              % subpage of hi
+\def\@nwfirstpage#1#2#3{% subpage page xref-tag
+  \@nwlopage=#2 \@nwlosub=#1
+  \def\@nwloxreftag{#3}%
+  \advance\@nwpagecount by \@ne
+  \@nwhipage=\@nwlopage\advance\@nwhipage by \@ne }
+\def\@nwnextpage#1#2#3{% subpage page xref-tag
+  \ifnum\@nwhipage=#2 
+    \advance\@nwhipage by \@ne 
+    \advance\@nwpagecount by \@ne
+    \@nwhisub=#1 
+    \def\@nwhixreftag{#3}\else
+  \ifnum#2<\@nwlopage \advance\@nwhipage by \m@ne
+                      \ifnum\@nwhipage=\@nwlopage
+                           \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                              {\@nwloxreftag}}}%
+                      \else
+                        \count@=\@nwhipage \advance\count@ by \m@ne
+                        \ifnum\count@=\@nwlopage % consecutive pages
+                            \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                              {\@nwloxreftag}}%
+                                          \noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                                              {\@nwhixreftag}}}%
+                        \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                                \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+                                \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                                  \count@=\@nwlopage \divide\count@ by 100
+                                  \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+                                  \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                                    \multiply\@nwpagetemp by 100
+                                    \advance \@nwhipage by -\@nwpagetemp
+                                    \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                                  \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                                  \fi
+                                \fi
+                              \fi%
+                        \fi
+                      \fi%
+                      \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
+  \ifnum#2>\@nwhipage \advance\@nwhipage by \m@ne
+                      \ifnum\@nwhipage=\@nwlopage
+                           \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                              {\@nwloxreftag}}}%
+                      \else
+                        \count@=\@nwhipage \advance\count@ by \m@ne
+                        \ifnum\count@=\@nwlopage % consecutive pages
+                            \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                              {\@nwloxreftag}}%
+                                          \noexpand\noexpand\noexpand\\%
+                                             {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                                              {\@nwhixreftag}}}%
+                        \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                                \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+                                \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                                  \count@=\@nwlopage \divide\count@ by 100
+                                  \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+                                  \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                                    \multiply\@nwpagetemp by 100
+                                    \advance \@nwhipage by -\@nwpagetemp
+                                    \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                                  \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                                  \fi
+                                \fi
+                              \fi%
+                        \fi
+                      \fi%
+                      \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\@nwfirstpage{#1}{#2}{#3}\else
+    \@nwlosub=0 \@nwhisub=0
+  \fi\fi\fi
+  }
+\newcount\@nwpagetemp
+\newcount\@nwpagecount
+\def\@nwfirstpagel#1{% label
+  \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
+                      \nwix@cons\nw@pages{\\{\bf ??}}}{%
+    \edef\@tempa{\noexpand\@nwfirstpage\subpagepair{#1}{#1}}\@tempa}}
+\def\@nwnextpagel#1{% label
+  \@ifundefined{r@#1}{\@warning{Reference `#1' on page \thepage \space undefined}%
+                      \nwix@cons\nw@pages{\\{\bf ??}}}{%
+    \edef\@tempa{\noexpand\@nwnextpage\subpagepair{#1}{#1}}\@tempa}}
+\def\@pagesl#1{%  list of labels
+  \gdef\nw@pages{}\@nwpagecount=0
+  \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
+  \advance\@nwhipage by \m@ne
+  \ifnum\@nwhipage=\@nwlopage
+       \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}}%
+  \else
+    \count@=\@nwhipage \advance\count@ by \m@ne
+    \ifnum\count@=\@nwlopage % consecutive pages
+        \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}%
+                      \noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                          {\@nwhixreftag}}}%
+    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+              \count@=\@nwlopage \divide\count@ by 100
+              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                \multiply\@nwpagetemp by 100
+                \advance \@nwhipage by -\@nwpagetemp
+                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \fi
+            \fi
+          \fi%
+    \fi
+  \fi%
+  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@nwhyperpagenum##1}%
+  \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
+\def\@nwhyperpagenum#1#2{\nwhyperreference{#2}{#1}}
+
+\def\@pagenumsl#1{%  list of labels -- doesn't include word `pages', commas, or `and'
+  \gdef\nw@pages{}\@nwpagecount=0
+  \def\\##1{\@nwfirstpagel{##1}\let\\=\@nwnextpagel}#1%
+  \advance\@nwhipage by \m@ne
+  \ifnum\@nwhipage=\@nwlopage
+       \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}}%
+  \else
+    \count@=\@nwhipage \advance\count@ by \m@ne
+    \ifnum\count@=\@nwlopage % consecutive pages
+        \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}%
+                      \noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                          {\@nwhixreftag}}}%
+    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+              \count@=\@nwlopage \divide\count@ by 100
+              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                \multiply\@nwpagetemp by 100
+                \advance \@nwhipage by -\@nwpagetemp
+                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \fi
+            \fi
+          \fi%
+    \fi
+  \fi%
+  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa%
+  \def\\##1{\@nwhyperpagenum##1\let\\=\@nwpagenumslrest}\nw@pages}
+\def\@nwpagenumslrest#1{~\@nwhyperpagenum#1}
+\def\subpages#1{% list of {{subpage}{page}}
+  \gdef\nw@pages{}\@nwpagecount=0
+  \def\\##1{\edef\@tempa{\noexpand\@nwfirstpage##1{}}\@tempa
+            \def\\####1{\edef\@tempa{\noexpand\@nwnextpage####1}\@tempa}}#1%
+  \advance\@nwhipage by \m@ne
+  \ifnum\@nwhipage=\@nwlopage
+       \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}}%
+  \else
+    \count@=\@nwhipage \advance\count@ by \m@ne
+    \ifnum\count@=\@nwlopage % consecutive pages
+        \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                          {\@nwloxreftag}}%
+                      \noexpand\noexpand\noexpand\\%
+                         {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                          {\@nwhixreftag}}}%
+    \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+            \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+            \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+              \count@=\@nwlopage \divide\count@ by 100
+              \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+              \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                \multiply\@nwpagetemp by 100
+                \advance \@nwhipage by -\@nwpagetemp
+                \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+              \fi
+            \fi
+          \fi%
+    \fi
+  \fi%
+  \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa\def\\##1{\@firstoftwo##1}%
+  \ifnum\@nwpagecount=1 \nwpageword \else \nwpagesword\fi~\commafy{\nw@pages}}
+\def\@nwaddrange{\advance\@nwhipage by \m@ne
+                 \ifnum\@nwhipage=\@nwlopage
+                      \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                        {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                         {\@nwloxreftag}}}%
+                 \else
+                   \count@=\@nwhipage \advance\count@ by \m@ne
+                   \ifnum\count@=\@nwlopage % consecutive pages
+                       \edef\@tempa{\noexpand\noexpand\noexpand\\%
+                                        {{\nwthepagenum{\number\@nwlosub}{\number\@nwlopage}}%
+                                         {\@nwloxreftag}}%
+                                     \noexpand\noexpand\noexpand\\%
+                                        {{\nwthepagenum{\number\@nwhisub}{\number\@nwhipage}}
+                                         {\@nwhixreftag}}}%
+                   \else \ifnum\@nwlopage<110 \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                           \count@=\@nwlopage \divide\count@ by 100 \multiply\count@ by 100
+                           \ifnum\count@=\@nwlopage \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}\else
+                             \count@=\@nwlopage \divide\count@ by 100
+                             \@nwpagetemp=\@nwhipage \divide\@nwpagetemp by 100
+                             \ifnum\count@=\@nwpagetemp %  lo--least 2 digits of hi
+                               \multiply\@nwpagetemp by 100
+                               \advance \@nwhipage by -\@nwpagetemp
+                               \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                             \else \edef\@tempa{\noexpand\noexpand\noexpand\\{{\number\@nwlopage--\number\@nwhipage}{}}}%
+                             \fi
+                           \fi
+                         \fi%
+                   \fi
+                 \fi%
+                 \edef\@tempa{\noexpand\nwix@cons\noexpand\nw@pages{\@tempa}}\@tempa}
+\def\nwpageword{\@nwlangdepchk}  % chunk, was page
+\def\nwpagesword{\@nwlangdepchks}  % chunk, was page
+\def\nwpageprep{\@nwlangdepin}     % in, was on
+\newcommand\nw@genericref[2]{% what to do, name of ref
+  \expandafter\nw@g@nericref\csname r@#2\endcsname#1{#2}}
+\newcommand\nw@g@nericref[3]{% control sequence, what to do, name
+  \ifx#1\relax
+    \ref{#3}% trigger the standard `undefined ref' mechanisms
+  \else
+    \expandafter#2#1.\\%
+  \fi}
+\def\nw@selectone#1#2#3\\{#1}
+\def\nw@selecttwo#1#2#3\\{#2}
+\def\nw@selectonetwo#1#2#3\\{{#1}{#2}}
+\newcommand{\subpageref}[1]{%
+  \nwhyperreference{#1}{\nw@genericref\@subpageref{#1}}}
+\def\@subpageref#1#2#3\\{%
+  \@ifundefined{2on#2}{#2}{\nwthepagenum{#1}{#2}}}
+\newcommand{\subpagepair}[1]{%  % produces {subpage}{page}
+  \@ifundefined{r@#1}%
+    {{0}{0}}%
+    {\nw@genericref\@subpagepair{#1}}}
+\def\@subpagepair#1#2#3\\{%
+  \@ifundefined{2on#2}{{0}{#2}}{{#1}{#2}}}
+\newcommand{\sublabel}[1]{%
+  \leavevmode % needed to make \@bsphack work
+  \@bsphack
+  \nwblindhyperanchor{#1}%
+  \if@filesw {\let\thepage\relax
+   \def\protect{\noexpand\noexpand\noexpand}%
+   \edef\@tempa{\write\@auxout{\string
+      \newsublabel{#1}{{}{\thepage}}}}%
+   \expandafter}\@tempa
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+\newcommand{\nosublabel}[1]{%
+  \@bsphack\if@filesw {\let\thepage\relax
+   \def\protect{\noexpand\noexpand\noexpand}%
+   \edef\@tempa{\write\@auxout{\string
+      \newlabel{#1}{{0}{\thepage}}}}%
+   \expandafter}\@tempa
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+\newcommand\newsublabel{%
+  \nw@settrailers
+  \global\let\newsublabel\@newsublabel
+  \@newsublabel}
+\newcommand{\@newsublabel}[2]{%
+  \edef\this@page{\@cdr#2\@nil}%
+  \ifx\this@page\last@page\else
+    \sub@page=\z@
+  \fi
+  \edef\last@page{\this@page}
+  \advance\sub@page by \@ne
+  \ifnum\sub@page=\tw@
+    \global\@namedef{2on\this@page}{}%
+  \fi
+  \pendingsublabel{#1}%
+  \edef\@tempa##1{\noexpand\newlabel{##1}%
+    {{\number\sub@page}{\this@page}\nw@labeltrailers}}%
+  \pending@sublabels
+  \def\pending@sublabels{}}
+\newcommand\nw@settrailers{% -- won't work on first run
+  \@ifpackageloaded{nameref}%
+     {\gdef\nw@labeltrailers{{}{}{}}}%
+     {\gdef\nw@labeltrailers{}}}
+\renewcommand\nw@settrailers{% 
+  \@ifundefined{@secondoffive}%
+     {\gdef\nw@labeltrailers{}}%
+     {\gdef\nw@labeltrailers{{}{}{}}}}
+\newcommand{\nextchunklabel}[1]{%
+  \nwblindhyperanchor{#1}%   % looks slightly bogus --- nr
+  \@bsphack\if@filesw {\let\thepage\relax
+      \edef\@tempa{\write\@auxout{\string\pendingsublabel{#1}}}%
+      \expandafter}\@tempa
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+\newcommand\pendingsublabel[1]{%
+  \def\@tempa{\noexpand\@tempa}%
+  \edef\pending@sublabels{\noexpand\@tempa{#1}\pending@sublabels}}
+\def\pending@sublabels{}
+\def\last@page{\relax}
+\newcount\sub@page
+\def\@alphasubpagenum#1#2{#2\ifnum#1=0 \else\@alph{#1}\fi}
+\def\@nosubpagenum#1#2{#2}
+\def\@numsubpagenum#1#2{#2\ifnum#1=0 \else.\@arabic{#1}\fi}
+\def\nwopt@nosubpage{\let\nwthepagenum=\@nosubpagenum\nwopt@nomargintag}
+\def\nwopt@numsubpage{\let\nwthepagenum=\@numsubpagenum}
+\def\nwopt@alphasubpage{\let\nwthepagenum=\@alphasubpagenum}
+\nwopt@alphasubpage
+\newcount\@nwalph@n
+\let\@nwalph@d\@tempcnta
+\let\@nwalph@bound\@tempcntb
+\def\@nwlongalph#1{{%
+  \@nwalph@n=#1\advance\@nwalph@n by-1
+  \@nwalph@bound=26
+  \loop\ifnum\@nwalph@n<\@nwalph@bound\else
+     \advance\@nwalph@n by -\@nwalph@bound
+     \multiply\@nwalph@bound by 26
+  \repeat
+  \loop\ifnum\@nwalph@bound>1
+    \divide\@nwalph@bound by 26
+    \@nwalph@d=\@nwalph@n\divide\@nwalph@d by \@nwalph@bound
+    % d := d * bound ; n -:= d; d := d / bound --- saves a temporary
+    \multiply\@nwalph@d by \@nwalph@bound
+    \advance\@nwalph@n by -\@nwalph@d
+    \divide\@nwalph@d by \@nwalph@bound
+    \advance\@nwalph@d by 1 \@alph{\@nwalph@d}%
+  \repeat
+}}
+\newcount\nw@chunkcount
+\nw@chunkcount=\@ne
+\newcommand{\weblabel}[1]{%
+  \@bsphack
+  \nwblindhyperanchor{#1}%
+  \if@filesw {\let\thepage\relax
+   \def\protect{\noexpand\noexpand\noexpand}%
+   \edef\@tempa{\write\@auxout{\string
+      \newsublabel{#1}{{}{\number\nw@chunkcount}}}}%
+   \expandafter}\@tempa
+   \global\advance\nw@chunkcount by \@ne
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+\def\nwopt@webnumbering{%
+  \let\sublabel=\weblabel
+  \def\nwpageword{chunk}\def\nwpagesword{chunks}%
+  \def\nwpageprep{in}}
+% \nwindexdefn{printable name}{identifying label}{label of chunk}
+% \nwindexuse{printable name}{identifying label}{label of chunk}
+
+\def\nwindexdefn#1#2#3{\@auxix{\protect\nwixd}{#2}{#3}}
+\def\nwindexuse#1#2#3{\@auxix{\protect\nwixu}{#2}{#3}}
+
+\def\@auxix#1#2#3{% {marker}{id label}{subpage label}
+   \@bsphack\if@filesw {\let\nwixd\relax\let\nwixu\relax
+   \def\protect{\noexpand\noexpand\noexpand}%
+   \edef\@tempa{\write\@auxout{\string\nwixadd{#1}{#2}{#3}}}%
+   \expandafter}\@tempa
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+% \nwixadd{marker}{idlabel}{subpage label}
+\def\nwixadd#1#2#3{%
+  \@ifundefined{nwixl@#2}%
+    {\global\@namedef{nwixl@#2}{#1{#3}}}%
+    {\expandafter\nwix@cons\csname nwixl@#2\endcsname{#1{#3}}}}
+\def\@nwsubscriptident#1#2{\mbox{$\mbox{#1}_{\mathrm{\subpageref{#2}}}$}}
+\def\@nwnosubscriptident#1#2{#1}
+\def\@nwhyperident#1#2{\leavevmode\nwhyperreference{#2}{#1}}
+\def\nwopt@subscriptidents{%
+  \let\nwlinkedidentq\@nwsubscriptident
+  \let\nwlinkedidentc\@nwsubscriptident
+}
+\def\nwopt@nosubscriptidents{%
+  \let\nwlinkedidentq\@nwnosubscriptident
+  \let\nwlinkedidentc\@nwnosubscriptident
+}
+\def\nwopt@hyperidents{%
+  \let\nwlinkedidentq\@nwhyperident
+  \let\nwlinkedidentc\@nwhyperident
+}
+\def\nwopt@nohyperidents{%
+  \let\nwlinkedidentq\@nwnosubscriptident
+  \let\nwlinkedidentc\@nwnosubscriptident
+}
+\def\nwopt@subscriptquotedidents{%
+  \let\nwlinkedidentq\@nwsubscriptident
+}
+\def\nwopt@nosubscriptquotedidents{%
+  \let\nwlinkedidentq\@nwnosubscriptident
+}
+\def\nwopt@hyperquotedidents{%
+  \let\nwlinkedidentq\@nwhyperident
+}
+\def\nwopt@nohyperquotedidents{%
+  \let\nwlinkedidentq\@nwnosubscriptident
+}
+\nwopt@hyperidents
+\newcount\@commacount
+\def\commafy#1{%
+  {\nwix@listcount{#1}\@commacount=\nwix@counter
+   \let\@comma@each=\\%
+   \ifcase\@commacount\let\\=\@comma@each\or\let\\=\@comma@each\or
+     \def\\{\def\\{ \@nwlangdepand\ \@comma@each}\@comma@each}\else
+     \def\\{\def\\{, %
+                   \advance\@commacount by \m@ne
+                   \ifnum\@commacount=1 \@nwlangdepand~\fi\@comma@each}\@comma@each}\fi
+   #1}}
+\def\nwix@cons#1#2{% {list}{\marker{element}}
+  {\toks0=\expandafter{#1}\def\@tempa{#2}\toks2=\expandafter{\@tempa}%
+   \xdef#1{\the\toks0 \the\toks2 }}}
+\def\nwix@uses#1{% {label}
+  \def\nwixu{\\}\let\nwixd\@gobble\@nameuse{nwixl@#1}}
+\def\nwix@defs#1{% {label}
+  \def\nwixd{\\}\let\nwixu\@gobble\@nameuse{nwixl@#1}}
+\newcount\nwix@counter
+\def\nwix@listcount#1{% {list with \\}
+  {\count@=0
+   \def\\##1{\advance\count@ by \@ne }%
+   #1\global\nwix@counter=\count@ }}
+\def\nwix@usecount#1{\nwix@listcount{\nwix@uses{#1}}}
+\def\nwix@defcount#1{\nwix@listcount{\nwix@defs{#1}}}
+\def\nwix@id@defs#1{% index pair
+  {{\Tt \@car#1\@nil}%
+  \def\\##1{\nwix@defs@space\subpageref{##1}}\nwix@defs{\@cdr#1\@nil}}}
+  % useful above to change ~ into something that can break
+% this option is undocumented because I think breakdefs is always right
+\def\nwopt@breakdefs{\def\nwix@defs@space{\penalty200\ }}
+\def\nwopt@nobreakdefs{\def\nwix@defs@space{~}} % old code
+\nwopt@breakdefs
+\def\nwidentuses#1{% list of index pairs
+  \nwcodecomment{\@nwlangdepuss\ \let\\=\nwix@id@defs\commafy{#1}.}}
+\def\nwix@totaluses#1{% list of index pairs
+  {\count@=0
+   \def\\##1{\nwix@usecount{\@cdr##1\@nil}\advance\count@ by\nwix@counter}%
+   #1\global\nwix@counter\count@ }}
+\def\nwix@id@uses#1#2{% {ident}{label}
+  \nwix@usecount{#2}\ifnum\nwix@counter>0
+    {\advance\leftskip by \codemargin
+     \nwcodecomment{{\Tt #1}, \@nwlangdepusd\ \nwpageprep\ \@pagesl{\nwix@uses{#2}}.}}%
+  \else
+    \ifnw@hideunuseddefs\else
+      {\advance\leftskip by \codemargin \nwcodecomment{{\Tt #1}, \@nwlangdepnvu.}}%
+    \fi
+  \fi}
+\def\nwidentdefs#1{% list of index pairs
+  \ifnw@hideunuseddefs\nwix@totaluses{#1}\else\nwix@listcount{#1}\fi
+  \ifnum\nwix@counter>0
+    \nwcodecomment{\@nwlangdepdfs:}%
+    {\def\\##1{\nwix@id@uses ##1}#1}%
+  \fi}
+\newif\ifnw@hideunuseddefs\nw@hideunuseddefsfalse
+\def\nwopt@hideunuseddefs{\nw@hideunuseddefstrue}
+\def\nwopt@noidentxref{%
+  \let\nwidentdefs\@gobble
+  \let\nwidentuses\@gobble}
+\def\nw@underlinedefs{% {list with \nwixd, \nwixu}
+  \let\\=\relax\def\nw@comma{, }
+  \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
+  \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
+
+\def\nw@indexline#1#2{%
+   {\indent {\Tt #1}: \nw@underlinedefs\@nameuse{nwixl@#2}\par}}
+
+\newenvironment{thenowebindex}{\parindent=-10pt \parskip=\z@ 
+        \advance\leftskip by 10pt 
+        \advance\rightskip by 0pt plus1in\par\@afterindenttrue
+    \def\\##1{\nw@indexline##1}}{}
+\def\nowebindex{%
+  \@ifundefined{nwixs@i}%
+     {\@warning{The \string\nowebindex\space is empty}}%
+     {\begin{thenowebindex}\@nameuse{nwixs@i}\end{thenowebindex}}}
+\def\nowebindex@external{%
+  {\let\nwixadds@c=\@gobble
+   \def\nwixadds@i##1{\nw@indexline##1}%
+   \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
+   \begin{thenowebindex}\@input{\jobname.nwi}\end{thenowebindex}}}
+\def\nwixlogsorted#1#2{% list data
+   \@bsphack\if@filesw 
+     \toks0={#2}\immediate\write\@auxout{\string\nwixadds{#1}{\the\toks0}}
+   \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
+\def\nwixadds#1#2{%
+  \@ifundefined{nwixs@#1}%
+    {\global\@namedef{nwixs@#1}{\\{#2}}}%
+    {\expandafter\nwix@cons\csname nwixs@#1\endcsname{\\{#2}}}}
+\let\nwixaddsx=\@gobbletwo
+\def\nwopt@externalindex{%
+  \ifx\nwixadds\@gobbletwo % already called
+  \else
+    \let\nwixaddsx=\nwixadds \let\nwixadds=\@gobbletwo
+    \let\nowebindex=\nowebindex@external
+    \let\nowebchunks=\nowebchunks@external
+  \fi}
+\def\nowebchunks{%
+  \@ifundefined{nwixs@c}%
+     {\@warning{The are no \string\nowebchunks}}%
+     {\begin{thenowebchunks}\@nameuse{nwixs@c}\end{thenowebchunks}}}
+\def\nowebchunks@external{%
+  {\let\nwixadds@i=\@gobble
+   \def\nwixadds@c##1{\nw@onechunk##1}%
+   \def\nwixaddsx##1##2{\@nameuse{nwixadds@##1}{##2}}%
+   \begin{thenowebchunks}\@input{\jobname.nwi}\end{thenowebchunks}}}
+    \@namedef{r@nw@notdef}{{0}{(\@nwlangdepnvd)}}
+\def\nw@chunkunderlinedefs{% {list of labels with \nwixd, \nwixu}
+  \let\\=\relax\def\nw@comma{, }
+  \def\nwixd##1{\\\underline{\subpageref{##1}}\let\\\nw@comma}%
+  \def\nwixu##1{\\\subpageref{##1}\let\\\nw@comma}}
+\def\nw@onechunk#1#2#3{% {name}{label of first definition}{list with \nwixd, \nwixu}
+  \@ifundefined{r@#2}{}{%
+    \indent\LA #1~{\nwtagstyle\subpageref{#2}}\RA 
+    \if@nwlongchunks{~\nw@chunkunderlinedefs#3}\fi\par}}
+\newenvironment{thenowebchunks}{\vskip3pt
+  \parskip=\z@\parindent=-10pt \advance\leftskip by 10pt
+  \advance\rightskip by 0pt plus10pt \@afterindenttrue
+  \def\\##1{\nw@onechunk##1}}{}
+\newif\if@nwlongchunks
+\@nwlongchunksfalse
+\let\nwopt@longchunks\@nwlongchunkstrue
+\newcommand\@nw@hyper@ref{\hyperreference} % naras
+\newcommand\@nw@hyper@anc{\blindhyperanchor} % naras
+\newcommand\@nw@hyperref@ref[2]{\hyperlink{noweb.#1}{#2}}  % nr
+\newcommand\@nw@hyperref@anc[1]{\hypertarget{noweb.#1}{\relax}}  % nr
+%%\renewcommand\@nw@hyperref@ref[2]{{#2}}  % nr
+%%\renewcommand\@nw@hyperref@anc[1]{}  % nr
+\newcommand\nwhyperreference{%
+  \@ifundefined{hyperlink}
+    {\@ifundefined{hyperreference}
+       {\global\let\nwhyperreference\@gobble}
+       {\global\let\nwhyperreference\@nw@hyper@ref}}
+    {\global\let\nwhyperreference\@nw@hyperref@ref}%
+  \nwhyperreference
+}
+
+\newcommand\nwblindhyperanchor{%
+  \@ifundefined{hyperlink}
+    {\@ifundefined{hyperreference}
+       {\global\let\nwblindhyperanchor\@gobble}
+       {\global\let\nwblindhyperanchor\@nw@hyper@anc}}
+    {\global\let\nwblindhyperanchor\@nw@hyperref@anc}%
+  \nwblindhyperanchor
+}
+\newcommand\nwanchorto{%
+  \begingroup\let\do\@makeother\dospecials
+     \catcode`\{=1 \catcode`\}=2 \nw@anchorto}
+\newcommand\nw@anchorto[1]{\endgroup\def\nw@next{#1}\nw@anchortofin}
+\newcommand\nw@anchortofin[1]{#1\footnote{See URL \texttt{\nw@next}.}}
+\let\nwanchorname\@gobble
+\newif\ifhtml
+\htmlfalse
+\let\nwixident=\relax
+\def\nwbackslash{\char92}
+\def\nwlbrace{\char123}
+\def\nwrbrace{\char125}
+\def\nwopt@english{%
+  \def\@nwlangdepdef{This definition is continued}%
+  \def\@nwlangdepcud{This code is used}%
+  \def\@nwlangdeprtc{Root chunk (not used in this document)}%
+  \def\@nwlangdepcwf{This code is written to file}%
+  \def\@nwlangdepchk{chunk}%
+  \def\@nwlangdepchks{chunks}%
+  \def\@nwlangdepin{in}%
+  \def\@nwlangdepand{and}%
+  \def\@nwlangdepuss{Uses}%
+  \def\@nwlangdepusd{used}%
+  \def\@nwlangdepnvu{never used}%
+  \def\@nwlangdepdfs{Defines}%
+  \def\@nwlangdepnvd{never defined}%
+}
+\let\nwopt@american\nwopt@english
+\def\nwopt@portuges{%
+  \def\@nwlangdepdef{Defini\c{c}\~ao continuada em}%
+  % This definition is continued
+  \def\@nwlangdepcud{C\'odigo usado em}%
+  % This code is used
+  \def\@nwlangdeprtc{Fragmento de topo (sem uso no documento)}%
+  % Root chunk (not used in this document)
+  \def\@nwlangdepcwf{Este c\'odigo foi escrito no ficheiro}%
+  % This code is written to file
+  \def\@nwlangdepchk{fragmento}%
+  % chunk
+  \def\@nwlangdepchks{fragmentos}%
+  % chunks
+  \def\@nwlangdepin{no(s)}%
+  % in
+  \def\@nwlangdepand{e}%
+  % and
+  \def\@nwlangdepuss{Usa}%
+  % Uses
+  \def\@nwlangdepusd{usado}%
+  % used
+  \def\@nwlangdepnvu{nunca usado}%
+  % never used
+  \def\@nwlangdepdfs{Define}%
+  % Defines
+  \def\@nwlangdepnvd{nunca definido}%
+  % never defined
+}
+\def\nwopt@frenchb{%
+  \def\@nwlangdepdef{Suite de la d\'efinition}%
+  % This definition is continued
+  \def\@nwlangdepcud{Ce code est employ\'e}%
+  % This code is used
+  \def\@nwlangdeprtc{Morceau racine (pas employ\'e dans ce document)}%
+  % Root chunk (not used in this document)
+  \def\@nwlangdepcwf{Ce code est \'ecrit dans le fichier}%
+  % This code is written to file
+  \def\@nwlangdepchk{le morceau}%
+  % chunk
+  \def\@nwlangdepchks{les morceaux}%
+  % chunks
+  \def\@nwlangdepin{dans}%
+  % in
+  \def\@nwlangdepand{et}%
+  % and
+  \def\@nwlangdepuss{Utilise}%
+  % Uses
+  \def\@nwlangdepusd{utilis\'{e}}%
+  % used
+  \def\@nwlangdepnvu{jamais employ\'{e}}%
+  % never used
+  \def\@nwlangdepdfs{D\'{e}finit}%
+  % Defines
+  % Cannot use the accent here: \def\@nwlangdepnvd{jamais d\'{e}fini}%
+  \def\@nwlangdepnvd{jamais defini}%
+  % never defined
+}
+\let\nwopt@french\nwopt@frenchb
+\def\nwopt@german{%
+  \def\@nwlangdepdef{Diese Definition wird fortgesetzt}%
+  % This definition is continued
+  \def\@nwlangdepcud{Dieser Code wird benutzt}%
+  % This code is used
+  \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}%
+  % Root chunk (not used in this document)
+  %\def\@nwlangdepcwf{Dieser Code schreibt man zum File}%
+  \def\@nwlangdepcwf{Dieser Code geht in Datei}%
+  % This code is written to file
+  \def\@nwlangdepchk{dem Teil}%
+  % chunk
+  %\def\@nwlangdepchks{Teils}%   
+  \def\@nwlangdepchks{den Teilen}%   
+  % chunks
+  \def\@nwlangdepin{in}%
+  % in
+  \def\@nwlangdepand{und}%
+  % and
+  \def\@nwlangdepuss{Benutzt}%
+  % Uses
+  \def\@nwlangdepusd{benutzt}%
+  % used
+  \def\@nwlangdepnvu{nicht benutzt}%
+  % never used
+  \def\@nwlangdepdfs{Definiert}%
+  % Defines
+  \def\@nwlangdepnvd{nicht definiert}%
+  % never defined
+}
+\def\nwopt@german{%
+  \def\@nwlangdepdef{Diese Definition wird fortgesetzt}%
+  % This definition is continued
+  \def\@nwlangdepcud{Dieser Code wird benutzt}%
+  % This code is used
+  \def\@nwlangdeprtc{Hauptteil (nicht in diesem Dokument benutzt)}%
+  % Root chunk (not used in this document)
+  \def\@nwlangdepcwf{Dieser Code schreibt man zum File}%
+  % This code is written to file
+  \def\@nwlangdepchk{Teil}%
+  % chunk
+  \def\@nwlangdepchks{Teils}%
+  % chunks
+  \def\@nwlangdepin{im}%
+  % in
+  \def\@nwlangdepand{und}%
+  % and
+  \def\@nwlangdepuss{Benutzt}%
+  % Uses
+  \def\@nwlangdepusd{benutzt}%
+  % used
+  \def\@nwlangdepnvu{nicht benutzt}%
+  % never used
+  \def\@nwlangdepdfs{Definiert}%
+  % Defines
+  \def\@nwlangdepnvd{nicht definiert}%
+  % never defined
+}
+\let\nwopt@ngerman\nwopt@german
+\ifx\languagename\undefined % default is English
+  \noweboptions{english}
+\else
+  \@ifundefined{nwopt@\languagename}
+     {\noweboptions{english}}
+     {\expandafter\noweboptions\expandafter{\languagename}}
+\fi
diff --git a/license.txt b/license.txt
new file mode 100644
--- /dev/null
+++ b/license.txt
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/scripts/common.bash b/scripts/common.bash
new file mode 100644
--- /dev/null
+++ b/scripts/common.bash
@@ -0,0 +1,74 @@
+PATH="$PATH:$PWD/cabal-dev/bin/"
+
+VERSION=$(awk '/^version:/{print $2}' dbus-core.cabal)
+
+CABAL_DEV=$(which cabal-dev)
+ANANSI=$(which anansi)
+XELATEX=$(which xelatex)
+INKSCAPE=$(which inkscape)
+XZ=$(which xz)
+
+require_cabal_dev()
+{
+	if [ -z "$CABAL_DEV" ]; then
+		echo "Can't find 'cabal-dev' executable; make sure it exists on your "'$PATH'
+		echo "Cowardly refusing to fuck with the global package database"
+		exit 1
+	fi
+}
+
+require_anansi()
+{
+	if [ -z "$ANANSI" ]; then
+		echo "Can't find 'anansi' executable; running '$CABAL_DEV install anansi'"
+		require_cabal_dev
+		$CABAL_DEV install anansi &> /dev/null
+		if [ "$?" -ne "0" ]; then
+			echo "Installation failed; please install Anansi manually somehow"
+			exit 1
+		fi
+		ANANSI=$(which anansi)
+		echo "Success; anansi = $ANANSI"
+	fi
+}
+
+require_xelatex()
+{
+	if [ -z "$XELATEX" ]; then
+		echo "Can't find 'xelatex' executable; make sure it exists on your "'$PATH'
+		exit 1
+	fi
+}
+
+require_inkscape()
+{
+	if [ -z "$INKSCAPE" ]; then
+		echo "Can't find 'inkscape' executable; make sure it exists on your "'$PATH'
+		exit 1
+	fi
+}
+
+make_pdf()
+{
+	require_anansi
+	require_xelatex
+	require_inkscape
+	
+	rm -f *.{aux,tex,idx,log,out,toc,pdf}
+	$ANANSI -w -l latex-noweb -o dbus-core.tex src/dbus-core.anansi || exit 1
+	$INKSCAPE --export-eps=latex/figure_1.eps latex/figure_1.svg
+	$XELATEX dbus-core.tex > /dev/null || exit 1
+	$XELATEX dbus-core.tex > /dev/null || exit 1
+	rm -f *.{aux,tex,idx,log,out,toc}
+	mv dbus-core.pdf "dbus-core_$VERSION.pdf"
+}
+
+clean_dev_install()
+{
+	require_anansi
+	require_cabal_dev
+	
+	rm -rf hs dist
+	$ANANSI -o hs src/dbus-core.anansi || exit 1
+	$CABAL_DEV install || exit 1
+}
diff --git a/scripts/dist b/scripts/dist
new file mode 100644
--- /dev/null
+++ b/scripts/dist
@@ -0,0 +1,42 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core.cabal; please run this script as"
+	echo -n " ./scripts/dist from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+require_anansi
+require_cabal_dev
+
+echo "Building dist for dbus-core_$VERSION using $CABAL_DEV"
+
+rm -rf hs dist
+$ANANSI --noline -o hs src/dbus-core.anansi || exit 1
+$CABAL_DEV configure || exit 1
+$CABAL_DEV build || exit 1
+$CABAL_DEV sdist || exit 1
+
+mv "dist/dbus-core-$VERSION.tar.gz" "./dbus-core_$VERSION.tar.gz"
+ln -f "./dbus-core_$VERSION.tar.gz" "./dbus-core-$VERSION.tar.gz"
+if [ -n "$XZ" ]; then
+	gzip -dfc "dbus-core_$VERSION.tar.gz" > "dbus-core_$VERSION.tar"
+	xz -f -C sha256 -9 "dbus-core_$VERSION.tar"
+fi
+
+if [ -n "$XELATEX" ]; then
+	make_pdf
+fi
+
+echo ""
+echo "============================================================"
+if [ -n "$XELATEX" ]; then
+	echo "  woven source        : dbus-core_$VERSION.pdf"
+fi
+echo "  source tarball (gz) : dbus-core_$VERSION.tar.gz"
+if [ -n "$XZ" ]; then
+	echo "  source archive (xz) : dbus-core_$VERSION.tar.xz"
+fi
+echo "============================================================"
diff --git a/scripts/haddock b/scripts/haddock
new file mode 100644
--- /dev/null
+++ b/scripts/haddock
@@ -0,0 +1,17 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core.cabal; please run this script as"
+	echo -n " ./scripts/haddock from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+require_anansi
+require_cabal_dev
+
+rm -rf hs dist
+$ANANSI --noline -o hs src/dbus-core.anansi || exit 1
+$CABAL_DEV configure || exit 1
+$CABAL_DEV haddock || exit 1
diff --git a/scripts/latex b/scripts/latex
new file mode 100644
--- /dev/null
+++ b/scripts/latex
@@ -0,0 +1,11 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core.cabal; please run this script as"
+	echo -n " ./scripts/latex from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+make_pdf
diff --git a/scripts/run-benchmarks b/scripts/run-benchmarks
new file mode 100644
--- /dev/null
+++ b/scripts/run-benchmarks
@@ -0,0 +1,23 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core.cabal; please run this script as"
+	echo -n " ./scripts/run-benchmarks from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+require_anansi
+require_cabal_dev
+
+rm -rf hs dist
+$ANANSI -o hs src/dbus-core.anansi || exit 1
+$CABAL_DEV install || exit 1
+
+pushd benchmarks
+rm -rf dist
+$CABAL_DEV -s ../cabal-dev install || exit 1
+popd
+
+cabal-dev/bin/dbus-core_benchmarks $@
diff --git a/scripts/run-coverage b/scripts/run-coverage
new file mode 100644
--- /dev/null
+++ b/scripts/run-coverage
@@ -0,0 +1,26 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core .cabal; please run this script as"
+	echo -n " ./scripts/run-coverage from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+require_anansi
+require_cabal_dev
+
+rm -rf hs dist
+$ANANSI --noline -o hs src/dbus-core.anansi || exit 1
+
+pushd tests
+rm -rf dist
+$CABAL_DEV -s ../cabal-dev install --flags="coverage" || exit 1
+popd
+
+rm dbus-core_tests.tix
+cabal-dev/bin/dbus-core_tests
+
+hpc markup --srcdir=hs --srcdir=tests/ dbus-core_tests.tix --destdir=hpc-markup --exclude=Main
+hpc report --srcdir=hs --srcdir=tests/ dbus-core_tests.tix --exclude=Main
diff --git a/scripts/run-tests b/scripts/run-tests
new file mode 100644
--- /dev/null
+++ b/scripts/run-tests
@@ -0,0 +1,23 @@
+#!/bin/bash
+if [ ! -f 'dbus-core.cabal' ]; then
+	echo -n "Can't find dbus-core .cabal; please run this script as"
+	echo -n " ./scripts/run-tests from within the dbus-core source"
+	echo " directory"
+	exit 1
+fi
+
+. scripts/common.bash
+
+require_anansi
+require_cabal_dev
+
+rm -rf hs dist
+$ANANSI -o hs src/dbus-core.anansi || exit 1
+cabal-dev install || exit 1
+
+pushd tests
+rm -rf dist
+$CABAL_DEV -s ../cabal-dev install || exit 1
+popd
+
+cabal-dev/bin/dbus-core_tests
diff --git a/src/addresses.anansi b/src/addresses.anansi
deleted file mode 100644
--- a/src/addresses.anansi
+++ /dev/null
@@ -1,207 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{Addresses}
-
-:f DBus/Address.hs
-|copyright|
-|text extensions|
-module DBus.Address
-	( Address
-	, addressMethod
-	, addressParameters
-	, mkAddresses
-	, strAddress
-	) where
-|text imports|
-
-import Data.Char (ord, chr)
-import qualified Data.Map as M
-import Text.Printf (printf)
-import qualified Text.ParserCombinators.Parsec as P
-import Text.ParserCombinators.Parsec ((<|>))
-import DBus.Util (hexToInt, eitherToMaybe, void)
-:
-
-\subsection{Address syntax}
-
-A bus address is in the format {\tt $method$:$key$=$value$,$key$=$value$...}
-where the method may be empty and parameters are optional. An address's
-parameter list, if present, may end with a comma. Addresses in environment
-variables are separated by semicolons, and the full address list may end
-in a semicolon. Multiple parameters may have the same key; in this case,
-only the first parameter for each key will be stored.
-
-The bytes allowed in each component of the address are given by the following
-chart, where each character is understood to be its ASCII value:
-
-\begin{table}[h]
-\begin{center}
-\begin{tabular}{ll}
-\toprule
-Component   & Allowed Characters \\
-\midrule
-Method      & Any except {\tt `;'} and {\tt `:'} \\
-Param key   & Any except {\tt `;'}, {\tt `,'}, and {\tt `='} \\
-Param value & {\tt `0'} to {\tt `9'} \\
-            & {\tt `a'} to {\tt `z'} \\
-            & {\tt `A'} to {\tt `Z'} \\
-            & Any of: {\tt - \textunderscore{} / \textbackslash{} * . \%} \\
-\bottomrule
-\end{tabular}
-\end{center}
-\end{table}
-
-In parameter values, any byte may be encoded by prepending the \% character
-to its value in hexadecimal. \% is not allowed to appear unless it is
-followed by two hexadecimal digits. Every other allowed byte is termed
-an ``optionally encoded'' byte, and may appear unescaped in parameter
-values.
-
-:f DBus/Address.hs
-optionallyEncoded :: [Char]
-optionallyEncoded = ['0'..'9'] ++ ['a'..'z'] ++ ['A'..'Z'] ++ "-_/\\*."
-:
-
-The address simply stores its method and parameter map, with a custom
-{\tt Show} instance to provide easier debugging.
-
-:f DBus/Address.hs
-data Address = Address
-	{ addressMethod     :: Text
-	, addressParameters :: M.Map Text Text
-	} deriving (Eq)
-
-instance Show Address where
-	showsPrec d x = showParen (d> 10) $
-		showString "Address " . shows (strAddress x)
-:
-
-Parsing is straightforward; the input string is divided into addresses by
-semicolons, then further by colons and commas. Parsing will fail if any
-of the addresses in the input failed to parse.
-
-:f DBus/Address.hs
-mkAddresses :: Text -> Maybe [Address]
-mkAddresses s = eitherToMaybe . P.parse parser "" . TL.unpack $ s where
-	address = do
-		method <- P.many (P.noneOf ":;")
-		void (P.char ':')
-		params <- P.sepEndBy param (P.char ',')
-		return $ Address (TL.pack method) (M.fromList params)
-	
-	param = do
-		key <- P.many1 (P.noneOf "=;,")
-		void (P.char '=')
-		value <- P.many1 (encodedValue <|> unencodedValue)
-		return (TL.pack key, TL.pack value)
-	
-	parser = do
-		as <- P.sepEndBy1 address (P.char ';')
-		P.eof
-		return as
-	
-	unencodedValue = P.oneOf optionallyEncoded
-	encodedValue = do
-		void (P.char '%')
-		hex <- P.count 2 P.hexDigit
-		return . chr . hexToInt $ hex
-:
-
-Converting an {\tt Address} back to a {\tt String} is just the reverse
-operation. Note that because the original parameter order is not preserved,
-the string produced might differ from the original input.
-
-:f DBus/Address.hs
-strAddress :: Address -> Text
-strAddress (Address t ps) = TL.concat [t, ":", ps'] where
-	ps' = TL.intercalate "," $ do
-		(k, v) <- M.toList ps
-		return $ TL.concat [k, "=", TL.concatMap encode v]
-	encode c | elem c optionallyEncoded = TL.singleton c
-	         | otherwise       = TL.pack $ printf "%%%02X" (ord c)
-:
-
-:f Tests.hs
-instance Arbitrary Address where
-	arbitrary = genAddress where
-		optional = ['0'..'9'] ++ ['a'..'z'] ++ ['A'..'Z'] ++ "-_/\\*."
-		methodChars = filter (flip notElem ":;") ['!'..'~']
-		keyChars = filter (flip notElem "=;,") ['!'..'~']
-		
-		genMethod = atLeast 0 $ elements methodChars
-		genParam = do
-			key <- genKey
-			value <- genValue
-			return . concat $ [key, "=", value]
-		
-		genKey = atLeast 1 $ elements keyChars
-		genValue = oneof [encodedValue, plainValue]
-		genHex = elements $ ['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F']
-		encodedValue = do
-			x1 <- genHex
-			x2 <- genHex
-			return ['%', x1, x2]
-		plainValue = atLeast 1 $ elements optional
-		
-		genParams = do
-			params <- atLeast 0 genParam
-			let params' = intercalate "," params
-			extraComma <- if null params
-				then return ""
-				else elements ["", ","]
-			return $ concat [params', extraComma]
-		
-		genAddress = do
-			m <- genMethod
-			params <- genParams
-			extraSemicolon <- elements ["", ";"]
-			let addrStr = concat [m, ":", params, extraSemicolon]
-			let Just [addr] = mkAddresses $ TL.pack addrStr
-			return addr
-:
-
-:d test cases
-, F.testGroup "Addresses"
-	[ testProperty "Address identity"
-		$ \x -> mkAddresses (strAddress x) == Just [x]
-	, testProperty "Multiple addresses"
-		$ \x y -> let
-		joined = TL.concat [strAddress x, ";", strAddress y]
-		in mkAddresses joined == Just [x, y]
-	, testProperty "Ignore trailing semicolon"
-		$ \x -> mkAddresses (TL.append (strAddress x) ";") == Just [x]
-	, testProperty "Ignore trailing comma"
-		$ \x -> let
-		hasParams = not . Map.null . addressParameters $ x
-		parsed = mkAddresses (TL.append (strAddress x) ",")
-		in hasParams ==> parsed == Just [x]
-	, F.testGroup "Valid addresses"
-		[ test "colon" $ isJust . mkAddresses $ ":"
-		, test "just scheme" $ isJust . mkAddresses $ "a:"
-		, test "param" $ isJust . mkAddresses $ "a:b=c"
-		, test "trailing semicolon" $ isJust . mkAddresses $ "a:;"
-		, test "two schemes" $ isJust . mkAddresses $ "a:;b:"
-		, test "trailing comma" $ isJust . mkAddresses $ "a:b=c,"
-		]
-	, F.testGroup "Invalid addresses"
-		[ test "empty" $ isNothing . mkAddresses $ ""
-		, test "no colon" $ isNothing . mkAddresses $ "a"
-		, test "no equals" $ isNothing . mkAddresses $ "a:b"
-		, test "no param" $ isNothing . mkAddresses $ "a:b="
-		, test "no param" $ isNothing . mkAddresses $ "a:,"
-		]
-	]
-:
diff --git a/src/api-docs.anansi b/src/api-docs.anansi
--- a/src/api-docs.anansi
+++ b/src/api-docs.anansi
@@ -23,70 +23,103 @@
 There's no real order to this section; it exists only because Haddock
 can't merge documentation from external files.
 
-:d apidoc isAtomicType
--- | \"Atomic\" types are any which can't contain any other types. Only
--- atomic types may be used as dictionary keys.
+:d apidoc DBus.Client.disconnect
+-- | Stop a 'Client'#8217;s callback thread and close its underlying socket.
 :
 
-:d apidoc typeCode
--- | Every type has an associated type code; a textual representation of
--- the type, useful for debugging.
+:d apidoc DBus.Client.throwError
+-- | Normally, any exceptions raised while executing a method will be
+-- given the generic @\"org.freedesktop.DBus.Error.Failed\"@ name.
+-- 'throwError' allows the programmer to specify an error name, and provide
+-- additional information to the remote application. You may use this instead
+-- of 'Control.Exception.throwIO' to abort a method call.
 :
 
-:d apidoc Variant
--- | 'Variant's may contain any other built-in D-Bus value. Besides
--- representing native @VARIANT@ values, they allow type-safe storage and
--- deconstruction of heterogeneous collections.
+:d apidoc DBus.Client.Simple.AutoSignature
+-- | Used to automatically generate method signatures for introspection
+-- documents. To support automatic signatures, a method#8217;s parameters and
+-- return value must all be instances of 'IsValue'.
+--
+-- This class maps Haskell idioms to D&#8208;Bus; it is therefore unable to
+-- generate some signatures. In particular, it does not support methods
+-- which accept/return a single structure, or single&#8208;element structures.
+-- It also cannot generate signatures for methods with parameters or return
+-- values which are only instances of 'IsVariant'. For these cases, please
+-- use 'DBus.Client.method'.
+--
+-- To match common Haskell use, if the return value is a tuple, it will be
+-- converted to a list of return values.
 :
 
-:d apidoc variantType
--- | Every variant is strongly-typed; that is, the type of its contained
--- value is known at all times. This function retrieves that type, so that
--- the correct cast can be used to retrieve the value.
+:d apidoc DBus.Client.Simple.AutoReply
+-- | Used to automatically generate a 'Reply' from a return value. See
+-- 'AutoSignature' for some caveats about supported signatures.
+--
+-- To match common Haskell use, if the return value is a tuple, it will be
+-- converted to a list of return values.
 :
 
-:d apidoc arrayType
--- | This is the type contained within the array, not the type of the array
--- itself.
+:d apidoc DBus.Client.Simple.connectSession
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_SESSION_BUS_ADDRESS@, which must be set.
 :
 
-:d apidoc Connection
--- | A 'Connection' is an opaque handle to an open D-Bus channel, with an
--- internal state for maintaining the current message serial.
+:d apidoc DBus.Client.Simple.connectStarter
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_STARTER_ADDRESS@, which must be set.
 :
 
-:d apidoc Transport
+:d apidoc DBus.Client.Simple.connectSystem
+-- | Connect to the bus specified in the environment variable
+-- @DBUS_SYSTEM_BUS_ADDRESS@, or to
+-- @unix:path=\/var\/run\/dbus\/system_bus_socket@ if @DBUS_SYSTEM_BUS_ADDRESS@
+-- is not set.
+:
+
+:d apidoc DBus.Client.Simple.export
+-- | Export the given functions under the given 'ObjectPath' and
+-- 'InterfaceName'. The functions may accept/return any types that are
+-- instances of 'IsValue'; see 'AutoSignature'.
+--
+-- @
+--sayHello :: Text -> IO Text
+--sayHello name = return ('Data.Text.concat' [\"Hello \", name, \"!\"])
+--
+--export client \"/hello_world\"
+--    [ 'method' \"com.example.HelloWorld\" \"Hello\" sayHello
+--    ]
+-- @
+:
+
+:d apidoc DBus.Client.Simple.method
+-- | Prepare a Haskell function for export. This automatically detects the
+-- function#8217;s type signature; see 'AutoSignature' and 'AutoReply'.
+--
+-- To manage the type signature and marshaling yourself, use
+-- 'DBus.Client.method' instead.
+:
+
+:d apidoc DBus.Connection.Connection
+-- | A 'Connection' is an opaque handle to an open D&#8208;Bus channel, with
+-- an internal state for maintaining the current message serial.
+:
+
+:d apidoc DBus.Connection.Transport
 -- | A 'Transport' is anything which can send and receive bytestrings,
 -- typically via a socket.
 :
 
-:d apidoc connect
+:d apidoc DBus.Connection.connect
 -- | Open a connection to some address, using a given authentication
 -- mechanism. If the connection fails, a 'ConnectionError' will be thrown.
 :
 
-:d apidoc connectFirst
--- | Try to open a connection to various addresses, returning the first
--- connection which could be successfully opened.
-:
-
-:d apidoc connectionClose
+:d apidoc DBus.Connection.disconnect
 -- | Close an open connection. Once closed, the 'Connection' is no longer
 -- valid and must not be used.
 :
 
-:d apidoc send
--- | Send a single message, with a generated 'M.Serial'. The second parameter
--- exists to prevent race conditions when registering a reply handler; it
--- receives the serial the message /will/ be sent with, before it's actually
--- sent.
---
--- Only one message may be sent at a time; if multiple threads attempt to
--- send messages in parallel, one will block until after the other has
--- finished.
-:
-
-:d apidoc receive
+:d apidoc DBus.Connection.receive
 -- | Receive the next message from the connection, blocking until one is
 -- available.
 --
@@ -95,76 +128,49 @@
 -- finished.
 :
 
-:d apidoc getBus
--- | Similar to 'C.connect', but additionally sends @Hello@ messages to the
--- central bus.
-:
-
-:d apidoc getFirstBus
--- | Similar to 'C.connectFirst', but additionally sends @Hello@ messages to
--- the central bus.
-:
-
-:d apidoc getSystemBus
--- | Connect to the bus specified in the environment variable
--- @DBUS_SYSTEM_BUS_ADDRESS@, or to
--- @unix:path=\/var\/run\/dbus\/system_bus_socket@ if @DBUS_SYSTEM_BUS_ADDRESS@
--- is not set.
-:
-
-:d apidoc getSessionBus
--- | Connect to the bus specified in the environment variable
--- @DBUS_SESSION_BUS_ADDRESS@, which must be set.
-:
-
-:d apidoc getStarterBus
--- | Connect to the bus specified in the environment variable
--- @DBUS_STARTER_ADDRESS@, which must be set.
-:
-
-:d apidoc formatRule
--- | Format a 'MatchRule' as the bus expects to receive in a call to
--- @AddMatch@.
-:
-
-:d apidoc addMatch
--- | Build a 'M.MethodCall' for adding a match rule to the bus.
-:
-
-:d apidoc matchAll
--- | An empty match rule, which matches everything.
-:
-
-:d apidoc matches
--- | Whether a 'M.ReceivedMessage' matches a given rule. This is useful
--- for implementing signal handlers.
+:d apidoc DBus.Connection.send
+-- | Send a single message, with a generated 'Serial'. The second parameter
+-- exists to prevent race conditions when registering a reply handler; it
+-- receives the serial the message /will/ be sent with, before it&#8217;s
+-- actually sent.
+--
+-- Only one message may be sent at a time; if multiple threads attempt to
+-- send messages in parallel, one will block until after the other has
+-- finished.
 :
 
-:d apidoc requestName
--- | Build a 'M.MethodCall' for requesting a registered bus name.
+:d apidoc DBus.Message.ReceivedMessage
+-- | Not an actual message type, but a wrapper around messages received from
+-- the bus. Each value contains the message&#8217;s 'Serial' and possibly the
+-- origin&#8217;s 'BusName'
 :
 
-:d apidoc releaseName
--- | Build a 'M.MethodCall' for releasing a registered bus name.
+:d apidoc DBus.Message.Serial
+-- | A value used to uniquely identify a particular message within a session.
+-- 'Serial's are 32&#8208;bit unsigned integers, and eventually wrap.
 :
 
-:d apidoc Serial
--- | A value used to uniquely identify a particular message within a session.
--- 'Serial's are 32-bit unsigned integers, and eventually wrap.
+:d apidoc DBus.Types.Variant
+-- | 'Variant's may contain any other built&#8208;in D&#8208;Bus value. Besides
+-- representing native @VARIANT@ values, they allow type&#8208;safe storage and
+-- deconstruction of heterogeneous collections.
 :
 
-:d apidoc ReceivedMessage
--- | Not an actual message type, but a wrapper around messages received from
--- the bus. Each value contains the message's 'Serial' and possibly the
--- origin's 'T.BusName'
+:d apidoc DBus.Types.variantType
+-- | Every variant is strongly&#8208;typed; that is, the type of its contained
+-- value is known at all times. This function retrieves that type, so that
+-- the correct cast can be used to retrieve the value.
 :
 
-:d apidoc marshalMessage
--- | Convert a 'M.Message' into a 'L.ByteString'. Although unusual, it is
--- possible for marshaling to fail -- if this occurs, an appropriate error
--- will be returned instead.
+:d apidoc DBus.Wire.marshalMessage
+-- | Convert a 'Message' into a 'ByteString'. Although unusual, it is
+-- possible for marshaling to fail; if this occurs, an error will be
+-- returned instead.
 :
 
-:d apidoc unmarshalMessage
--- | Read bytes from a monad until a complete message has been received.
+:d apidoc DBus.Wire.unmarshalMessage
+-- | Parse a 'ByteString' into a 'ReceivedMessage'. The result can be
+-- inspected to see what type of message was parsed. Unknown message types
+-- can still be parsed successfully, as long as they otherwise conform to
+-- the D&#8208;Bus standard.
 :
diff --git a/src/authentication.anansi b/src/authentication.anansi
deleted file mode 100644
--- a/src/authentication.anansi
+++ /dev/null
@@ -1,148 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\subsection{Authentication}
-
-Authentication is a bit iffy; currently, there's a one specified
-authentication mechanism ({\tt DBUS\_COOKIE\_SHA1}), which I've never seen
-in the wild. Everybody seems to use {\tt EXTERNAL}, described below.
-
-To support multiple modes more easily in the future, and for user-defined
-authentication handling (eg, in proxy servers), authentication is handled by
-a separate module.
-
-:f DBus/Authentication.hs
-|copyright|
-|text extensions|
-{-# LANGUAGE DeriveDataTypeable #-}
-module DBus.Authentication
-	( Command
-	, Mechanism (..)
-	, AuthenticationError (..)
-	, authenticate
-	, realUserID
-	) where
-|text imports|
-|authentication imports|
-:
-
-The authentication protocol is based on {\sc ascii} text, initiated by the
-client. Commands and mechanisms are represented by a couple data types:
-
-:d authentication imports
-import Data.ByteString.Lazy (ByteString)
-import qualified Data.ByteString.Lazy as ByteString
-import Data.ByteString.Lazy.Char8 ()
-import qualified DBus.UUID as UUID
-:
-
-:f DBus/Authentication.hs
-type Command = Text
-newtype Mechanism = Mechanism
-	{ mechanismRun :: (Command -> IO Command) -> IO UUID.UUID
-	}
-:
-
-If authentication fails, an exception will be raised.
-
-:d authentication imports
-import Data.Typeable (Typeable)
-import qualified Control.Exception as E
-:
-
-:f DBus/Authentication.hs
-data AuthenticationError
-	= AuthenticationError Text
-	deriving (Show, Typeable)
-
-instance E.Exception AuthenticationError
-:
-
-The process begins by the client sending a single {\sc nul} byte, followed
-by exchanges of {\sc ascii} commands until authentication is complete. Which
-commands are sent depends on the selected mechanism.
-
-:d authentication imports
-import Data.Word (Word8)
-:
-
-:f DBus/Authentication.hs
-authenticate :: Mechanism -> (ByteString -> IO ()) -> IO Word8
-             -> IO UUID.UUID
-authenticate mech put getByte = do
-	put $ ByteString.singleton 0
-	uuid <- mechanismRun mech (putCommand put getByte)
-	put "BEGIN\r\n"
-	return uuid
-:
-
-TODO: describe {\tt putCommand} here
-
-:d authentication imports
-import Control.Monad (liftM)
-import Data.Char (chr)
-import Data.Text.Lazy.Encoding (encodeUtf8)
-import DBus.Util (readUntil, dropEnd)
-:
-
-:f DBus/Authentication.hs
-putCommand :: Monad m => (ByteString -> m ()) -> m Word8 -> Command -> m Command
-putCommand put get cmd = do
-	let getC = liftM (chr . fromIntegral) get
-	put $ encodeUtf8 cmd
-	put "\r\n"
-	liftM (TL.pack . dropEnd 2) $ readUntil "\r\n" getC
-:
-
-\subsubsection{Support authentication mechanisms}
-
-Currently, the only supported authentication mechanism is sending the local
-user's ``real user ID''.
-
-:d authentication imports
-import System.Posix.User (getRealUserID)
-import Data.Char (ord)
-import Text.Printf (printf)
-:
-
-:f DBus/Authentication.hs
-realUserID :: Mechanism
-realUserID = Mechanism $ \sendCmd -> do
-	uid <- getRealUserID
-	let token = concatMap (printf "%02X" . ord) (show uid)
-	let cmd = "AUTH EXTERNAL " ++ token
-	eitherUUID <- checkOK `fmap` sendCmd (TL.pack cmd)
-	case eitherUUID of
-		Right uuid -> return uuid
-		Left err -> E.throwIO $ AuthenticationError err
-:
-
-If authentication was successful, the server responds with {\tt OK
-<server GUID>}.
-
-:d authentication imports
-import Data.Maybe (isJust)
-:
-
-:f DBus/Authentication.hs
-checkOK :: Command -> Either Text UUID.UUID
-checkOK cmd = if validUUID then Right uuid else Left errorMsg where
-	validUUID = TL.isPrefixOf "OK " cmd && isJust maybeUUID
-	maybeUUID = UUID.fromHex $ TL.drop 3 cmd
-	Just uuid = maybeUUID
-	errorMsg = if TL.isPrefixOf "ERROR " cmd
-		then TL.drop 6 cmd
-		else TL.pack $ "Unexpected response: " ++ show cmd
-:
diff --git a/src/bus.anansi b/src/bus.anansi
deleted file mode 100644
--- a/src/bus.anansi
+++ /dev/null
@@ -1,140 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{The central bus}
-
-:f DBus/Bus.hs
-|copyright|
-|text extensions|
-module DBus.Bus
-	( getBus
-	, getFirstBus
-	, getSystemBus
-	, getSessionBus
-	, getStarterBus
-	) where
-|text imports|
-
-import qualified Control.Exception as E
-import Control.Monad (when)
-import Data.Maybe (fromJust, isNothing)
-import qualified Data.Set as Set
-import System.Environment (getEnv)
-
-import qualified DBus.Address as A
-import qualified DBus.Authentication as Auth
-import qualified DBus.Connection as C
-import DBus.Constants (dbusName, dbusPath, dbusInterface)
-import qualified DBus.Message as M
-import qualified DBus.Types as T
-import DBus.Util (fromRight)
-:
-
-Connecting to a message bus is a bit more involved than just connecting
-over an app-to-app connection: the bus must be notified of the new client,
-using a "hello message", before it will begin forwarding messages.
-
-:f DBus/Bus.hs
-busForConnection :: C.Connection -> IO (C.Connection, T.BusName)
-busForConnection c = fmap ((,) c) $ sendHello c
-
-|apidoc getBus|
-getBus :: Auth.Mechanism -> A.Address -> IO (C.Connection, T.BusName)
-getBus = ((busForConnection =<<) .) . C.connect
-:
-
-Optionally, multiple addresses may be provided. The first successful
-connection will be used.
-
-:f DBus/Bus.hs
-|apidoc getFirstBus|
-getFirstBus :: [(Auth.Mechanism, A.Address)] -> IO (C.Connection, T.BusName)
-getFirstBus = (busForConnection =<<) . C.connectFirst
-:
-
-\subsection{Default connections}
-
-Two default buses are defined, the ``system'' and ``session'' buses. The system
-bus is global for the OS, while the session bus runs only for the duration
-of the user's session.
-
-:f DBus/Bus.hs
-|apidoc getSystemBus|
-getSystemBus :: IO (C.Connection, T.BusName)
-getSystemBus = getBus' $ fromEnv `E.catch` noEnv where
-	defaultAddr = "unix:path=/var/run/dbus/system_bus_socket"
-	fromEnv = getEnv "DBUS_SYSTEM_BUS_ADDRESS"
-	noEnv (E.SomeException _) = return defaultAddr
-
-|apidoc getSessionBus|
-getSessionBus :: IO (C.Connection, T.BusName)
-getSessionBus = getBus' $ getEnv "DBUS_SESSION_BUS_ADDRESS"
-
-|apidoc getStarterBus|
-getStarterBus :: IO (C.Connection, T.BusName)
-getStarterBus = getBus' $ getEnv "DBUS_STARTER_ADDRESS"
-:
-
-:f DBus/Bus.hs
-getBus' :: IO String -> IO (C.Connection, T.BusName)
-getBus' io = do
-	addr <- fmap TL.pack io
-	case A.mkAddresses addr of
-		Just [x] -> getBus Auth.realUserID x
-		Just  xs -> getFirstBus [(Auth.realUserID,x) | x <- xs]
-		_        -> E.throwIO $ C.InvalidAddress addr
-:
-
-\subsection{Sending the ``hello'' message}
-
-:f DBus/Bus.hs
-hello :: M.MethodCall
-hello = M.MethodCall dbusPath
-	"Hello"
-	(Just dbusInterface)
-	(Just dbusName)
-	Set.empty
-	[]
-:
-
-:f DBus/Bus.hs
-sendHello :: C.Connection -> IO T.BusName
-sendHello c = do
-	serial <- fromRight `fmap` C.send c return hello
-	reply <- waitForReply c serial
-	let name = case M.methodReturnBody reply of
-		(x:_) -> T.fromVariant x
-		_     -> Nothing
-	
-	when (isNothing name) $
-		E.throwIO $ E.AssertionFailed "Invalid response to Hello()"
-	
-	return . fromJust $ name
-:
-
-:f DBus/Bus.hs
-waitForReply :: C.Connection -> M.Serial -> IO M.MethodReturn
-waitForReply c serial = do
-	received <- C.receive c
-	msg <- case received of
-		Right x -> return x
-		Left _  -> E.throwIO $ E.AssertionFailed "Invalid response to Hello()"
-	case msg of
-		(M.ReceivedMethodReturn _ _ reply) ->
-			if M.methodReturnSerial reply == serial
-				then return reply
-				else waitForReply c serial
-		_ -> waitForReply c serial
-:
diff --git a/src/client.anansi b/src/client.anansi
new file mode 100644
--- /dev/null
+++ b/src/client.anansi
@@ -0,0 +1,580 @@
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\clearpage
+\section{D-Bus clients}
+
+\subsection{Client types}
+
+:d DBus.Client
+data Client = Client
+	{ clientConnection :: Connection
+	, clientCallbacks :: MVar (Map Serial Callback)
+	, clientSignalHandlers :: MVar [Callback]
+	, clientObjects :: MVar (Map ObjectPath ObjectInfo)
+	, clientThreadID :: ThreadId
+	, clientMessageProcessor :: IORef (ReceivedMessage -> IO Bool)
+	}
+
+type Callback = (ReceivedMessage -> IO ())
+
+data Reply
+	= ReplyReturn [Variant]
+	| ReplyError ErrorName [Variant]
+
+data Method = Method InterfaceName MemberName Signature Signature ([Variant] -> IO Reply)
+
+type ObjectInfo = Map InterfaceName InterfaceInfo
+type InterfaceInfo = Map MemberName MemberInfo
+data MemberInfo
+	= MemberMethod Signature Signature Callback
+	| MemberSignal Signature
+:
+
+\clearpage
+\subsection{Connecting and disconnecting clients}
+
+:d DBus.Client
+attach :: Connection -> IO Client
+attach connection = do
+	callbacks <- newMVar Data.Map.empty
+	signalHandlers <- newMVar []
+	objects <- newMVar Data.Map.empty
+	processor <- newIORef (\_ -> return False)
+	
+	client <- mfix $ \client -> do
+		threadID <- forkIO (mainLoop client)
+		return (Client
+			{ clientConnection = connection
+			, clientCallbacks = callbacks
+			, clientSignalHandlers = signalHandlers
+			, clientObjects = objects
+			, clientThreadID = threadID
+			, clientMessageProcessor = processor
+			})
+	
+	export client "/" [introspectRoot client]
+	
+	void (call_ client (MethodCall
+		{ methodCallDestination = Just "org.freedesktop.DBus"
+		, methodCallMember = "Hello"
+		, methodCallInterface = Just "org.freedesktop.DBus"
+		, methodCallPath = "/org/freedesktop/DBus"
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = []
+		}))
+	
+	return client
+:
+
+:d DBus.Client
+connect :: Address -> IO Client
+connect addr = do
+	connection <- DBus.Connection.connect [unix, tcp] [external] addr
+	attach connection
+
+|apidoc DBus.Client.disconnect|
+disconnect :: Client -> IO ()
+disconnect client = do
+	let connection = clientConnection client
+	killThread (clientThreadID client)
+	modifyMVar_ (clientCallbacks client) (\_ -> return Data.Map.empty)
+	modifyMVar_ (clientSignalHandlers client) (\_ -> return [])
+	modifyMVar_ (clientObjects client) (\_ -> return Data.Map.empty)
+	DBus.Connection.disconnect connection
+:
+
+\clearpage
+\subsection{Main message dispatch loop}
+
+:d DBus.Client
+setMessageProcessor :: Client -> (ReceivedMessage -> IO Bool) -> IO ()
+setMessageProcessor client io = atomicModifyIORef
+	(clientMessageProcessor client)
+	(\_ -> (io, ()))
+:
+
+:d DBus.Client
+mainLoop :: Client -> IO ()
+mainLoop client = forever $ do
+	let connection = clientConnection client
+	
+	received <- DBus.Connection.receive connection
+	msg <- case received of
+		Left err -> do
+			disconnect client
+			connectionError ("Received invalid message: " ++ show err)
+		Right msg -> return msg
+	
+	dispatch client msg
+
+dispatch :: Client -> ReceivedMessage -> IO ()
+dispatch client received = void . forkIO $ do
+	process <- readIORef (clientMessageProcessor client)
+	handled <- process received
+	
+	let onReply serial = do
+		let mvar = clientCallbacks client
+		maybeCB <- modifyMVar mvar $ \callbacks -> let
+			x = Data.Map.lookup serial callbacks
+			callbacks' = if isJust x
+				then Data.Map.delete serial callbacks
+				else callbacks
+			in return (callbacks', x)
+		case maybeCB of
+			Just cb -> void (cb received)
+			Nothing -> return ()
+	
+	unless handled $ case received of
+		(ReceivedMethodReturn _ _ msg) -> onReply (methodReturnSerial msg)
+		(ReceivedError _ _ msg) -> onReply (errorSerial msg)
+		(ReceivedSignal _ _ _) -> do
+			handlers <- readMVar (clientSignalHandlers client)
+			mapM_ ($ received) handlers
+		(ReceivedMethodCall serial sender msg) -> do
+			objects <- readMVar (clientObjects client)
+			case findMethod objects msg of
+				Just io -> io received
+				Nothing -> send_ client
+					(Error errorUnknownMethod serial sender [])
+					(\_ -> return ())
+		_ -> return ()
+:
+
+\clearpage
+\subsection{Making method calls}
+
+:d DBus.Client
+send_ :: Message msg => Client -> msg -> (Serial -> IO a) -> IO a
+send_ client msg io = do
+	result <- DBus.Connection.send (clientConnection client) msg io
+	case result of
+		Right serial -> return serial
+		Left err -> connectionError ("Error sending message: " ++ show err)
+
+call :: Client -> MethodCall -> IO (Either Error MethodReturn)
+call client msg = do
+	mvar <- newEmptyMVar
+	
+	let callback (ReceivedError _ _ err) = putMVar mvar (Left err)
+	    callback (ReceivedMethodReturn _ _ reply) = putMVar mvar (Right reply)
+	    callback _ = return ()
+	
+	send_ client msg (\serial ->
+		modifyMVar_ (clientCallbacks client) (\callbacks ->
+			return (Data.Map.insert serial callback callbacks)))
+	
+	takeMVar mvar
+
+call_ :: Client -> MethodCall -> IO MethodReturn
+call_ client msg = do
+	result <- call client msg
+	case result of
+		Left err -> connectionError ("Call failed: " ++ Data.Text.unpack (errorMessage err))
+		Right ret -> return ret
+:
+
+\clearpage
+\subsection{Receiving signals}
+
+:d DBus.Client
+data MatchRule = MatchRule
+	{ matchSender      :: Maybe BusName
+	, matchDestination :: Maybe BusName
+	, matchPath        :: Maybe ObjectPath
+	, matchInterface   :: Maybe InterfaceName
+	, matchMember      :: Maybe MemberName
+	}
+	deriving (Show)
+
+listen :: Client -> MatchRule -> (BusName -> Signal -> IO ()) -> IO ()
+listen client rule io = do
+	let handler (ReceivedSignal _ (Just sender) msg)
+	    	| checkMatchRule rule sender msg = io sender msg
+	    handler _ = return ()
+	
+	modifyMVar_ (clientSignalHandlers client) (\hs -> return (handler : hs))
+	void (call_ client (MethodCall
+		{ methodCallPath = DBus.Constants.dbusPath
+		, methodCallMember = "AddMatch"
+		, methodCallInterface = Just DBus.Constants.dbusInterface
+		, methodCallDestination = Just DBus.Constants.dbusName
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = [toVariant (formatMatchRule rule)]
+		}))
+
+formatMatchRule :: MatchRule -> Text
+formatMatchRule rule = Data.Text.intercalate "," predicates where
+	predicates = catMaybes
+		[ f "sender" matchSender busNameText
+		, f "destination" matchDestination busNameText
+		, f "path" matchPath objectPathText
+		, f "interface" matchInterface interfaceNameText
+		, f "member" matchMember memberNameText
+		]
+	
+	f :: Text -> (MatchRule -> Maybe a) -> (a -> Text) -> Maybe Text
+	f key get text = do
+		val <- fmap text (get rule)
+		return (Data.Text.concat [key, "='", val, "'"])
+
+checkMatchRule :: MatchRule -> BusName -> Signal -> Bool
+checkMatchRule rule sender msg = and
+	[ maybe True (== sender) (matchSender rule)
+	, maybe True (\x -> signalDestination msg == Just x) (matchDestination rule)
+	, maybe True (== signalPath msg) (matchPath rule)
+	, maybe True (== signalInterface msg) (matchInterface rule)
+	, maybe True (== signalMember msg) (matchMember rule)
+	]
+:
+
+\clearpage
+\subsection{Exporting objects and methods}
+
+:d DBus.Client
+data MethodError = MethodError ErrorName [Variant]
+	deriving (Show, Eq, Typeable)
+
+instance Control.Exception.Exception MethodError
+
+|apidoc DBus.Client.throwError|
+throwError :: ErrorName -> Text -> [Variant] -> IO a
+throwError name message extra = Control.Exception.throwIO (MethodError name (toVariant message : extra))
+:
+
+:d DBus.Client
+method :: InterfaceName -> MemberName -> Signature -> Signature -> ([Variant] -> IO Reply) -> Method
+method iface name inSig outSig io = Method iface name inSig outSig
+	(\vs -> Control.Exception.catch
+		(Control.Exception.catch
+			(io vs)
+			(\(MethodError name' vs') -> return (ReplyError name' vs')))
+		(\exc -> return (ReplyError errorFailed
+			[toVariant (Data.Text.pack (show (exc :: SomeException)))])))
+
+export :: Client -> ObjectPath -> [Method] -> IO ()
+export client path methods = modifyMVar_ (clientObjects client) addObject where
+	addObject objs = return (Data.Map.insert path info objs)
+	
+	info = foldl' addMethod Data.Map.empty (defaultIntrospect : methods)
+	addMethod m (Method iface name inSig outSig cb) = Data.Map.insertWith'
+		Data.Map.union iface
+		(Data.Map.fromList [(name, MemberMethod inSig outSig (wrapCB cb))]) m
+	
+	wrapCB cb (ReceivedMethodCall serial sender msg) = do
+		reply <- cb (methodCallBody msg)
+		case reply of
+			ReplyReturn vs -> send_ client (MethodReturn serial sender vs) (\_ -> return ())
+			ReplyError name vs -> send_ client (Error name serial sender vs) (\_ -> return ())
+	wrapCB _ _ = return ()
+	
+	defaultIntrospect = methodIntrospect $ do
+		objects <- readMVar (clientObjects client)
+		let Just obj = Data.Map.lookup path objects
+		return (introspect path obj)
+:
+
+:d DBus.Client
+findMethod :: Map ObjectPath ObjectInfo -> MethodCall -> Maybe Callback
+findMethod objects msg = do
+	ifaceName <- methodCallInterface msg
+	obj <- Data.Map.lookup (methodCallPath msg) objects
+	iface <- Data.Map.lookup ifaceName obj
+	member <- Data.Map.lookup (methodCallMember msg) iface
+	case member of
+		MemberMethod _ _ io -> return io
+		_ -> Nothing
+:
+
+\clearpage
+\subsubsection{Automatic introspection}
+
+:d DBus.Client
+introspectRoot :: Client -> Method
+introspectRoot client = methodIntrospect $ do
+	objects <- readMVar (clientObjects client)
+	let paths = filter (/= "/") (Data.Map.keys objects)
+	let iface = "org.freedesktop.DBus.Introspectable"
+	let name = "Introspect"
+	return (DBus.Introspection.Object "/"
+		[DBus.Introspection.Interface iface
+			[DBus.Introspection.Method name
+				[]
+				[DBus.Introspection.Parameter "" "s"]]
+			[] []]
+		[DBus.Introspection.Object p [] [] | p <- paths])
+:
+
+:d DBus.Client
+methodIntrospect :: IO DBus.Introspection.Object -> Method
+methodIntrospect get = method iface name "" "s" impl where
+	iface = "org.freedesktop.DBus.Introspectable"
+	name = "Introspect"
+	impl [] = do
+		obj <- get
+		let Just xml = DBus.Introspection.toXML obj
+		return (ReplyReturn [toVariant xml])
+	impl _ = return (ReplyError errorInvalidParameters [])
+
+introspect :: ObjectPath -> ObjectInfo -> DBus.Introspection.Object
+introspect path obj = DBus.Introspection.Object path interfaces [] where
+	interfaces = map introspectIface (Data.Map.toList obj)
+	
+	introspectIface (name, iface) = let
+		members = Data.Map.toList iface
+		methods = concatMap introspectMethod members
+		signals = concatMap introspectSignal members
+		in DBus.Introspection.Interface name methods signals []
+	
+	introspectMethod (name, (MemberMethod inSig outSig _)) =
+		[DBus.Introspection.Method name
+			(map introspectParam (signatureTypes inSig))
+			(map introspectParam (signatureTypes outSig))]
+	introspectMethod _ = []
+	
+	introspectSignal (name, (MemberSignal sig)) =
+		[DBus.Introspection.Signal name
+			(map introspectParam (signatureTypes sig))]
+	introspectSignal _ = []
+	
+	introspectParam t = DBus.Introspection.Parameter "" (Signature [t])
+:
+
+\clearpage
+\subsection{Simple clients}
+
+:d DBus.Client.Simple
+connectFirst :: [Address] -> IO Client
+connectFirst addrs = loop addrs where
+	loop [] = connectionError (concat
+		[ "connectFirst: no usable"
+		, " addresses in "
+		, show addrs])
+	loop (a:as) = Control.Exception.catch
+		(DBus.Client.connect a)
+		(\(ConnectionError _) -> loop as)
+
+|apidoc DBus.Client.Simple.connectSession|
+connectSession :: IO Client
+connectSession = do
+	env <- DBus.Address.getSession
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_SESSION_BUS_ADDRESS is"
+			, " missing or invalid."
+			])
+		Just addrs -> connectFirst addrs
+
+|apidoc DBus.Client.Simple.connectSystem|
+connectSystem :: IO Client
+connectSystem = do
+	env <- DBus.Address.getSystem
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_SYSTEM_BUS_ADDRESS is"
+			, " invalid."
+			])
+		Just addrs -> connectFirst addrs
+
+|apidoc DBus.Client.Simple.connectStarter|
+connectStarter :: IO Client
+connectStarter = do
+	env <- DBus.Address.getStarter
+	case env of
+		Nothing -> connectionError (concat
+			[ "connectSession: DBUS_STARTER_BUS_ADDRESS is"
+			, " missing or invalid."
+			])
+		Just addrs -> connectFirst addrs
+:
+
+\clearpage
+\subsubsection{Remote object proxies}
+
+:d DBus.Client.Simple
+data Proxy = Proxy Client BusName ObjectPath
+:
+
+:d DBus.Client.Simple
+proxy :: Client -> BusName -> ObjectPath -> IO Proxy
+proxy client dest path = return (Proxy client dest path)
+:
+
+:d DBus.Client.Simple
+call :: Proxy -> InterfaceName -> MemberName -> [Variant] -> IO [Variant]
+call (Proxy client dest path) iface member body = do
+	reply <- DBus.Client.call_ client $ MethodCall
+		{ methodCallDestination = Just dest
+		, methodCallMember = member
+		, methodCallInterface = Just iface
+		, methodCallPath = path
+		, methodCallFlags = Data.Set.empty
+		, methodCallBody = body
+		}
+	return (methodReturnBody reply)
+:
+
+:d DBus.Client.Simple
+listen :: Proxy -> InterfaceName -> MemberName -> (BusName -> Signal -> IO ()) -> IO ()
+listen (Proxy client dest path) iface member = DBus.Client.listen client (MatchRule
+	{ matchSender = Just dest
+	, matchInterface = Just iface
+	, matchMember = Just member
+	, matchPath = Just path
+	, matchDestination = Nothing
+	})
+:
+
+\clearpage
+\subsubsection{Name reservation}
+
+:d DBus.Client.Simple
+data RequestNameFlag
+	= AllowReplacement
+	| ReplaceExisting
+	| DoNotQueue
+	deriving (Show)
+
+data RequestNameReply
+	= PrimaryOwner
+	| InQueue
+	| Exists
+	| AlreadyOwner
+	deriving (Show)
+
+data ReleaseNameReply
+	= Released
+	| NonExistent
+	| NotOwner
+	deriving (Show)
+:
+
+:d DBus.Client.Simple
+encodeFlags :: [RequestNameFlag] -> Word32
+encodeFlags = foldr (.|.) 0 . map flagValue where
+	flagValue AllowReplacement = 0x1
+	flagValue ReplaceExisting  = 0x2
+	flagValue DoNotQueue       = 0x4
+:
+
+:d DBus.Client.Simple
+requestName :: Client -> BusName -> [RequestNameFlag] -> IO RequestNameReply
+requestName client name flags = do
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	reply <- call bus "org.freedesktop.DBus" "RequestName"
+		[ toVariant name
+		, toVariant (encodeFlags flags)
+		]
+	case (maybeIndex reply 0 >>= fromVariant :: Maybe Word32) of
+		Just 1 -> return PrimaryOwner
+		Just 2 -> return InQueue
+		Just 3 -> return Exists
+		Just 4 -> return AlreadyOwner
+		_ -> connectionError "Call failed: received invalid reply"
+
+releaseName :: Client -> BusName -> IO ReleaseNameReply
+releaseName client name = do
+	bus <- proxy client "org.freedesktop.DBus" "/org/freedesktop/DBus"
+	reply <- call bus "org.freedesktop.DBus" "ReleaseName"
+		[ toVariant name
+		]
+	case (maybeIndex reply 0 >>= fromVariant :: Maybe Word32) of
+		Just 1 -> return Released
+		Just 2 -> return NonExistent
+		Just 3 -> return NotOwner
+		_ -> connectionError "Call failed: received invalid reply"
+:
+
+\clearpage
+\subsubsection{Simplified exports}
+
+:d DBus.Client.Simple
+|apidoc DBus.Client.Simple.AutoSignature|
+class AutoSignature a where
+	funTypes :: a -> ([Type], [Type])
+
+instance AutoSignature (IO ()) where
+	funTypes _ = ([], [])
+
+instance IsValue a => AutoSignature (IO a) where
+	funTypes io = ([], case ioT io undefined of
+		(_, t) -> case t of
+			TypeStructure ts -> ts
+			_ -> [t])
+
+ioT :: IsValue a => IO a -> a -> (a, Type)
+ioT _ a = (a, typeOf a)
+
+instance (IsValue a, AutoSignature fun) => AutoSignature (a -> fun) where
+	funTypes fn = case valueT undefined of
+		(a, t) -> case funTypes (fn a) of
+			(ts, ts') -> (t : ts, ts')
+
+valueT :: IsValue a => a -> (a, Type)
+valueT a = (a, typeOf a)
+:
+
+:d DBus.Client.Simple
+|apidoc DBus.Client.Simple.AutoReply|
+class AutoReply fun where
+	apply :: fun -> [Variant] -> Maybe (IO [Variant])
+
+instance AutoReply (IO ()) where
+	apply io [] = Just (io >> return [])
+	apply _ _ = Nothing
+
+instance IsVariant a => AutoReply (IO a) where
+	apply io [] = Just (do
+		var <- fmap toVariant io
+		case fromVariant var of
+			Just struct -> return (structureItems struct)
+			Nothing -> return [var])
+	apply _ _ = Nothing
+
+instance (IsVariant a, AutoReply fun) => AutoReply (a -> fun) where
+	apply _ [] = Nothing
+	apply fn (v:vs) = case fromVariant v of
+		Just v' -> apply (fn v') vs
+		Nothing -> Nothing
+:
+
+:d DBus.Client.Simple
+|apidoc DBus.Client.Simple.method|
+method :: (AutoSignature fun, AutoReply fun) => InterfaceName -> MemberName -> fun -> Method
+method iface name fun = DBus.Client.method iface name inSig outSig io where
+	(typesIn, typesOut) = funTypes fun
+	inSig = case checkSignature typesIn of
+		Just sig -> sig
+		Nothing -> invalid "input"
+	outSig = case checkSignature typesOut of
+		Just sig -> sig
+		Nothing -> invalid "output"
+	io vs = case apply fun vs of
+		Nothing -> return (ReplyError errorInvalidParameters [])
+		Just io' -> fmap ReplyReturn io'
+	
+	invalid label = error (concat
+		[ "Method "
+		, Data.Text.unpack (interfaceNameText iface)
+		, "."
+		, Data.Text.unpack (memberNameText name)
+		, " has an invalid "
+		, label
+		, " signature."])
+
+|apidoc DBus.Client.Simple.export|
+export :: Client -> ObjectPath -> [Method] -> IO ()
+export = DBus.Client.export
+:
diff --git a/src/connections.anansi b/src/connections.anansi
--- a/src/connections.anansi
+++ b/src/connections.anansi
@@ -1,4 +1,4 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 :# 
 :# This program is free software: you can redistribute it and/or modify
 :# it under the terms of the GNU General Public License as published by
@@ -15,119 +15,378 @@
 
 \section{Connections}
 
-:f DBus/Connection.hs
-|copyright|
-|text extensions|
-{-# LANGUAGE DeriveDataTypeable #-}
-module DBus.Connection (
-	|connection exports|
-	) where
-|text imports|
-|connection imports|
+\begin{multicols}{2}
+
+A {\tt Connection} is an opaque handle to an open \dbus{} socket, with
+an internal state for maintaining the current message serial and enforcing
+thread-safe access to the socket. Every connection has an \emph{address},
+which is where the remote server is listening, and a \emph{transport}, which
+manages actually sending bytes between the two applications.
+
+\vfill
+\columnbreak
+
+:d DBus.Connection
+|apidoc DBus.Connection.Connection|
+data Connection = Connection
+	{ connectionAddress :: Address
+	, connectionSocket :: Socket
+	, connectionSerial :: IORef Serial
+	, connectionReadLock :: MVar ()
+	, connectionWriteLock :: MVar ()
+	}
 :
 
-A {\tt Connection} is an opaque handle to an open D-Bus channel, with
-an internal state for maintaining the current message serial.
+\end{multicols}
 
-The second {\tt MVar} doesn't really store a value, it's just used to
-prevent two separate threads from reading from the transport at once.
+\begin{multicols}{2}
 
-:d connection imports
-import qualified Control.Concurrent as C
-import qualified DBus.Address as A
-import qualified DBus.Message as M
-import qualified DBus.UUID as UUID
+TODO
+
+\vfill
+\columnbreak
+
+:d DBus.Connection.Error
+newtype ConnectionError = ConnectionError String
+	deriving (Show, Eq, Typeable)
+
+instance Exception ConnectionError
+
+connectionError :: String -> IO a
+connectionError = throwIO . ConnectionError
 :
 
-:f DBus/Connection.hs
-data Connection = Connection
-	{ connectionAddress    :: A.Address
-	, connectionTransport  :: Transport
-	, connectionSerialMVar :: C.MVar M.Serial
-	, connectionReadMVar   :: C.MVar ()
-	, connectionUUID       :: UUID.UUID
-	}
+\end{multicols}
+
+\begin{multicols}{2}
+
+TODO
+
+\vfill
+\columnbreak
+
+:d DBus.Connection
+|apidoc DBus.Connection.connect|
+connect :: [Transport] -> [Mechanism] -> Address -> IO Connection
+connect transports mechanisms addr = do
+	msock <- connectTransport transports addr
+	sock <- case msock of
+		Just s -> return s
+		Nothing -> connectionError (concat
+			[ "Unknown address method: "
+			, show (addressMethod addr)
+			])
+	authed <- authenticate sock mechanisms
+	when (not authed)
+		(connectionError "Authentication failed")
+	
+	serial <- newIORef (Serial 1)
+	readLock <- newMVar ()
+	writeLock <- newMVar ()
+	return (Connection addr sock serial
+	                   readLock writeLock)
+
+|apidoc DBus.Connection.disconnect|
+disconnect :: Connection -> IO ()
+disconnect = socketClose . connectionSocket
 :
 
-:d connection exports
-  Connection
-, connectionAddress
-, connectionUUID
+\end{multicols}
+
+\clearpage
+\subsection{Addresses}
+
+\begin{multicols}{2}
+
+An address has two components, the \emph{method} and the \emph{parameters}.
+The method (such as {\tt "unix"} or {\tt "tcp"}) describes how the socket
+should be opened. The parameters include additional information, such as
+hostnames, required by the method.
+
+\vfill
+\columnbreak
+
+:d DBus.Address
+data Address = Address Text (Map Text Text)
+	deriving (Eq)
+
+addressMethod :: Address -> Text
+addressMethod (Address x _ ) = x
+
+addressParameters :: Address -> Map Text Text
+addressParameters (Address _ x) = x
 :
 
-While not particularly useful for other functions, being able to
-{\tt show} a {\tt Connection} is useful when debugging.
+\end{multicols}
 
-:f DBus/Connection.hs
+\begin{multicols}{2}
+
+A bus address is in the format {\tt $method$:$key$=$value$,...}
+where the method may be empty and parameters are optional. An address's
+parameter list, if present, may end with a comma. Multiple parameters may
+have the same key; in this case, only the first parameter for each key will
+be stored.
+
+In parameter values, any byte may be encoded by prepending the \% character
+to its value in hexadecimal. \% is not allowed to appear unless it is
+followed by two hexadecimal digits. Every other allowed byte is termed
+an ``optionally encoded'' byte, and may appear unescaped in parameter
+values.
+
+\vfill
+\columnbreak
+
+:d DBus.Address
+address :: Text -> Maybe Address
+address = runParser $ do
+	addr <- parseAddress
+	eof
+	return addr
+
+parseAddress :: Parser Address
+parseAddress = parser where
+	parser = do
+		method <- many (noneOf ":;")
+		void (char ':')
+		params <- sepEndBy param (char ',')
+		return (Address
+			(Data.Text.pack method)
+			(Data.Map.fromList params))
+	
+	param = do
+		key <- many1 (noneOf "=;,")
+		void (char '=')
+		value <- many1 valueChar
+		let pack = Data.Text.pack
+		return (pack key, pack value)
+	
+	valueChar = encoded <|> unencoded
+	encoded = do
+		void (char '%')
+		hex <- count 2 hexDigit
+		return (chr (hexToInt hex))
+	unencoded = oneOf optionallyEncoded
+
+optionallyEncoded :: [Char]
+optionallyEncoded = concat
+	[ ['0'..'9']
+	, ['a'..'z']
+	, ['A'..'Z']
+	, "-_/\\*."
+	]
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Addresses in environment variables are separated by semicolons, and the full
+address list may end in a semicolon.
+
+\vfill
+\columnbreak
+
+:d DBus.Address
+addresses :: Text -> Maybe [Address]
+addresses = runParser $ do
+	xs <- sepEndBy1 parseAddress (char ';')
+	eof
+	return xs
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Printing addresses}
+
+\begin{multicols}{2}
+
+Users might want to print addresses and open connections when working in a
+{\sc repl}, so I'll define some simple {\tt Show} instances. {\tt Connection}
+is given a special format to mark it as {\sc io}-ish, while {\tt address} is
+formatted as if it's a string wrapper.
+
+\vfill
+\columnbreak
+
+:d DBus.Address
+instance Show Address where
+	showsPrec d x = showParen (d > 10) $
+		showString "Address " .
+		shows (addressText x)
+:
+
+:d DBus.Connection
 instance Show Connection where
-	showsPrec d con = showParen (d > 10) strCon where
-		addr = A.strAddress $ connectionAddress con
-		strCon = s "<Connection " . shows addr . s ">"
-		s = showString
+	showsPrec _ x =
+		showString "<Connection " .
+		shows (connectionAddress x) .
+		showString ">"
 :
 
-\subsection{Transports}
+\end{multicols}
 
-A transport is anything which can send and receive bytestrings, typically
-via a socket.
+\begin{multicols}{2}
 
-:d connection imports
-import qualified Data.ByteString.Lazy as L
-import Data.Word (Word32)
+Formatting addresses is just the reverse of parsing them.
+
+\vfill
+\columnbreak
+
+:d DBus.Address
+addressText :: Address -> Text
+addressText addr = Data.Text.concat chunks where
+	chunks = [ addressMethod addr, ":"
+	         , paramsText]
+	
+	params = addressParameters addr
+	paramsText = Data.Text.intercalate "," $ do
+		(k, v) <- Data.Map.toList params
+		let k' = Data.Text.unpack k
+		let v' = Data.Text.unpack v
+		let encoded = concatMap encode v'
+		let str = concat [k', "=", encoded]
+		return (Data.Text.pack str)
+	
+	encode c = if elem c optionallyEncoded
+		then [c]
+		else printf "%%%02X" (ord c)
 :
 
-:f DBus/Connection.hs
-|apidoc Transport|
-data Transport = Transport
-	{ transportSend :: L.ByteString -> IO ()
-	, transportRecv :: Word32 -> IO L.ByteString
-	, transportClose :: IO ()
-	}
+\end{multicols}
+
+\subsubsection{Environmental addresses}
+
+:d DBus.Address
+getenv :: String -> IO (Maybe Text)
+getenv name = Control.Exception.catch
+	(fmap (Just . Data.Text.pack) (System.Environment.getEnv name))
+	(\(Control.Exception.SomeException _) -> return Nothing)
+
+getSystem :: IO (Maybe [Address])
+getSystem = do
+	let system = "unix:path=/var/run/dbus/system_bus_socket"
+	env <- getenv "DBUS_SYSTEM_BUS_ADDRESS"
+	return (addresses (maybe system id env))
+
+getSession :: IO (Maybe [Address])
+getSession = do
+	env <- getenv "DBUS_SESSION_BUS_ADDRESS"
+	return (env >>= addresses)
+
+getStarter :: IO (Maybe [Address])
+getStarter = do
+	env <- getenv "DBUS_STARTER_BUS_ADDRESS"
+	return (env >>= addresses)
 :
 
-If a method has no known transport, attempting to connect using it will
-just result in an exception.
+\clearpage
+\subsection{Transports}
 
-:f DBus/Connection.hs
-connectTransport :: A.Address -> IO Transport
-connectTransport a = transport' (A.addressMethod a) a where
-	transport' "unix" = unix
-	transport' "tcp"  = tcp
-	transport' _      = E.throwIO . UnknownMethod
+\begin{multicols}{2}
+
+The transport abstracts how the operating system connects to the server
+process; typically, this is based on {\sc unix} or {\sc tcp} sockets, but
+users might use alternative transports for special use cases. This library
+only requires the ability to read from, write to, and close an open socket,
+so those methods are bundled into {\tt Transport}.
+
+\vfill
+\columnbreak
+
+:d DBus.Connection.Transport
+|apidoc DBus.Connection.Transport|
+data Transport = Transport Text (Address -> IO Socket)
+
+data Socket = Socket
+	(ByteString -> IO ())
+	(Word32 -> IO ByteString)
+	(IO ())
+
+transport :: Text -> (Address -> IO Socket) -> Transport
+transport = Transport
+
+socket :: (ByteString -> IO ()) -> (Word32 -> IO ByteString) -> IO () -> Socket
+socket = Socket
+
+socketPut :: Socket -> ByteString -> IO ()
+socketPut (Socket x _ _) = x
+
+socketGet :: Socket -> Word32 -> IO ByteString
+socketGet (Socket _ x _) = x
+
+socketClose :: Socket -> IO ()
+socketClose (Socket _ _ x) = x
+
+connectTransport :: [Transport] -> Address -> IO (Maybe Socket)
+connectTransport transports addr = loop transports where
+	m = addressMethod addr
+	loop [] = return Nothing
+	loop ((Transport n io):ts) = if n == m
+		then fmap Just (io addr)
+		else loop ts
 :
 
-\subsubsection{UNIX}
+\end{multicols}
 
+\subsubsection{Generic handle-based transport}
+
+\begin{multicols}{2}
+
+Both UNIX and TCP are backed by standard handles, and can therefore use
+a shared handle-based transport backend. This sets reasonable defaults
+(no buffering, no newline mangling) for the handle parameters.
+
+\vfill
+\columnbreak
+
+:d DBus.Connection.Transport
+connectHandle :: System.IO.Handle -> IO Socket
+connectHandle h = do
+	System.IO.hSetBuffering h System.IO.NoBuffering
+	System.IO.hSetBinaryMode h True
+	return (Socket
+		(Data.ByteString.hPut h)
+		(Data.ByteString.hGet h . fromIntegral)
+		(System.IO.hClose h))
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{UNIX Transport}
+
 The {\sc unix} transport accepts two parameters: {\tt path}, which is a
 simple filesystem path, and {\tt abstract}, which is a path in the
 Linux-specific abstract domain. One, and only one, of these parameters must
 be specified.
 
-:d connection imports
-import qualified Network as N
-import qualified Data.Map as Map
-:
+:d DBus.Connection.Transport
+unix :: Transport
+unix = transport "unix" connectUNIX
 
-:f DBus/Connection.hs
-unix :: A.Address -> IO Transport
-unix a = port >>= N.connectTo "localhost" >>= handleTransport where
-	params = A.addressParameters a
-	path = Map.lookup "path" params
-	abstract = Map.lookup "abstract" params
+connectUNIX :: Address -> IO Socket
+connectUNIX a = getHandle >>= connectHandle where
+	params = addressParameters a
+	param key = Data.Map.lookup key params
 	
 	tooMany = "Only one of `path' or `abstract' may be specified for the\
 	          \ `unix' transport."
 	tooFew = "One of `path' or `abstract' must be specified for the\
 	         \ `unix' transport."
 	
-	port = fmap N.UnixSocket path'
-	path' = case (path, abstract) of
-		(Just _, Just _) -> E.throwIO $ BadParameters a tooMany
-		(Nothing, Nothing) -> E.throwIO $ BadParameters a tooFew
-		(Just x, Nothing) -> return $ TL.unpack x
-		(Nothing, Just x) -> return $ '\x00' : TL.unpack x
+	path = case (param "path", param "abstract") of
+		(Just _, Just _) -> connectionError tooMany
+		(Nothing, Nothing) -> connectionError tooFew
+		(Just x, Nothing) -> return (Data.Text.unpack x)
+		(Nothing, Just x) -> return ('\x00' : Data.Text.unpack x)
+	
+	getHandle = do
+		port <- fmap Network.UnixSocket path
+		Network.connectTo "localhost" port
 :
 
+\clearpage
 \subsubsection{TCP}
 
 The {\sc tcp} transport has three parameters:
@@ -139,49 +398,35 @@
       {\tt "ipv4"} or {\tt "ipv6"}
 \end{itemize}
 
-The high-level {\tt Network} module doesn't provide enough control over
-socket construction for this transport, so {\tt Network.Socket} must be
-imported.
-
-:d connection imports
-import qualified Network.Socket as NS
-:
+:d DBus.Connection.Transport
+tcp :: Transport
+tcp = Transport "tcp" connectTCP
 
-:f DBus/Connection.hs
-tcp :: A.Address -> IO Transport
-tcp a = openHandle >>= handleTransport where
-	params = A.addressParameters a
-	openHandle = do
+connectTCP :: Address -> IO Socket
+connectTCP a = getHandle >>= connectHandle where
+	params = addressParameters a
+	param key = Data.Map.lookup key params
+	
+	getHandle = do
 		port <- getPort
 		family <- getFamily
-		addresses <- getAddresses family
-		socket <- openSocket port addresses
-		NS.socketToHandle socket I.ReadWriteMode
-:
-
-Parameter parsing...
-
-:f DBus/Connection.hs
-	hostname = maybe "localhost" TL.unpack $ Map.lookup "host" params
-:
-
-:f DBus/Connection.hs
-	unknownFamily x = TL.concat ["Unknown socket family for TCP transport: ", x]
-	getFamily = case Map.lookup "family" params of
-		Just "ipv4" -> return NS.AF_INET
-		Just "ipv6" -> return NS.AF_INET6
-		Nothing     -> return NS.AF_UNSPEC
-		Just x      -> E.throwIO $ BadParameters a $ unknownFamily x
-:
-
-:f DBus/Connection.hs
-	missingPort = "TCP transport requires the ``port'' parameter."
-	badPort x = TL.concat ["Invalid socket port for TCP transport: ", x]
-	getPort = case Map.lookup "port" params of
-		Nothing -> E.throwIO $ BadParameters a missingPort
-		Just x -> case P.parse parseWord16 "" (TL.unpack x) of
-			Right x' -> return $ NS.PortNum x'
-			Left  _  -> E.throwIO $ BadParameters a $ badPort x
+		addrs <- getAddresses family
+		sock<- openSocket port addrs
+		Network.Socket.socketToHandle sock System.IO.ReadWriteMode
+	hostname = maybe "localhost" Data.Text.unpack (param "host")
+	unknownFamily x = concat ["Unknown socket family for TCP transport: ", show x]
+	getFamily = case param "family" of
+		Just "ipv4" -> return Network.Socket.AF_INET
+		Just "ipv6" -> return Network.Socket.AF_INET6
+		Nothing     -> return Network.Socket.AF_UNSPEC
+		Just x      -> connectionError (unknownFamily x)
+	missingPort = "TCP transport requires the `port' parameter."
+	badPort x = concat ["Invalid socket port for TCP transport: ", show x]
+	getPort = case param "port" of
+		Nothing -> connectionError missingPort
+		Just x -> case parse parseWord16 "" (Data.Text.unpack x) of
+			Right x' -> return (Network.Socket.PortNum x')
+			Left  _  -> connectionError (badPort x)
 :
 
 Parsing the port is a bit complicated; assuming every character is an ASCII
@@ -189,17 +434,10 @@
 {\tt PortNumber} is expected to be in big-endian byte order, so the parsed
 value must be converted from host order using {\tt Data.Binary}.
 
-:d connection imports
-import qualified Text.ParserCombinators.Parsec as P
-import Control.Monad (unless)
-import Data.Binary.Get (runGet, getWord16host)
-import Data.Binary.Put (runPut, putWord16be)
-:
-
-:f DBus/Connection.hs
+:d DBus.Connection.Transport
 	parseWord16 = do
-		chars <- P.many1 P.digit
-		P.eof
+		chars <- many1 digit
+		eof
 		let value = read chars :: Integer
 		unless (value > 0 && value <= 65535) $
 			-- Calling 'fail' is acceptable here, because Parsec 2
@@ -207,26 +445,26 @@
 			-- implements 'fail'.
 			fail "bad port"
 		let word = fromIntegral value
-		return $ runGet getWord16host (runPut (putWord16be word))
+		return (Data.Binary.Get.runGet Data.Binary.Get.getWord16host (Data.Binary.Put.runPut (Data.Binary.Put.putWord16be word)))
 :
 
-:f DBus/Connection.hs
+:d DBus.Connection.Transport
 	getAddresses family = do
-		let hints = NS.defaultHints
-			{ NS.addrFlags = [NS.AI_ADDRCONFIG]
-			, NS.addrFamily = family
-			, NS.addrSocketType = NS.Stream
+		let hints = Network.Socket.defaultHints
+			{ Network.Socket.addrFlags = [Network.Socket.AI_ADDRCONFIG]
+			, Network.Socket.addrFamily = family
+			, Network.Socket.addrSocketType = Network.Socket.Stream
 			}
-		NS.getAddrInfo (Just hints) (Just hostname) Nothing
+		Network.Socket.getAddrInfo (Just hints) (Just hostname) Nothing
 :
 
 The {\tt SockAddr} values returned from {\tt getAddrInfo} don't have any
 port set, so it must be manually changed to whatever was in the {\tt port}
 option.
 
-:f DBus/Connection.hs
-	setPort port (NS.SockAddrInet  _ x)     = NS.SockAddrInet port x
-	setPort port (NS.SockAddrInet6 _ x y z) = NS.SockAddrInet6 port x y z
+:d DBus.Connection.Transport
+	setPort port (Network.Socket.SockAddrInet  _ x)     = Network.Socket.SockAddrInet port x
+	setPort port (Network.Socket.SockAddrInet6 _ x y z) = Network.Socket.SockAddrInet6 port x y z
 	setPort _    addr                       = addr
 :
 
@@ -234,114 +472,110 @@
 until a valid address is found. If none are found, or are usable, an
 exception will be thrown.
 
-:f DBus/Connection.hs
-	openSocket _ [] = E.throwIO $ NoWorkingAddress [a]
-	openSocket port (addr:addrs) = E.catch (openSocket' port addr) $
-		\(E.SomeException _) -> openSocket port addrs
+:d DBus.Connection.Transport
+	openSocket _ [] = connectionError ("Failed to open socket to address " ++ show a)
+	openSocket port (addr:addrs) = Control.Exception.catch (openSocket' port addr) $
+		\(Control.Exception.SomeException _) -> openSocket port addrs
 	openSocket' port addr = do
-		sock <- NS.socket (NS.addrFamily addr)
-		                  (NS.addrSocketType addr)
-		                  (NS.addrProtocol addr)
-		NS.connect sock . setPort port . NS.addrAddress $ addr
+		sock <- Network.Socket.socket (Network.Socket.addrFamily addr)
+		                  (Network.Socket.addrSocketType addr)
+		                  (Network.Socket.addrProtocol addr)
+		Network.Socket.connect sock . setPort port . Network.Socket.addrAddress $ addr
 		return sock
 :
 
-\subsubsection{Generic handle-based transport}
+\clearpage
+\subsection{Authentication}
 
-Both UNIX and TCP are backed by standard handles, and can therefore use
-a shared handle-based transport backend.
+\begin{multicols}{2}
 
-:d connection imports
-import qualified System.IO as I
-:
+TODO
 
-:f DBus/Connection.hs
-handleTransport :: I.Handle -> IO Transport
-handleTransport h = do
-	I.hSetBuffering h I.NoBuffering
-	I.hSetBinaryMode h True
-	return $ Transport (L.hPut h) (L.hGet h . fromIntegral) (I.hClose h)
-:
+\vfill
+\columnbreak
 
-\subsection{Errors}
+:d DBus.Connection.Authentication
+authenticate :: Socket
+             -> [Mechanism]
+             -> IO Bool
+authenticate s mechanisms = do
+	socketPut s (Data.ByteString.pack [0])
+	let loop [] = return False
+	    loop ((Mechanism m):next) = do
+	    	success <- m s
+	    	if success
+	    		then return True
+	    		else loop next
+	loop mechanisms
+:
 
-If connecting to D-Bus fails, a {\tt ConnectionError} will be thrown.
-The constructor describes which exception occurred.
+:d DBus.Connection.Authentication
+newtype Mechanism = Mechanism (Socket -> IO Bool)
 
-:d connection imports
-import qualified Control.Exception as E
-import Data.Typeable (Typeable)
-:
+mechanism :: (Socket -> IO Bool) -> Mechanism
+mechanism = Mechanism
 
-:f DBus/Connection.hs
-data ConnectionError
-	= InvalidAddress Text
-	| BadParameters A.Address Text
-	| UnknownMethod A.Address
-	| NoWorkingAddress [A.Address]
-	deriving (Show, Typeable)
+data Auth a = Auth
+	{ unAuth :: Socket -> IO a
+	}
 
-instance E.Exception ConnectionError
-:
+instance Monad Auth where
+	return a = Auth (\_ -> return a)
+	m >>= k = Auth $ \s -> do
+		x <- unAuth m s
+		unAuth (k x) s
 
-:d connection exports
-, ConnectionError (..)
+liftIO :: IO a -> Auth a
+liftIO io = Auth (\_ -> io)
 :
 
-\subsection{Establishing a connection}
+\end{multicols}
 
-A connection can be opened to any valid address, though actually connecting
-might fail due to external factors.
+\begin{multicols}{2}
 
-:d connection imports
-import qualified DBus.Authentication as Auth
-:
+The authentication protocol is based on {\sc ascii} text.
 
-:f DBus/Connection.hs
-|apidoc connect|
-connect :: Auth.Mechanism -> A.Address -> IO Connection
-connect mechanism a = do
-	t <- connectTransport a
-	let getByte = L.head `fmap` transportRecv t 1
-	uuid <- Auth.authenticate mechanism (transportSend t) getByte
-	readLock <- C.newMVar ()
-	serialMVar <- C.newMVar M.firstSerial
-	return $ Connection a t serialMVar readLock uuid
-:
+\vfill
+\columnbreak
 
-Since addresses usually come in a list, it's sensible to have a variant
-of {\tt connect} which tries multiple addresses. The first successfully
-opened {\tt Connection} is returned.
+:d DBus.Connection.Authentication
+putLine :: String -> Auth ()
+putLine line = Auth $ \s -> do
+	let pack = Data.ByteString.Char8.pack
+	socketPut s (pack (line ++ "\r\n"))
 
-:f DBus/Connection.hs
-|apidoc connectFirst|
-connectFirst :: [(Auth.Mechanism, A.Address)] -> IO Connection
-connectFirst orig = connectFirst' orig where
-	allAddrs = [a | (_, a) <- orig]
-	connectFirst'     [] = E.throwIO $ NoWorkingAddress allAddrs
-	connectFirst' ((mech, a):as) = E.catch (connect mech a) $
-		\(E.SomeException _) -> connectFirst' as
+getLine :: Auth String
+getLine = Auth $ \s -> do
+	let head = Data.ByteString.Char8.head
+	let getchr = liftM head (socketGet s 1)
+	raw <- readUntil "\r\n" getchr
+	return (dropEnd 2 raw)
 :
 
-:d connection exports
-, connect
-, connectFirst
-:
+\end{multicols}
 
-\subsection{Closing connections}
+\clearpage
+\subsubsection{EXTERNAL}
 
-:f DBus/Connection.hs
-|apidoc connectionClose|
-connectionClose :: Connection -> IO ()
-connectionClose = transportClose . connectionTransport
-:
+Although the official spec describes only the {\tt DBUS\_COOKIE\_SHA1}
+mechanism, I have never seen it used in real life. Everything actually uses
+{\tt EXTERNAL}, so that's what this library implements.
 
-:d connection exports
-, connectionClose
+:d DBus.Connection.Authentication
+external :: Mechanism
+external = Mechanism $ unAuth $ do
+	uid <- liftIO System.Posix.User.getRealUserID
+	let token = concatMap (printf "%02X" . ord) (show uid)
+	putLine ("AUTH EXTERNAL " ++ token)
+	resp <- getLine
+	case takeWhile (/= ' ') resp of
+		"OK" -> do
+			putLine "BEGIN"
+			return True
+		_ -> return False
 :
 
-:i authentication.anansi
-
+\clearpage
 \subsection{Sending and receiving messages}
 
 Sending a message will increment the connection's internal serial state.
@@ -349,47 +583,34 @@
 the message has actually been sent, which avoids race conditions in
 multi-threaded clients.
 
-:d connection imports
-import qualified DBus.Wire as W
-:
-
-:f DBus/Connection.hs
-|apidoc send|
-send :: M.Message a => Connection -> (M.Serial -> IO b) -> a
-     -> IO (Either W.MarshalError b)
-send (Connection _ t mvar _ _) io msg = withSerial mvar $ \serial ->
-	case W.marshalMessage W.LittleEndian serial msg of
+:d DBus.Connection
+|apidoc DBus.Connection.send|
+send :: Message msg => Connection -> msg -> (Serial -> IO a) -> IO (Either MarshalError a)
+send connection msg io = do
+	serial <- nextSerial connection
+	case marshalMessage LittleEndian serial msg of
 		Right bytes -> do
-			x <- io serial
-			transportSend t bytes
-			return $ Right x
-		Left  err   -> return $ Left err
-:
-
-:d connection exports
-, send
-:
+			let sock = connectionSocket connection
+			let lock = connectionWriteLock connection
+			result <- io serial
+			withMVar lock (\_ -> socketPut sock bytes)
+			return (Right result)
+		Left err -> return (Left err)
 
-:f DBus/Connection.hs
-withSerial :: C.MVar M.Serial -> (M.Serial -> IO a) -> IO a
-withSerial m io = E.block $ do
-	s <- C.takeMVar m
-	let s' = M.nextSerial s
-	x <- E.unblock (io s) `E.onException` C.putMVar m s'
-	C.putMVar m s'
-	return x
+nextSerial :: Connection -> IO Serial
+nextSerial connection = atomicModifyIORef
+	(connectionSerial connection)
+	(\serial@(Serial x) -> (Serial (x + 1), serial))
 :
 
 Messages are received wrapped in a {\tt ReceivedMessage} value. If an
 error is encountered while unmarshaling, an exception will be thrown.
 
-:f DBus/Connection.hs
-|apidoc receive|
-receive :: Connection -> IO (Either W.UnmarshalError M.ReceivedMessage)
-receive (Connection _ t _ lock _) = C.withMVar lock $ \_ ->
-	W.unmarshalMessage $ transportRecv t
-:
-
-:d connection exports
-, receive
+:d DBus.Connection
+|apidoc DBus.Connection.receive|
+receive :: Connection -> IO (Either UnmarshalError ReceivedMessage)
+receive connection = do
+	let sock = connectionSocket connection
+	let lock = connectionReadLock connection
+	withMVar lock (\_ -> unmarshalMessageM (socketGet sock))
 :
diff --git a/src/constants.anansi b/src/constants.anansi
--- a/src/constants.anansi
+++ b/src/constants.anansi
@@ -13,174 +13,177 @@
 :# You should have received a copy of the GNU General Public License
 :# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-\section{Constants}
-
-:f DBus/Constants.hs
-|copyright|
-{-# LANGUAGE OverloadedStrings #-}
-module DBus.Constants where
-import qualified DBus.Types as T
-import Data.Word (Word8, Word32)
-
-protocolVersion :: Word8
-protocolVersion = 1
-
-messageMaximumLength :: Word32
-messageMaximumLength = 134217728
-
-arrayMaximumLength :: Word32
-arrayMaximumLength = 67108864
-:
+\clearpage
+\subsection{Named constants}
 
-\subsection{The message bus}
+\subsubsection*{The central bus}
 
-:f DBus/Constants.hs
-dbusName :: T.BusName
+:d DBus.Constants
+dbusName :: BusName
 dbusName = "org.freedesktop.DBus"
 
-dbusPath :: T.ObjectPath
+dbusPath :: ObjectPath
 dbusPath = "/org/freedesktop/DBus"
 
-dbusInterface :: T.InterfaceName
+dbusInterface :: InterfaceName
 dbusInterface = "org.freedesktop.DBus"
 :
 
-\subsection{Pre-defined interfaces}
+\subsubsection*{Standard interfaces}
 
-:f DBus/Constants.hs
-interfaceIntrospectable :: T.InterfaceName
+:d DBus.Constants
+interfaceIntrospectable :: InterfaceName
 interfaceIntrospectable = "org.freedesktop.DBus.Introspectable"
 
-interfaceProperties :: T.InterfaceName
-interfaceProperties = "org.freedesktop.DBus.Properties"
-
-interfacePeer :: T.InterfaceName
+interfacePeer :: InterfaceName
 interfacePeer = "org.freedesktop.DBus.Peer"
+
+interfaceProperties :: InterfaceName
+interfaceProperties = "org.freedesktop.DBus.Properties"
 :
 
-\subsection{Pre-defined error names}
+\subsubsection*{Standard errors}
+\label{sec:standard-error-names}
 
-:f DBus/Constants.hs
-errorFailed :: T.ErrorName
-errorFailed = "org.freedesktop.DBus.Error.Failed"
+:d DBus.Constants
+errorAccessDenied :: ErrorName
+errorAccessDenied = "org.freedesktop.DBus.Error.AccessDenied"
 
-errorNoMemory :: T.ErrorName
-errorNoMemory = "org.freedesktop.DBus.Error.NoMemory"
+errorAuthFailed :: ErrorName
+errorAuthFailed = "org.freedesktop.DBus.Error.AuthFailed"
 
-errorServiceUnknown :: T.ErrorName
-errorServiceUnknown = "org.freedesktop.DBus.Error.ServiceUnknown"
+errorDisconnected :: ErrorName
+errorDisconnected = "org.freedesktop.DBus.Error.Disconnected"
 
-errorNameHasNoOwner :: T.ErrorName
-errorNameHasNoOwner = "org.freedesktop.DBus.Error.NameHasNoOwner"
+errorFailed :: ErrorName
+errorFailed = "org.freedesktop.DBus.Error.Failed"
 
-errorNoReply :: T.ErrorName
+errorNoReply :: ErrorName
 errorNoReply = "org.freedesktop.DBus.Error.NoReply"
 
-errorIOError :: T.ErrorName
-errorIOError = "org.freedesktop.DBus.Error.IOError"
-
-errorBadAddress :: T.ErrorName
-errorBadAddress = "org.freedesktop.DBus.Error.BadAddress"
-
-errorNotSupported :: T.ErrorName
-errorNotSupported = "org.freedesktop.DBus.Error.NotSupported"
-
-errorLimitsExceeded :: T.ErrorName
-errorLimitsExceeded = "org.freedesktop.DBus.Error.LimitsExceeded"
-
-errorAccessDenied :: T.ErrorName
-errorAccessDenied = "org.freedesktop.DBus.Error.AccessDenied"
-
-errorAuthFailed :: T.ErrorName
-errorAuthFailed = "org.freedesktop.DBus.Error.AuthFailed"
-
-errorNoServer :: T.ErrorName
+errorNoServer :: ErrorName
 errorNoServer = "org.freedesktop.DBus.Error.NoServer"
 
-errorTimeout :: T.ErrorName
+errorTimedOut :: ErrorName
+errorTimedOut = "org.freedesktop.DBus.Error.TimedOut"
+
+errorTimeout :: ErrorName
 errorTimeout = "org.freedesktop.DBus.Error.Timeout"
+:
 
-errorNoNetwork :: T.ErrorName
-errorNoNetwork = "org.freedesktop.DBus.Error.NoNetwork"
+\subsubsection*{Errors calling methods}
 
-errorAddressInUse :: T.ErrorName
-errorAddressInUse = "org.freedesktop.DBus.Error.AddressInUse"
+:d DBus.Constants
+errorServiceUnknown :: ErrorName
+errorServiceUnknown = "org.freedesktop.DBus.Error.ServiceUnknown"
 
-errorDisconnected :: T.ErrorName
-errorDisconnected = "org.freedesktop.DBus.Error.Disconnected"
+errorUnknownObject :: ErrorName
+errorUnknownObject = "org.freedesktop.DBus.Error.UnknownObject"
 
-errorInvalidArgs :: T.ErrorName
-errorInvalidArgs = "org.freedesktop.DBus.Error.InvalidArgs"
+errorUnknownInterface :: ErrorName
+errorUnknownInterface = "org.freedesktop.DBus.Error.UnknownInterface"
 
-errorFileNotFound :: T.ErrorName
-errorFileNotFound = "org.freedesktop.DBus.Error.FileNotFound"
+errorUnknownMethod :: ErrorName
+errorUnknownMethod = "org.freedesktop.DBus.Error.UnknownMethod"
 
-errorFileExists :: T.ErrorName
-errorFileExists = "org.freedesktop.DBus.Error.FileExists"
+errorInvalidParameters :: ErrorName
+errorInvalidParameters = "org.freedesktop.DBus.Error.InvalidParameters"
+:
 
-errorUnknownMethod :: T.ErrorName
-errorUnknownMethod = "org.freedesktop.DBus.Error.UnknownMethod"
+\subsubsection*{Error starting services}
 
-errorTimedOut :: T.ErrorName
-errorTimedOut = "org.freedesktop.DBus.Error.TimedOut"
+:d DBus.Constants
+errorSpawnChildExited :: ErrorName
+errorSpawnChildExited = "org.freedesktop.DBus.Error.Spawn.ChildExited"
 
-errorMatchRuleNotFound :: T.ErrorName
-errorMatchRuleNotFound = "org.freedesktop.DBus.Error.MatchRuleNotFound"
+errorSpawnChildSignaled :: ErrorName
+errorSpawnChildSignaled = "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
 
-errorMatchRuleInvalid :: T.ErrorName
-errorMatchRuleInvalid = "org.freedesktop.DBus.Error.MatchRuleInvalid"
+errorSpawnConfigInvalid :: ErrorName
+errorSpawnConfigInvalid = "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
 
-errorSpawnExecFailed :: T.ErrorName
+errorSpawnExecFailed :: ErrorName
 errorSpawnExecFailed = "org.freedesktop.DBus.Error.Spawn.ExecFailed"
 
-errorSpawnForkFailed :: T.ErrorName
+errorSpawnForkFailed :: ErrorName
 errorSpawnForkFailed = "org.freedesktop.DBus.Error.Spawn.ForkFailed"
 
-errorSpawnChildExited :: T.ErrorName
-errorSpawnChildExited = "org.freedesktop.DBus.Error.Spawn.ChildExited"
-
-errorSpawnChildSignaled :: T.ErrorName
-errorSpawnChildSignaled = "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
-
-errorSpawnFailed :: T.ErrorName
+errorSpawnFailed :: ErrorName
 errorSpawnFailed = "org.freedesktop.DBus.Error.Spawn.Failed"
 
-errorSpawnFailedToSetup :: T.ErrorName
+errorSpawnFailedToSetup :: ErrorName
 errorSpawnFailedToSetup = "org.freedesktop.DBus.Error.Spawn.FailedToSetup"
 
-errorSpawnConfigInvalid :: T.ErrorName
-errorSpawnConfigInvalid = "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
+errorSpawnFileInvalid :: ErrorName
+errorSpawnFileInvalid = "org.freedesktop.DBus.Error.Spawn.FileInvalid"
 
-errorSpawnServiceNotValid :: T.ErrorName
-errorSpawnServiceNotValid = "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
+errorSpawnNoMemory :: ErrorName
+errorSpawnNoMemory = "org.freedesktop.DBus.Error.Spawn.NoMemory"
 
-errorSpawnServiceNotFound :: T.ErrorName
+errorSpawnPermissionsInvalid :: ErrorName
+errorSpawnPermissionsInvalid = "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
+
+errorSpawnServiceNotFound :: ErrorName
 errorSpawnServiceNotFound = "org.freedesktop.DBus.Error.Spawn.ServiceNotFound"
 
-errorSpawnPermissionsInvalid :: T.ErrorName
-errorSpawnPermissionsInvalid = "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
+errorSpawnServiceNotValid :: ErrorName
+errorSpawnServiceNotValid = "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
+:
 
-errorSpawnFileInvalid :: T.ErrorName
-errorSpawnFileInvalid = "org.freedesktop.DBus.Error.Spawn.FileInvalid"
+\subsubsection*{Other well-known error names}
 
-errorSpawnNoMemory :: T.ErrorName
-errorSpawnNoMemory = "org.freedesktop.DBus.Error.Spawn.NoMemory"
+:d DBus.Constants
+errorAddressInUse :: ErrorName
+errorAddressInUse = "org.freedesktop.DBus.Error.AddressInUse"
 
-errorUnixProcessIdUnknown :: T.ErrorName
-errorUnixProcessIdUnknown = "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
+errorAdtAuditDataUnknown :: ErrorName
+errorAdtAuditDataUnknown = "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
 
-errorInvalidFileContent :: T.ErrorName
+errorBadAddress :: ErrorName
+errorBadAddress = "org.freedesktop.DBus.Error.BadAddress"
+
+errorFileExists :: ErrorName
+errorFileExists = "org.freedesktop.DBus.Error.FileExists"
+
+errorFileNotFound :: ErrorName
+errorFileNotFound = "org.freedesktop.DBus.Error.FileNotFound"
+
+errorInconsistentMessage :: ErrorName
+errorInconsistentMessage = "org.freedesktop.DBus.Error.InconsistentMessage"
+
+errorInvalidFileContent :: ErrorName
 errorInvalidFileContent = "org.freedesktop.DBus.Error.InvalidFileContent"
 
-errorSELinuxSecurityContextUnknown :: T.ErrorName
-errorSELinuxSecurityContextUnknown = "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
+errorIOError :: ErrorName
+errorIOError = "org.freedesktop.DBus.Error.IOError"
 
-errorAdtAuditDataUnknown :: T.ErrorName
-errorAdtAuditDataUnknown = "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
+errorLimitsExceeded :: ErrorName
+errorLimitsExceeded = "org.freedesktop.DBus.Error.LimitsExceeded"
 
-errorObjectPathInUse :: T.ErrorName
+errorMatchRuleInvalid :: ErrorName
+errorMatchRuleInvalid = "org.freedesktop.DBus.Error.MatchRuleInvalid"
+
+errorMatchRuleNotFound :: ErrorName
+errorMatchRuleNotFound = "org.freedesktop.DBus.Error.MatchRuleNotFound"
+
+errorNameHasNoOwner :: ErrorName
+errorNameHasNoOwner = "org.freedesktop.DBus.Error.NameHasNoOwner"
+
+errorNoMemory :: ErrorName
+errorNoMemory = "org.freedesktop.DBus.Error.NoMemory"
+
+errorNoNetwork :: ErrorName
+errorNoNetwork = "org.freedesktop.DBus.Error.NoNetwork"
+
+errorNotSupported :: ErrorName
+errorNotSupported = "org.freedesktop.DBus.Error.NotSupported"
+
+errorObjectPathInUse :: ErrorName
 errorObjectPathInUse = "org.freedesktop.DBus.Error.ObjectPathInUse"
 
-errorInconsistentMessage :: T.ErrorName
-errorInconsistentMessage = "org.freedesktop.DBus.Error.InconsistentMessage"
+errorSELinuxSecurityContextUnknown :: ErrorName
+errorSELinuxSecurityContextUnknown = "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
+
+errorUnixProcessIdUnknown :: ErrorName
+errorUnixProcessIdUnknown = "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
 :
diff --git a/src/dbus-core.anansi b/src/dbus-core.anansi
--- a/src/dbus-core.anansi
+++ b/src/dbus-core.anansi
@@ -1,4 +1,4 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 :# 
 :# This program is free software: you can redistribute it and/or modify
 :# it under the terms of the GNU General Public License as published by
@@ -13,43 +13,103 @@
 :# You should have received a copy of the GNU General Public License
 :# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-\documentclass[12pt]{article}
+:option tab-size 4
 
+\documentclass{article}
+
 \usepackage{color}
 \usepackage{hyperref}
+\usepackage{indentfirst}
+\usepackage{amsmath}
+\usepackage{multicol}
+\usepackage{comment}
 \usepackage{booktabs}
 \usepackage{multirow}
-\usepackage{noweb}
-\usepackage{url}
+\usepackage[titles]{tocloft}
+\usepackage{graphicx}
 
-:# Smaller margins
-\usepackage[left=1.5cm,top=2cm,right=1.5cm,nohead,nofoot]{geometry}
+\usepackage{latex/noweb}
+\usepackage[margin=2cm]{latex/geometry}
 
-:# Remove boxes from hyperlinks
+\usepackage{titlesec}
+
+\newcommand{\dbus}{\mbox{D-Bus}}
+
+% Remove boxes from hyperlinks
 \hypersetup{
     colorlinks,
     linkcolor=blue,
 }
 
+% Smaller spacing between ToC sections
+\setlength{\cftbeforesecskip}{0.7em}
+
+% No extra margins in code blocks
+\codemargin=0pt
+
+\title{dbus\_0.9}
+\author{John Millikin\\
+        \href{mailto:"John Millikin" <jmillikin@gmail.com>}{\tt jmillikin@gmail.com}}
+\date{July 14, 2011}
+
 \makeindex
 
+\setcounter{tocdepth}{2}
+
 \begin{document}
 
-\addcontentsline{toc}{section}{Contents}
+\newgeometry{left=1.5cm,top=2cm,right=1.5cm}
+
+\maketitle
+
+\setlength{\parskip}{5pt plus 1pt}
+\setlength{\columnsep}{0.8cm}
+
+\begin{multicols}{2}
+
+:include summary.anansi
+
+\columnbreak
+
+\setlength{\parskip}{0pt plus 1pt}
 \tableofcontents
+\setlength{\parskip}{4pt plus 1pt}
+\end{multicols}
 
+\restoregeometry
+
+\newpage
 :i introduction.anansi
+
+\newpage
 :i types.anansi
+
+\newpage
 :i messages.anansi
+
+\newpage
 :i wire.anansi
-:i addresses.anansi
+
+\newpage
 :i connections.anansi
-:i bus.anansi
+
+\newpage
+:i client.anansi
+
+\newpage
 :i introspection.anansi
-:i match-rules.anansi
-:i name-reservation.anansi
+
+\newpage
+:i utilities.anansi
 :i constants.anansi
-:i util.anansi
+
+\newpage
+\appendix
+:i module-headers.anansi
+
+% exclude API docs from LaTeX output, since they're generally uninteresting
+\begin{comment}
 :i api-docs.anansi
+\end{comment}
 
 \end{document}
diff --git a/src/introduction.anansi b/src/introduction.anansi
--- a/src/introduction.anansi
+++ b/src/introduction.anansi
@@ -1,33 +1,38 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
 \section{Introduction}
 
-D-Bus is a low-latency, asynchronous IPC protocol. It is primarily used on
-Linux, BSD, and other free UNIX-like systems. More information is available
-at \url{http://dbus.freedesktop.org/}.
+On modern desktop systems, applications need to communicate with one another;
+for example, a movie player can disable the screensaver, or a music player can
+be notified when the user inserts a CD-ROM. In the early years of the Linux
+desktop, this Inter-Process Communication (IPC) was performed through a
+variety of ad hoc mechanisms. D-Bus is a simple, standardized IPC mechanism
+intended to replace and obsolete all of these older technologies.
 
-This package is an implementation of the D-Bus protocol. It is intended
-for use in either a client or server, though currently only the client
-portion of connection establishment is implemented. Additionally, it
-implements the introspection file format.
+In contrast to earlier IPC protocols, which are typically byte-based, D-Bus
+allows applications to send strongly-typed data structures named
+{\em messages}. Applications may expose an object-oriented API to the user's
+session, the entire system, or even remote systems. This brings the full power
+of object-oriented programming to IPC; for example, many applications can
+implement a standardized {\em interface} to seamlessly interoperate with any
+client written against that interface.
 
-All source code is licensed under the terms of the GNU GPL v3 or later.
+\begin{center}
+\includegraphics{latex/figure_1.eps}
+\end{center}
 
+This library is an implementation of the D-Bus protocol in pure Haskell. It
+can be used to add D-Bus support to Haskell applications, without the awkward
+interfaces common to foreign bindings. The literate portions (the part you're
+reading right now) are written for intermediate or advanced Haskell
+programmers, who may not be familiar with D-Bus. It might also be of use to
+programmers interested in implementing D-Bus in other functional languages,
+such as ML.
+
+Documentation is licensed under CC-BY-SA 3.0. Source code is
+licensed under the GNU GPL v3 or later:
+
+\begin{quote}
 :d copyright
--- Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+-- Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
 -- 
 -- This program is free software: you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -42,35 +47,4 @@
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
 :
-
-\section{Text values}
-
-Most of the functions in this library use the types and functions defined
-in {\tt Data.Text}, in preference to the {\tt String} type.
-
-:d text extensions
-{-# LANGUAGE OverloadedStrings #-}
-:
-
-:d text imports
-import Data.Text.Lazy (Text)
-import qualified Data.Text.Lazy as TL
-:
-
-Tests are separated into a separate file, which is optionally compiled but
-not included in the library.
-
-:f Tests.hs
-|copyright|
-|text extensions|
-module Main (tests, main) where
-|test imports|
-
-tests :: [F.Test]
-tests = [ F.testGroup "dummy" []
-	|test cases|
-	]
-
-main :: IO ()
-main = F.defaultMain tests
-:
+\end{quote}
diff --git a/src/introspection.anansi b/src/introspection.anansi
--- a/src/introspection.anansi
+++ b/src/introspection.anansi
@@ -40,28 +40,9 @@
 </node>
 \end{verbatim}
 
-:f DBus/Introspection.hs
-|copyright|
-|text extensions|
-module DBus.Introspection
-	( Object (..)
-	, Interface (..)
-	, Method (..)
-	, Signal (..)
-	, Parameter (..)
-	, Property (..)
-	, PropertyAccess (..)
-	, toXML
-	, fromXML
-	) where
-|text imports|
-|introspection imports|
-import qualified DBus.Types as T
-:
-
-\subsection{Data types}
+\subsection*{Data types}
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 data Object = Object T.ObjectPath [Interface] [Object]
 	deriving (Show, Eq)
 
@@ -84,13 +65,13 @@
 	deriving (Show, Eq)
 :
 
-\subsection{Parsing XML}
+\subsection*{Parsing XML}
 
 If parsing fails, {\tt fromXML} will return {\tt Nothing}. Aside from the
 elements directly accessed by the parser, no effort is made to check the
 document's validity because there is no DTD as of yet.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 fromXML :: T.ObjectPath -> Text -> Maybe Object
 fromXML path text = do
 	root <- parseElement text
@@ -101,18 +82,13 @@
 events. DBus's introspection format doesn't use any character data, so only
 the element attributes and nesting are preserved.
 
-:d introspection imports
-import qualified Data.XML.Types as X
-import qualified Text.XML.LibXML.SAX as SAX
-import Control.Monad.ST (runST)
-import qualified Data.STRef as ST
-:
-
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseElement :: Text -> Maybe X.Element
 parseElement text = runST $ do
 	stackRef <- ST.newSTRef [([], [])]
-	let onError _ = ST.writeSTRef stackRef []
+	let onError _ = do
+		ST.writeSTRef stackRef []
+		return False
 	let onBegin _ attrs = do
 		ST.modifySTRef stackRef ((attrs, []):)
 		return True
@@ -125,10 +101,11 @@
 		ST.writeSTRef stackRef (parent:stack'')
 		return True
 	
-	p <- SAX.newParserST onError Nothing
+	p <- SAX.newParserST Nothing
 	SAX.setCallback p SAX.parsedBeginElement onBegin
 	SAX.setCallback p SAX.parsedEndElement onEnd
-	SAX.parseLazyText p text
+	SAX.setCallback p SAX.reportError onError
+	SAX.parseBytes p (Data.Text.Encoding.encodeUtf8 text)
 	SAX.parseComplete p
 	stack <- ST.readSTRef stackRef
 	return $ case stack of
@@ -143,12 +120,12 @@
 Even though the root object's {\tt name} is optional, if present, it must
 still be a valid object path.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseRoot :: T.ObjectPath -> X.Element -> Maybe Object
 parseRoot defaultPath e = do
-	path <- case getattrM "name" e of
+	path <- case X.attributeText "name" e of
 		Nothing -> Just defaultPath
-		Just x  -> T.mkObjectPath x
+		Just x  -> T.objectPath x
 	parseObject path e
 :
 
@@ -156,48 +133,48 @@
 attribute is not a valid object path, but should be valid when appended to
 the root object's path.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseChild :: T.ObjectPath -> X.Element -> Maybe Object
 parseChild parentPath e = do
-	let parentPath' = case T.strObjectPath parentPath of
+	let parentPath' = case T.objectPathText parentPath of
 		"/" -> "/"
-		x   -> TL.append x "/"
-	pathSegment <- getattrM "name" e
-	path <- T.mkObjectPath $ TL.append parentPath' pathSegment
+		x   -> Data.Text.append x "/"
+	pathSegment <- X.attributeText "name" e
+	path <- T.objectPath $ Data.Text.append parentPath' pathSegment
 	parseObject path e
 :
 
 Other than the name, both root and non-root {\tt nodes} have identical
 contents.  They may contain interface definitions, and child {\tt node}s.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseObject :: T.ObjectPath -> X.Element -> Maybe Object
-parseObject path e | X.elementName e == toName "node" = do
-	interfaces <- children parseInterface (named "interface") e
-	children' <- children (parseChild path) (named "node") e
+parseObject path e | X.elementName e == "node" = do
+	interfaces <- children parseInterface (X.isNamed "interface") e
+	children' <- children (parseChild path) (X.isNamed "node") e
 	return $ Object path interfaces children'
 parseObject _ _ = Nothing
 :
 
 Interfaces may contain methods, signals, and properties.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseInterface :: X.Element -> Maybe Interface
 parseInterface e = do
-	name <- T.mkInterfaceName =<< getattrM "name" e
-	methods <- children parseMethod (named "method") e
-	signals <- children parseSignal (named "signal") e
-	properties <- children parseProperty (named "property") e
+	name <- T.interfaceName =<< X.attributeText "name" e
+	methods <- children parseMethod (X.isNamed "method") e
+	signals <- children parseSignal (X.isNamed "signal") e
+	properties <- children parseProperty (X.isNamed "property") e
 	return $ Interface name methods signals properties
 :
 
 Methods contain a list of parameters, which default to ``in'' parameters
 if no direction is specified.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseMethod :: X.Element -> Maybe Method
 parseMethod e = do
-	name <- T.mkMemberName =<< getattrM "name" e
+	name <- T.memberName =<< X.attributeText "name" e
 	paramsIn <- children parseParameter (isParam ["in", ""]) e
 	paramsOut <- children parseParameter (isParam ["out"]) e
 	return $ Method name paramsIn paramsOut
@@ -205,37 +182,33 @@
 
 Signals are similar to methods, except they have no ``in'' parameters.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseSignal :: X.Element -> Maybe Signal
 parseSignal e = do
-	name <- T.mkMemberName =<< getattrM "name" e
+	name <- T.memberName =<< X.attributeText "name" e
 	params <- children parseParameter (isParam ["out", ""]) e
 	return $ Signal name params
 :
 
 A parameter has a free-form name, and a single valid type.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
+parseType :: X.Element -> Maybe T.Signature
+parseType e = X.attributeText "type" e >>= T.signature
+
 parseParameter :: X.Element -> Maybe Parameter
 parseParameter e = do
 	let name = getattr "name" e
 	sig <- parseType e
-	return $ Parameter name sig
-:
-
-:f DBus/Introspection.hs
-parseType :: X.Element -> Maybe T.Signature
-parseType e = do
-	sig <- T.mkSignature =<< getattrM "type" e
 	case T.signatureTypes sig of
-		[_] -> Just sig
-		_   -> Nothing
+		[_] -> Just (Parameter name sig)
+		_ -> Nothing
 :
 
 Properties are used by the {\tt org.freedesktop.DBus.Properties} interface.
 Each property may be read, written, or both, and has an associated type.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 parseProperty :: X.Element -> Maybe Property
 parseProperty e = do
 	let name = getattr "name" e
@@ -249,36 +222,19 @@
 	return $ Property name sig access
 :
 
-:d introspection imports
-import Control.Monad ((>=>))
-import Data.Maybe (fromMaybe, listToMaybe)
-:
-
-:f DBus/Introspection.hs
-getattrM :: Text -> X.Element -> Maybe Text
-getattrM name = fmap attrText . listToMaybe . attrs where
-	attrText = textContent . X.attributeContent
-	attrs = X.elementAttributes >=> X.isNamed (toName name)
-	textContent cs = TL.concat [t | X.ContentText t <- cs]
-
-getattr :: Text -> X.Element -> Text
-getattr = (fromMaybe "" .) . getattrM
+:d DBus.Introspection
+getattr :: X.Name -> X.Element -> Text
+getattr = (fromMaybe "" .) . X.attributeText
 
 isParam :: [Text] -> X.Element -> [X.Element]
-isParam dirs = named "arg" >=> checkDir where
+isParam dirs = X.isNamed "arg" >=> checkDir where
 	checkDir e = [e | getattr "direction" e `elem` dirs]
 
 children :: Monad m => (X.Element -> m b) -> (X.Element -> [X.Element]) -> X.Element -> m [b]
 children f p = mapM f . concatMap p . X.elementChildren
-
-named :: X.Named a => Text -> a -> [a]
-named = X.isNamed . toName
-
-toName :: Text -> X.Name
-toName t = X.Name t Nothing Nothing
 :
 
-\subsection{Generating XML}
+\subsection*{Generating XML}
 
 Generating XML can fail; if a child object's path is not a sub-path of the
 parent, {\tt toXML} will return {\tt Nothing}.
@@ -288,46 +244,46 @@
 except I didn't want to drag in a dependency on {\tt transformers} for such
 a little thing.
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 newtype XmlWriter a = XmlWriter { runXmlWriter :: Maybe (a, Text) }
 
 instance Monad XmlWriter where
-	return a = XmlWriter $ Just (a, TL.empty)
+	return a = XmlWriter $ Just (a, Data.Text.empty)
 	m >>= f = XmlWriter $ do
 		(a, w) <- runXmlWriter m
 		(b, w') <- runXmlWriter (f a)
-		return (b, TL.append w w')
+		return (b, Data.Text.append w w')
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 tell :: Text -> XmlWriter ()
 tell t = XmlWriter $ Just ((), t)
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 toXML :: Object -> Maybe Text
 toXML obj = do
 	(_, text) <- runXmlWriter (writeRoot obj)
 	return text
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeRoot :: Object -> XmlWriter ()
 writeRoot obj@(Object path _ _) = do
 	tell "<!DOCTYPE node PUBLIC '-//freedesktop//DTD D-BUS Object Introspection 1.0//EN'"
 	tell " 'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'>\n"
-	writeObject (T.strObjectPath path) obj
+	writeObject (T.objectPathText path) obj
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeChild :: T.ObjectPath -> Object -> XmlWriter ()
 writeChild parentPath obj@(Object path _ _) = write where
-	path' = T.strObjectPath path
-	parent' = T.strObjectPath parentPath
-	relpathM = if TL.isPrefixOf parent' path'
+	path' = T.objectPathText path
+	parent' = T.objectPathText parentPath
+	relpathM = if Data.Text.isPrefixOf parent' path'
 		then Just $ if parent' == "/"
-			then TL.drop 1 path'
-			else TL.drop (TL.length parent' + 1) path'
+			then Data.Text.drop 1 path'
+			else Data.Text.drop (Data.Text.length parent' + 1) path'
 		else Nothing
 	
 	write = case relpathM of
@@ -335,7 +291,7 @@
 		Nothing -> XmlWriter Nothing
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeObject :: Text -> Object -> XmlWriter ()
 writeObject path (Object fullPath interfaces children') = writeElement "node"
 	[("name", path)] $ do
@@ -343,56 +299,56 @@
 		mapM_ (writeChild fullPath) children'
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeInterface :: Interface -> XmlWriter ()
 writeInterface (Interface name methods signals properties) = writeElement "interface"
-	[("name", T.strInterfaceName name)] $ do
+	[("name", T.interfaceNameText name)] $ do
 		mapM_ writeMethod methods
 		mapM_ writeSignal signals
 		mapM_ writeProperty properties
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeMethod :: Method -> XmlWriter ()
 writeMethod (Method name inParams outParams) = writeElement "method"
-	[("name", T.strMemberName name)] $ do
+	[("name", T.memberNameText name)] $ do
 		mapM_ (writeParameter "in") inParams
 		mapM_ (writeParameter "out") outParams
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeSignal :: Signal -> XmlWriter ()
 writeSignal (Signal name params) = writeElement "signal"
-	[("name", T.strMemberName name)] $ do
+	[("name", T.memberNameText name)] $ do
 		mapM_ (writeParameter "out") params
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeParameter :: Text -> Parameter -> XmlWriter ()
 writeParameter direction (Parameter name sig) = writeEmptyElement "arg"
 	[ ("name", name)
-	, ("type", T.strSignature sig)
+	, ("type", T.signatureText sig)
 	, ("direction", direction)
 	]
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeProperty :: Property -> XmlWriter ()
 writeProperty (Property name sig access) = writeEmptyElement "property"
 	[ ("name", name)
-	, ("type", T.strSignature sig)
+	, ("type", T.signatureText sig)
 	, ("access", strAccess access)
 	]
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 strAccess :: [PropertyAccess] -> Text
-strAccess access = TL.append readS writeS where
+strAccess access = Data.Text.append readS writeS where
 	readS = if elem Read access then "read" else ""
 	writeS = if elem Write access then "write" else ""
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeElement :: Text -> [(Text, Text)] -> XmlWriter () -> XmlWriter ()
 writeElement name attrs content = do
 	tell "<"
@@ -405,7 +361,7 @@
 	tell ">"
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeEmptyElement :: Text -> [(Text, Text)] -> XmlWriter ()
 writeEmptyElement name attrs = do
 	tell "<"
@@ -414,7 +370,7 @@
 	tell "/>"
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 writeAttribute :: (Text, Text) -> XmlWriter ()
 writeAttribute (name, content) = do
 	tell " "
@@ -424,92 +380,14 @@
 	tell "'"
 :
 
-:f DBus/Introspection.hs
+:d DBus.Introspection
 escape :: Text -> Text
-escape = TL.concatMap escapeChar where
+escape = Data.Text.concatMap escapeChar where
 	escapeChar c = case c of
 		'&' -> "&amp;"
 		'<' -> "&lt;"
 		'>' -> "&gt;"
 		'"' -> "&quot;"
 		'\'' -> "&apos;"
-		_ -> TL.singleton c
-:
-
-\subsection{Test support}
-
-:f Tests.hs
-subObject :: ObjectPath -> Gen I.Object
-subObject parentPath = sized $ \n -> resize (min n 4) $ do
-	let nonRoot = do
-		x <- arbitrary
-		case strObjectPath x of
-			"/" -> nonRoot
-			x'  -> return x'
-	
-	thisPath <- nonRoot
-	let path' = case strObjectPath parentPath of
-		"/" -> thisPath
-		x   -> TL.append x thisPath
-	let path = mkObjectPath_ path'
-	ifaces <- arbitrary
-	children <- halfSized . listOf . subObject $ path
-	return $ I.Object path ifaces children
-
-instance Arbitrary I.Object where
-	arbitrary = arbitrary >>= subObject
-
-instance Arbitrary I.Interface where
-	arbitrary = do
-		name <- arbitrary
-		methods <- arbitrary
-		signals <- arbitrary
-		properties <- arbitrary
-		return $ I.Interface name methods signals properties
-
-instance Arbitrary I.Method where
-	arbitrary = do
-		name <- arbitrary
-		inParams <- arbitrary
-		outParams <- arbitrary
-		return $ I.Method name inParams outParams
-
-instance Arbitrary I.Signal where
-	arbitrary = do
-		name <- arbitrary
-		params <- arbitrary
-		return $ I.Signal name params
-
-singleType :: Gen Signature
-singleType = do
-	t <- arbitrary
-	case mkSignature $ typeCode t of
-		Just x -> return x
-		Nothing -> singleType
-
-instance Arbitrary I.Parameter where
-	arbitrary = do
-		name <- listOf $ arbitrary `suchThat` isPrint
-		sig <- singleType
-		return $ I.Parameter (TL.pack name) sig
-
-instance Arbitrary I.Property where
-	arbitrary = do
-		name <- listOf $ arbitrary `suchThat` isPrint
-		sig <- singleType
-		access <- elements
-			[[], [I.Read], [I.Write],
-			 [I.Read, I.Write]]
-		return $ I.Property (TL.pack name) sig access
-:
-
-:d test cases
-, F.testGroup "Introspection"
-	[ testProperty "Generate -> Parse"
-		$ \x@(I.Object path _ _) -> let
-		xml = I.toXML x
-		Just xml' = xml
-		parsed = I.fromXML path xml'
-		in isJust xml ==> I.fromXML path xml' == Just x
-	]
+		_ -> Data.Text.singleton c
 :
diff --git a/src/match-rules.anansi b/src/match-rules.anansi
deleted file mode 100644
--- a/src/match-rules.anansi
+++ /dev/null
@@ -1,244 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{Match rules}
-
-Match rules are used to indicate that the client is interested in messages
-matching a particular filter. This module provides an interface for building
-match rule strings. Eventually, it will support parsing them also.
-
-:f DBus/MatchRule.hs
-|copyright|
-|text extensions|
-module DBus.MatchRule (
-	  MatchRule (..)
-	, MessageType (..)
-	, ParameterValue (..)
-	, formatRule
-	, addMatch
-	, matchAll
-	, matches
-	) where
-|text imports|
-import Data.Word (Word8)
-import Data.Maybe (fromMaybe, mapMaybe)
-import qualified Data.Set as Set
-import qualified DBus.Types as T
-import qualified DBus.Message as M
-import qualified DBus.Constants as C
-import DBus.Util (maybeIndex)
-:
-
-:f DBus/MatchRule.hs
--- | A match rule is a set of filters; most filters may have one possible
--- value assigned, such as a single message type. The exception are parameter
--- filters, which are limited in number only by the server implementation.
--- 
-data MatchRule = MatchRule
-	{ matchType        :: Maybe MessageType
-	, matchSender      :: Maybe T.BusName
-	, matchInterface   :: Maybe T.InterfaceName
-	, matchMember      :: Maybe T.MemberName
-	, matchPath        :: Maybe T.ObjectPath
-	, matchDestination :: Maybe T.BusName
-	, matchParameters  :: [ParameterValue]
-	}
-	deriving (Show)
-:
-
-:f DBus/MatchRule.hs
--- | Parameters may match against two types, strings and object paths. It's
--- probably an error to have two values for the same parameter.
--- 
--- The constructor @StringValue 3 \"hello\"@ means that the fourth parameter
--- in the message body must be the string @\"hello\"@. @PathValue@ is the
--- same, but its value must be an object path.
--- 
-data ParameterValue
-	= StringValue Word8 Text
-	| PathValue Word8 T.ObjectPath
-	deriving (Show, Eq)
-:
-
-:f DBus/MatchRule.hs
--- | The set of allowed message types to filter on is separate from the set
--- supported for sending over the wire. This allows the server to support
--- additional types not yet implemented in the library, or vice-versa.
--- 
-data MessageType
-	= MethodCall
-	| MethodReturn
-	| Signal
-	| Error
-	deriving (Show, Eq)
-:
-
-There's currently only one operation to perform on match rules, and that's
-to format them.
-
-:f DBus/MatchRule.hs
-|apidoc formatRule|
-formatRule :: MatchRule -> Text
-formatRule rule = TL.intercalate "," filters where
-	filters = structureFilters ++ parameterFilters
-	parameterFilters = map formatParameter $ matchParameters rule
-	structureFilters = mapMaybe unpack
-		[ ("type", fmap formatType . matchType)
-		, ("sender", fmap T.strBusName . matchSender)
-		, ("interface", fmap T.strInterfaceName . matchInterface)
-		, ("member", fmap T.strMemberName . matchMember)
-		, ("path", fmap T.strObjectPath . matchPath)
-		, ("destination", fmap T.strBusName . matchDestination)
-		]
-	unpack (key, mkValue) = formatFilter' key `fmap` mkValue rule
-:
-
-:f DBus/MatchRule.hs
-formatParameter :: ParameterValue -> Text
-formatParameter (StringValue index x) = formatFilter' key x where
-	key = "arg" `TL.append` TL.pack (show index)
-formatParameter (PathValue index x) = formatFilter' key value where
-	key = "arg" `TL.append` TL.pack (show index) `TL.append` "path"
-	value = T.strObjectPath x
-:
-
-FIXME: what are the escaping rules for match rules? Other bindings don't
-seem to perform any escaping at all.
-
-:f DBus/MatchRule.hs
-formatFilter' :: Text -> Text -> Text
-formatFilter' key value = TL.concat [key, "='", value, "'"]
-
-formatType :: MessageType -> Text
-formatType MethodCall   = "method_call"
-formatType MethodReturn = "method_return"
-formatType Signal       = "signal"
-formatType Error        = "error"
-:
-
-And since the only real reason for formatting a match rule is to send it,
-it's useful to have a message-building function pre-defined.
-
-:f DBus/MatchRule.hs
-|apidoc addMatch|
-addMatch :: MatchRule -> M.MethodCall
-addMatch rule = M.MethodCall
-	C.dbusPath
-	"AddMatch"
-	(Just C.dbusInterface)
-	(Just C.dbusName)
-	Set.empty
-	[T.toVariant $ formatRule rule]
-:
-
-Most match rules will have only one or two fields filled in, so defining
-an empty rule allows clients to set only the fields they care about.
-
-:f DBus/MatchRule.hs
-|apidoc matchAll|
-matchAll :: MatchRule
-matchAll = MatchRule
-	{ matchType        = Nothing
-	, matchSender      = Nothing
-	, matchInterface   = Nothing
-	, matchMember      = Nothing
-	, matchPath        = Nothing
-	, matchDestination = Nothing
-	, matchParameters  = []
-	}
-:
-
-It's useful to match against a rule client-side, eg when listening for
-signals.
-
-:f DBus/MatchRule.hs
-|apidoc matches|
-matches :: MatchRule -> M.ReceivedMessage -> Bool
-matches rule msg = and . mapMaybe ($ rule) $
-	[ fmap      (typeMatches msg) . matchType
-	, fmap    (senderMatches msg) . matchSender
-	, fmap     (ifaceMatches msg) . matchInterface
-	, fmap    (memberMatches msg) . matchMember
-	, fmap      (pathMatches msg) . matchPath
-	, fmap      (destMatches msg) . matchDestination
-	, Just . parametersMatch msg  . matchParameters
-	]
-:
-
-:f DBus/MatchRule.hs
-typeMatches :: M.ReceivedMessage -> MessageType -> Bool
-typeMatches (M.ReceivedMethodCall   _ _ _) MethodCall   = True
-typeMatches (M.ReceivedMethodReturn _ _ _) MethodReturn = True
-typeMatches (M.ReceivedSignal       _ _ _) Signal       = True
-typeMatches (M.ReceivedError        _ _ _) Error        = True
-typeMatches _ _ = False
-:
-
-:f DBus/MatchRule.hs
-senderMatches :: M.ReceivedMessage -> T.BusName -> Bool
-senderMatches msg name = M.receivedSender msg == Just name
-:
-
-:f DBus/MatchRule.hs
-ifaceMatches :: M.ReceivedMessage -> T.InterfaceName -> Bool
-ifaceMatches (M.ReceivedMethodCall _ _ msg) name =
-	Just name == M.methodCallInterface msg
-ifaceMatches (M.ReceivedSignal _ _ msg) name =
-	name == M.signalInterface msg
-ifaceMatches _ _ = False
-:
-
-:f DBus/MatchRule.hs
-memberMatches :: M.ReceivedMessage -> T.MemberName -> Bool
-memberMatches (M.ReceivedMethodCall _ _ msg) name =
-	name == M.methodCallMember msg
-memberMatches (M.ReceivedSignal _ _ msg) name =
-	name == M.signalMember msg
-memberMatches _ _ = False
-:
-
-:f DBus/MatchRule.hs
-pathMatches :: M.ReceivedMessage -> T.ObjectPath -> Bool
-pathMatches (M.ReceivedMethodCall _ _ msg) path =
-	path == M.methodCallPath msg
-pathMatches (M.ReceivedSignal _ _ msg) path =
-	path == M.signalPath msg
-pathMatches _ _ = False
-:
-
-:f DBus/MatchRule.hs
-destMatches :: M.ReceivedMessage -> T.BusName -> Bool
-destMatches (M.ReceivedMethodCall _ _ msg) name =
-	Just name == M.methodCallDestination msg
-destMatches (M.ReceivedMethodReturn _ _ msg) name =
-	Just name == M.methodReturnDestination msg
-destMatches (M.ReceivedError _ _ msg) name =
-	Just name == M.errorDestination msg
-destMatches (M.ReceivedSignal _ _ msg) name =
-	Just name == M.signalDestination msg
-destMatches _ _ = False
-:
-
-:f DBus/MatchRule.hs
-parametersMatch :: M.ReceivedMessage -> [ParameterValue] -> Bool
-parametersMatch _ [] = True
-parametersMatch msg values = all validParam values where
-	body = M.receivedBody msg
-	validParam (StringValue idx x) = validParam' idx x
-	validParam (PathValue   idx x) = validParam' idx x
-	validParam' idx x = fromMaybe False $ do
-		var <- maybeIndex body $ fromIntegral idx
-		fmap (== x) $ T.fromVariant var
-:
diff --git a/src/messages.anansi b/src/messages.anansi
--- a/src/messages.anansi
+++ b/src/messages.anansi
@@ -15,140 +15,143 @@
 
 \section{Messages}
 
-To prevent internal details of messages from leaking out to clients,
-declarations are contained in an internal module and then re-exported
-in the public module.
-
-:f DBus/Message.hs
-|copyright|
-module DBus.Message (
-	|message exports|
-	) where
-import DBus.Message.Internal
+:d DBus.Message
+class Message a where
+	messageTypeCode     :: a -> Word8
+	messageHeaderFields :: a -> [HeaderField]
+	messageFlags        :: a -> Set Flag
+	messageBody         :: a -> [Variant]
 :
 
-:f DBus/Message/Internal.hs
-|copyright|
-|text extensions|
-module DBus.Message.Internal where
-|text imports|
-import qualified Data.Set as S
-import Data.Word (Word8, Word32)
-import Data.Maybe (fromMaybe)
-import qualified DBus.Types as T
-import DBus.Util (maybeIndex)
+:d DBus.Message
+maybe' :: (a -> b) -> Maybe a -> [b]
+maybe' f = maybe [] (\x' -> [f x'])
 :
 
-:f DBus/Message/Internal.hs
-class Message a where
-	messageTypeCode     :: a -> Word8
-	messageHeaderFields :: a -> [HeaderField]
-	messageFlags        :: a -> S.Set Flag
-	messageBody         :: a -> [T.Variant]
+\subsection{Unknown messages}
+
+Unknown messages are used for storing information about messages without
+a recognised type code. They are not instances of {\tt Message}, because
+if they were, then clients could accidentally send invalid messages over
+the bus.
+
+:d DBus.Message
+data Unknown = Unknown
+	{ unknownType    :: Word8
+	, unknownFlags   :: Set Flag
+	, unknownBody    :: [Variant]
+	}
+	deriving (Show, Eq)
 :
 
-:d message exports
-Message ( messageFlags
-        , messageBody
-        )
+\clearpage
+\subsection{Header fields}
+
+\begin{multicols}{2}
+
+TODO
+
+\vfill
+
+\columnbreak
+
+:d DBus.Message
+data HeaderField
+	= HeaderPath        ObjectPath
+	| HeaderInterface   InterfaceName
+	| HeaderMember      MemberName
+	| HeaderErrorName   ErrorName
+	| HeaderReplySerial Serial
+	| HeaderDestination BusName
+	| HeaderSender      BusName
+	| HeaderSignature   Signature
+	deriving (Show, Eq)
 :
 
-\subsection{Flags}
+\end{multicols}
 
+\subsubsection{Flags}
+
+\begin{multicols}{2}
+
 The instance of {\tt Ord} only exists for storing flags in a set. Flags have
 no inherent ordering.
 
-:f DBus/Message/Internal.hs
+\vfill
+
+\columnbreak
+
+:d DBus.Message
 data Flag
 	= NoReplyExpected
 	| NoAutoStart
 	deriving (Show, Eq, Ord)
 :
 
-:d message exports
-, Flag (..)
-:
-
-:f Tests.hs
-instance Arbitrary Flag where
-	arbitrary = elements [NoReplyExpected, NoAutoStart]
-:
-
-\subsection{Header fields}
+\end{multicols}
 
-:f DBus/Message/Internal.hs
-data HeaderField
-	= Path        T.ObjectPath
-	| Interface   T.InterfaceName
-	| Member      T.MemberName
-	| ErrorName   T.ErrorName
-	| ReplySerial Serial
-	| Destination T.BusName
-	| Sender      T.BusName
-	| Signature   T.Signature
-	deriving (Show, Eq)
-:
+\subsubsection{Serials}
 
-\subsection{Serials}
+\begin{multicols}{2}
 
 {\tt Serial} is just a wrapper around {\tt Word32}, to provide a bit of
 added type-safety.
 
-:f DBus/Message/Internal.hs
-|apidoc Serial|
-newtype Serial = Serial { serialValue :: Word32 }
-	deriving (Eq, Ord)
+\vfill
 
-instance Show Serial where
-	show (Serial x) = show x
+\columnbreak
 
-instance T.Variable Serial where
-	toVariant (Serial x) = T.toVariant x
-	fromVariant = fmap Serial . T.fromVariant
+:d DBus.Message
+|apidoc DBus.Message.Serial|
+newtype Serial = Serial Word32
+	deriving (Eq, Ord, Show)
+
+instance IsVariant Serial where
+	toVariant (Serial x) = toVariant x
+	fromVariant = fmap Serial . fromVariant
 :
 
+\end{multicols}
+
+\begin{multicols}{2}
+
 Additionally, some useful functions exist for incrementing serials.
 
-:f DBus/Message/Internal.hs
-firstSerial :: Serial
-firstSerial = Serial 1
+\vfill
 
-nextSerial :: Serial -> Serial
-nextSerial (Serial x) = Serial (x + 1)
+\columnbreak
+
+:d DBus.Message
+serialValue :: Serial -> Word32
+serialValue (Serial x) = x
 :
 
+\end{multicols}
+
+\begin{multicols}{2}
+
 The {\tt Serial} constructor isn't useful to clients, because building
 arbitrary serials doesn't make any sense.
 
-:d message exports
-, Serial
-, serialValue
-, firstSerial
-, nextSerial
-:
+\vfill
 
-:f Tests.hs
-instance Arbitrary Serial where
-	arbitrary = fmap Serial arbitrary
-:
+\columnbreak
 
-\subsection{Message types}
+\end{multicols}
 
-:f DBus/Message/Internal.hs
-maybe' :: (a -> b) -> Maybe a -> [b]
-maybe' f = maybe [] (\x' -> [f x'])
-:
+\clearpage
+\subsection{Message types}
 
 \subsubsection{Method calls}
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 data MethodCall = MethodCall
-	{ methodCallPath        :: T.ObjectPath
-	, methodCallMember      :: T.MemberName
-	, methodCallInterface   :: Maybe T.InterfaceName
-	, methodCallDestination :: Maybe T.BusName
-	, methodCallFlags       :: S.Set Flag
-	, methodCallBody        :: [T.Variant]
+	{ methodCallPath        :: ObjectPath
+	, methodCallMember      :: MemberName
+	, methodCallInterface   :: Maybe InterfaceName
+	, methodCallDestination :: Maybe BusName
+	, methodCallFlags       :: Set Flag
+	, methodCallBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
@@ -157,84 +160,57 @@
 	messageFlags      = methodCallFlags
 	messageBody       = methodCallBody
 	messageHeaderFields m = concat
-		[ [ Path    $ methodCallPath m
-		  ,  Member $ methodCallMember m
+		[ [ HeaderPath (methodCallPath m)
+		  , HeaderMember (methodCallMember m)
 		  ]
-		, maybe' Interface . methodCallInterface $ m
-		, maybe' Destination . methodCallDestination $ m
+		, maybe' HeaderInterface (methodCallInterface m)
+		, maybe' HeaderDestination (methodCallDestination m)
 		]
 :
 
-:d message exports
-, MethodCall (..)
-:
-
-:f Tests.hs
-instance Arbitrary MethodCall where
-	arbitrary = do
-		path   <- arbitrary
-		member <- arbitrary
-		iface  <- arbitrary
-		dest   <- arbitrary
-		flags  <- fmap Set.fromList arbitrary
-		Structure body <- arbitrary
-		return $ MethodCall path member iface dest flags body
-:
-
+\clearpage
 \subsubsection{Method returns}
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 data MethodReturn = MethodReturn
 	{ methodReturnSerial      :: Serial
-	, methodReturnDestination :: Maybe T.BusName
-	, methodReturnBody        :: [T.Variant]
+	, methodReturnDestination :: Maybe BusName
+	, methodReturnBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message MethodReturn where
 	messageTypeCode _ = 2
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = methodReturnBody
 	messageHeaderFields m = concat
-		[ [ ReplySerial $ methodReturnSerial m
+		[ [ HeaderReplySerial (methodReturnSerial m)
 		  ]
-		, maybe' Destination . methodReturnDestination $ m
+		, maybe' HeaderDestination (methodReturnDestination m)
 		]
 :
 
-:d message exports
-, MethodReturn (..)
-:
-
-:f Tests.hs
-instance Arbitrary MethodReturn where
-	arbitrary = do
-		serial <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ MethodReturn serial dest body
-:
-
+\clearpage
 \subsubsection{Errors}
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 data Error = Error
-	{ errorName        :: T.ErrorName
+	{ errorName        :: ErrorName
 	, errorSerial      :: Serial
-	, errorDestination :: Maybe T.BusName
-	, errorBody        :: [T.Variant]
+	, errorDestination :: Maybe BusName
+	, errorBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message Error where
 	messageTypeCode _ = 3
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = errorBody
 	messageHeaderFields m = concat
-		[ [ ErrorName   $ errorName m
-		  , ReplySerial $ errorSerial m
+		[ [ HeaderErrorName (errorName m)
+		  , HeaderReplySerial (errorSerial m)
 		  ]
-		, maybe' Destination . errorDestination $ m
+		, maybe' HeaderDestination (errorDestination m)
 		]
 :
 
@@ -242,91 +218,43 @@
 This function lets it be retrieved easily, with a fallback if no valid
 message was found.
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 errorMessage :: Error -> Text
 errorMessage msg = fromMaybe "(no error message)" $ do
 	field <- maybeIndex (errorBody msg) 0
-	text <- T.fromVariant field
-	if TL.null text
+	text <- fromVariant field
+	if Data.Text.null text
 		then Nothing
 		else return text
 :
 
-:d message exports
-, Error (..)
-, errorMessage
-:
-
-:f Tests.hs
-instance Arbitrary Error where
-	arbitrary = do
-		name   <- arbitrary
-		serial <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ Error name serial dest body
-:
-
+\clearpage
 \subsubsection{Signals}
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 data Signal = Signal
-	{ signalPath        :: T.ObjectPath
-	, signalMember      :: T.MemberName
-	, signalInterface   :: T.InterfaceName
-	, signalDestination :: Maybe T.BusName
-	, signalBody        :: [T.Variant]
+	{ signalDestination :: Maybe BusName
+	, signalPath        :: ObjectPath
+	, signalInterface   :: InterfaceName
+	, signalMember      :: MemberName
+	, signalBody        :: [Variant]
 	}
 	deriving (Show, Eq)
 
 instance Message Signal where
 	messageTypeCode _ = 4
-	messageFlags    _ = S.fromList [NoReplyExpected, NoAutoStart]
+	messageFlags    _ = Data.Set.fromList [NoReplyExpected, NoAutoStart]
 	messageBody       = signalBody
 	messageHeaderFields m = concat
-		[ [ Path      $ signalPath m
-		  , Member    $ signalMember m
-		  , Interface $ signalInterface m
+		[ [ HeaderPath (signalPath m)
+		  , HeaderMember (signalMember m)
+		  , HeaderInterface (signalInterface m)
 		  ]
-		, maybe' Destination . signalDestination $ m
+		, maybe' HeaderDestination (signalDestination m)
 		]
 :
 
-:d message exports
-, Signal (..)
-:
-
-:f Tests.hs
-instance Arbitrary Signal where
-	arbitrary = do
-		path   <- arbitrary
-		member <- arbitrary
-		iface  <- arbitrary
-		dest   <- arbitrary
-		Structure body <- arbitrary
-		return $ Signal path member iface dest body
-:
-
-\subsubsection{Unknown messages}
-
-Unknown messages are used for storing information about messages without
-a recognised type code. They are not instances of {\tt Message}, because
-if they were, then clients could accidentally send invalid messages over
-the bus.
-
-:f DBus/Message/Internal.hs
-data Unknown = Unknown
-	{ unknownType    :: Word8
-	, unknownFlags   :: S.Set Flag
-	, unknownBody    :: [T.Variant]
-	}
-	deriving (Show, Eq)
-:
-
-:d message exports
-, Unknown (..)
-:
-
+\clearpage
 \subsection{Received messages}
 
 Messages received from a bus have additional fields which do not make sense
@@ -335,18 +263,18 @@
 If a message has an unknown type, its serial and origin are still useful
 for sending an error reply.
 
-:f DBus/Message/Internal.hs
-|apidoc ReceivedMessage|
+:d DBus.Message
+|apidoc DBus.Message.ReceivedMessage|
 data ReceivedMessage
-	= ReceivedMethodCall   Serial (Maybe T.BusName) MethodCall
-	| ReceivedMethodReturn Serial (Maybe T.BusName) MethodReturn
-	| ReceivedError        Serial (Maybe T.BusName) Error
-	| ReceivedSignal       Serial (Maybe T.BusName) Signal
-	| ReceivedUnknown      Serial (Maybe T.BusName) Unknown
+	= ReceivedMethodCall   Serial (Maybe BusName) MethodCall
+	| ReceivedMethodReturn Serial (Maybe BusName) MethodReturn
+	| ReceivedError        Serial (Maybe BusName) Error
+	| ReceivedSignal       Serial (Maybe BusName) Signal
+	| ReceivedUnknown      Serial (Maybe BusName) Unknown
 	deriving (Show, Eq)
 :
 
-:f DBus/Message/Internal.hs
+:d DBus.Message
 receivedSerial :: ReceivedMessage -> Serial
 receivedSerial (ReceivedMethodCall   s _ _) = s
 receivedSerial (ReceivedMethodReturn s _ _) = s
@@ -355,8 +283,8 @@
 receivedSerial (ReceivedUnknown      s _ _) = s
 :
 
-:f DBus/Message/Internal.hs
-receivedSender :: ReceivedMessage -> Maybe T.BusName
+:d DBus.Message
+receivedSender :: ReceivedMessage -> Maybe BusName
 receivedSender (ReceivedMethodCall   _ s _) = s
 receivedSender (ReceivedMethodReturn _ s _) = s
 receivedSender (ReceivedError        _ s _) = s
@@ -364,18 +292,11 @@
 receivedSender (ReceivedUnknown      _ s _) = s
 :
 
-:f DBus/Message/Internal.hs
-receivedBody :: ReceivedMessage -> [T.Variant]
+:d DBus.Message
+receivedBody :: ReceivedMessage -> [Variant]
 receivedBody (ReceivedMethodCall   _ _ x) = messageBody x
 receivedBody (ReceivedMethodReturn _ _ x) = messageBody x
 receivedBody (ReceivedError        _ _ x) = messageBody x
 receivedBody (ReceivedSignal       _ _ x) = messageBody x
 receivedBody (ReceivedUnknown      _ _ x) = unknownBody x
-:
-
-:d message exports
-, ReceivedMessage (..)
-, receivedSerial
-, receivedSender
-, receivedBody
 :
diff --git a/src/module-headers.anansi b/src/module-headers.anansi
new file mode 100644
--- /dev/null
+++ b/src/module-headers.anansi
@@ -0,0 +1,504 @@
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\section{Module headers}
+
+:f DBus/Types.hs
+|copyright|
+module DBus.Types
+	( Type(..)
+	
+	, Signature
+	, signature
+	, signature_
+	, signatureText
+	, signatureTypes
+	
+	, IsValue
+	, IsAtom
+	, typeOf
+	
+	, Variant
+	, IsVariant(..)
+	, variantType
+	
+	, ObjectPath
+	, objectPath
+	, objectPath_
+	, objectPathText
+	
+	, InterfaceName
+	, interfaceName
+	, interfaceName_
+	, interfaceNameText
+	
+	, MemberName
+	, memberName
+	, memberName_
+	, memberNameText
+	
+	, ErrorName
+	, errorName
+	, errorName_
+	, errorNameText
+	
+	, BusName
+	, busName
+	, busName_
+	, busNameText
+	
+	, Structure
+	, Array
+	, Dictionary
+	, structureItems
+	, arrayItems
+	, dictionaryItems
+	) where
+import           DBus.Types.Internal hiding (typeOf)
+import qualified DBus.Types.Internal
+
+typeOf :: IsValue a => a -> Type
+typeOf = DBus.Types.Internal.typeOf
+:
+
+:f DBus/Types/Internal.hs
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE IncoherentInstances #-}
+|copyright|
+module DBus.Types.Internal where
+import           Control.Monad (liftM, when, (>=>))
+import           Data.ByteString (ByteString)
+import qualified Data.ByteString
+import qualified Data.ByteString.Char8
+import qualified Data.ByteString.Lazy
+import qualified Data.ByteString.Unsafe
+import           Data.Int
+import           Data.List (intercalate)
+import qualified Data.Map
+import           Data.Map (Map)
+import qualified Data.String
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
+import qualified Data.Text.Lazy
+import qualified Data.Vector
+import           Data.Vector (Vector)
+import           Data.Word
+import qualified Foreign
+import           System.IO.Unsafe (unsafePerformIO)
+
+|text validation imports|
+
+import           DBus.Util (void)
+
+|DBus.Types|
+|text validation|
+:
+
+:f DBus/Message.hs
+|copyright|
+module DBus.Message
+	( Message ( messageFlags
+	          , messageBody
+	          )
+	, Flag (..)
+	, Serial
+	, serialValue
+	, Unknown (..)
+	, MethodCall (..)
+	, MethodReturn (..)
+	, Error (..)
+	, errorMessage
+	, Signal (..)
+	, ReceivedMessage (..)
+	, receivedSerial
+	, receivedSender
+	, receivedBody
+	) where
+import DBus.Message.Internal
+:
+
+:f DBus/Message/Internal.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Message.Internal where
+import           Data.Maybe (fromMaybe)
+import qualified Data.Set
+import           Data.Set (Set)
+import qualified Data.Text
+import           Data.Text (Text)
+import           Data.Word (Word8, Word32)
+
+import           DBus.Types hiding (errorName)
+import           DBus.Util (maybeIndex)
+
+|DBus.Message|
+:
+
+:f DBus/Wire.hs
+|copyright|
+module DBus.Wire
+	( Endianness (..)
+	, MarshalError
+	, UnmarshalError
+	, marshalMessage
+	, unmarshalMessage
+	) where
+import DBus.Wire.Internal
+:
+
+:f DBus/Wire/Internal.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Wire.Internal where
+import Control.Monad (liftM, when, unless)
+
+import qualified Data.Binary.Builder
+import qualified Data.Binary.Get
+import           Data.Binary.Put (runPut)
+import           Data.Bits ((.&.), (.|.))
+import qualified Data.ByteString
+import           Data.ByteString (ByteString)
+import qualified Data.ByteString.Char8
+import qualified Data.ByteString.Lazy
+import           Data.Int (Int16, Int32, Int64)
+import qualified Data.Map
+import           Data.Map (Map)
+import           Data.Maybe (fromJust, listToMaybe, fromMaybe)
+import qualified Data.Set
+import           Data.Set (Set)
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
+import qualified Data.Vector
+import           Data.Vector (Vector)
+import           Data.Word (Word8, Word16, Word32, Word64)
+
+import qualified Data.Binary.IEEE754
+
+import           DBus.Message.Internal
+import           DBus.Types.Internal
+import           DBus.Util (void, untilM)
+import qualified DBus.Util.MonadError as E
+
+|DBus.Wire|
+:
+
+:f DBus/Address.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Address
+	( Address
+	, addressMethod
+	, addressParameters
+	, address
+	, addresses
+	, addressText
+	
+	-- * Environmental addresses
+	, getSystem
+	, getSession
+	, getStarter
+	) where
+import qualified Control.Exception
+import           Data.Char (ord, chr)
+import qualified Data.Map
+import           Data.Map (Map)
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified System.Environment
+import           Text.Printf (printf)
+import           Text.ParserCombinators.Parsec hiding (runParser)
+
+import           DBus.Util (hexToInt, void)
+import           DBus.Types.Internal (runParser)
+|DBus.Address|
+:
+
+:f DBus/Connection.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Connection
+	( Connection
+	, ConnectionError
+	, connect
+	, disconnect
+	, send
+	, receive
+	
+	-- * Authentication
+	, Mechanism
+	, mechanism
+	, external
+	
+	-- * Transports
+	, Transport
+	, Socket
+	, transport
+	, socket
+	, socketPut
+	, socketGet
+	
+	, unix
+	, tcp
+	) where
+import           Control.Concurrent
+import           Control.Monad (when)
+import           Data.IORef
+
+import           DBus.Address
+import           DBus.Connection.Authentication
+import           DBus.Connection.Error
+import           DBus.Connection.Transport
+import           DBus.Message.Internal
+import           DBus.Wire
+import           DBus.Wire.Internal (unmarshalMessageM)
+
+|DBus.Connection|
+:
+
+:f DBus/Connection/Authentication.hs
+|copyright|
+module DBus.Connection.Authentication
+	( Mechanism
+	, mechanism
+	, authenticate
+	, external
+	) where
+
+import           Prelude hiding (getLine, head)
+import           Control.Monad (liftM)
+import qualified Data.ByteString
+import qualified Data.ByteString.Char8
+import           Data.Char (ord)
+import qualified System.Posix.User
+import           Text.Printf (printf)
+
+import           DBus.Connection.Transport
+import           DBus.Util (readUntil, dropEnd)
+
+|DBus.Connection.Authentication|
+:
+
+:f DBus/Connection/Error.hs
+{-# LANGUAGE DeriveDataTypeable #-}
+|copyright|
+module DBus.Connection.Error where
+import           Control.Exception (Exception, throwIO)
+import           Data.Typeable (Typeable)
+|DBus.Connection.Error|
+:
+
+:f DBus/Connection/Transport.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Connection.Transport
+	( Transport
+	, transport
+	, Socket
+	, socket
+	, socketPut
+	, socketGet
+	, socketClose
+	, tcp
+	, unix
+	, connectTransport
+	) where
+
+import qualified Control.Exception
+import           Control.Monad (unless)
+import qualified Data.Binary.Get
+import qualified Data.Binary.Put
+import qualified Data.ByteString
+import           Data.ByteString (ByteString)
+import qualified Data.Map
+import qualified Data.Text
+import           Data.Text (Text)
+import           Data.Word (Word32)
+import qualified Network
+import qualified Network.Socket
+import qualified System.IO
+import           Text.ParserCombinators.Parsec
+
+import           DBus.Address
+import           DBus.Connection.Error
+
+|DBus.Connection.Transport|
+:
+
+:f DBus/Client.hs
+|copyright|
+module DBus.Client
+	(
+	-- * Clients
+	  Client
+	, connect
+	, attach
+	, disconnect
+	, call
+	, call_
+	
+	-- * Listening for signals
+	, MatchRule(..)
+	, listen
+	
+	-- * Exporting objects
+	, Method
+	, Reply(..)
+	, throwError
+	, method
+	, export
+	
+	-- * Other
+	, setMessageProcessor
+	) where
+import           DBus.Client.Internal
+:
+
+:f DBus/Client/Internal.hs
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+|copyright|
+module DBus.Client.Internal where
+import           Control.Concurrent
+import           Control.Exception (SomeException)
+import qualified Control.Exception
+import           Control.Monad (forever, unless)
+import           Control.Monad.Fix (mfix)
+import           Data.IORef
+import           Data.List (foldl')
+import qualified Data.Map
+import           Data.Map (Map)
+import           Data.Maybe (isJust, catMaybes)
+import           Data.Text (Text)
+import qualified Data.Text
+import           Data.Typeable (Typeable)
+import qualified Data.Set
+
+import           DBus.Address
+import qualified DBus.Connection
+import           DBus.Connection (Connection)
+import           DBus.Connection.Authentication (external)
+import           DBus.Connection.Transport (unix, tcp)
+import           DBus.Connection.Error
+import qualified DBus.Constants
+import           DBus.Constants ( errorFailed, errorUnknownMethod
+                                , errorInvalidParameters)
+import           DBus.Message
+import qualified DBus.Introspection
+import           DBus.Types
+import           DBus.Types.Internal (Signature(..))
+import           DBus.Util (void)
+
+|DBus.Client|
+:
+
+:f DBus/Client/Simple.hs
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE OverlappingInstances #-}
+|copyright|
+module DBus.Client.Simple
+	(
+	-- * Clients
+	  Client
+	, connectSystem
+	, connectSession
+	, connectStarter
+	, disconnect
+	
+	-- * Proxies
+	, Proxy
+	, proxy
+	, call
+	, DBus.Client.Simple.listen
+	
+	-- * Name reservation
+	, RequestNameFlag(..)
+	, RequestNameReply(..)
+	, ReleaseNameReply(..)
+	, requestName
+	, releaseName
+	
+	-- * Exporting objects
+	, Method
+	, AutoSignature
+	, AutoReply
+	, method
+	, export
+	, throwError
+	
+	-- * Re-exported modules
+	, module DBus.Types
+	) where
+
+import qualified Control.Exception
+import           Data.Bits ((.|.))
+import qualified Data.Text -- for haddock
+import qualified Data.Set
+import           Data.Word (Word32)
+
+import           DBus.Address
+import           DBus.Client hiding (call, method, export)
+import qualified DBus.Client
+import           DBus.Connection.Error
+import           DBus.Constants (errorInvalidParameters)
+import           DBus.Message hiding (errorName)
+import           DBus.Types
+import           DBus.Types.Internal (checkSignature)
+import           DBus.Util (maybeIndex)
+
+|DBus.Client.Simple|
+:
+
+:f DBus/Introspection.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Introspection
+	( Object (..)
+	, Interface (..)
+	, Method (..)
+	, Signal (..)
+	, Parameter (..)
+	, Property (..)
+	, PropertyAccess (..)
+	, toXML
+	, fromXML
+	) where
+import           Control.Monad ((>=>))
+import           Control.Monad.ST (runST)
+import           Data.Maybe (fromMaybe)
+import qualified Data.STRef as ST
+import qualified Data.Text
+import           Data.Text (Text)
+import qualified Data.Text.Encoding
+import qualified Data.XML.Types as X
+import qualified Text.XML.LibXML.SAX as SAX
+
+import qualified DBus.Types as T
+
+|DBus.Introspection|
+:
+
+:f DBus/Constants.hs
+{-# LANGUAGE OverloadedStrings #-}
+|copyright|
+module DBus.Constants where
+import           DBus.Types
+
+|DBus.Constants|
+:
+
diff --git a/src/name-reservation.anansi b/src/name-reservation.anansi
deleted file mode 100644
--- a/src/name-reservation.anansi
+++ /dev/null
@@ -1,137 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{Name reservation}
-
-The central bus allows clients to register a well-known bus name, which
-enables other clients to connect with or start a particular application.
-
-:f DBus/NameReservation.hs
-|copyright|
-{-# LANGUAGE OverloadedStrings #-}
-module DBus.NameReservation
-	( RequestNameFlag (..)
-	, RequestNameReply (..)
-	, ReleaseNameReply (..)
-	, requestName
-	, releaseName
-	, mkRequestNameReply
-	, mkReleaseNameReply
-	) where
-import Data.Word (Word32)
-import Data.Bits ((.|.))
-import qualified Data.Set as Set
-import qualified DBus.Types as T
-import qualified DBus.Message as M
-import qualified DBus.Constants as C
-import DBus.Util (maybeIndex)
-:
-
-:f DBus/NameReservation.hs
-data RequestNameFlag
-	= AllowReplacement
-	| ReplaceExisting
-	| DoNotQueue
-	deriving (Show)
-:
-
-:f DBus/NameReservation.hs
-encodeFlags :: [RequestNameFlag] -> Word32
-encodeFlags = foldr (.|.) 0 . map flagValue where
-	flagValue AllowReplacement = 0x1
-	flagValue ReplaceExisting  = 0x2
-	flagValue DoNotQueue       = 0x4
-:
-
-There are only two methods of interest here, {\tt RequestName} and
-{\tt ReleaseName}.
-
-:f DBus/NameReservation.hs
-|apidoc requestName|
-requestName :: T.BusName -> [RequestNameFlag] -> M.MethodCall
-requestName name flags = M.MethodCall
-	{ M.methodCallPath = C.dbusPath
-	, M.methodCallInterface = Just C.dbusInterface
-	, M.methodCallDestination = Just C.dbusName
-	, M.methodCallFlags = Set.empty
-	, M.methodCallMember = "RequestName"
-	, M.methodCallBody =
-		[ T.toVariant name
-		, T.toVariant . encodeFlags $ flags]
-	}
-:
-
-:f DBus/NameReservation.hs
-data RequestNameReply
-	= PrimaryOwner
-	| InQueue
-	| Exists
-	| AlreadyOwner
-	deriving (Show)
-:
-
-:f DBus/NameReservation.hs
-mkRequestNameReply :: M.MethodReturn -> Maybe RequestNameReply
-mkRequestNameReply msg =
-	maybeIndex (M.messageBody msg) 0 >>=
-	T.fromVariant >>=
-	decodeRequestReply
-:
-
-:f DBus/NameReservation.hs
-decodeRequestReply :: Word32 -> Maybe RequestNameReply
-decodeRequestReply 1 = Just PrimaryOwner
-decodeRequestReply 2 = Just InQueue
-decodeRequestReply 3 = Just Exists
-decodeRequestReply 4 = Just AlreadyOwner
-decodeRequestReply _ = Nothing
-:
-
-:f DBus/NameReservation.hs
-|apidoc releaseName|
-releaseName :: T.BusName -> M.MethodCall
-releaseName name = M.MethodCall
-	{ M.methodCallPath = C.dbusPath
-	, M.methodCallInterface = Just C.dbusInterface
-	, M.methodCallDestination = Just C.dbusName
-	, M.methodCallFlags = Set.empty
-	, M.methodCallMember = "ReleaseName"
-	, M.methodCallBody = [T.toVariant name]
-	}
-:
-
-:f DBus/NameReservation.hs
-data ReleaseNameReply
-	= Released
-	| NonExistent
-	| NotOwner
-	deriving (Show)
-:
-
-:f DBus/NameReservation.hs
-mkReleaseNameReply :: M.MethodReturn -> Maybe ReleaseNameReply
-mkReleaseNameReply msg =
-	maybeIndex (M.messageBody msg) 0 >>=
-	T.fromVariant >>=
-	decodeReleaseReply
-:
-
-:f DBus/NameReservation.hs
-decodeReleaseReply :: Word32 -> Maybe ReleaseNameReply
-decodeReleaseReply 1 = Just Released
-decodeReleaseReply 2 = Just NonExistent
-decodeReleaseReply 3 = Just NotOwner
-decodeReleaseReply _ = Nothing
-:
diff --git a/src/summary.anansi b/src/summary.anansi
new file mode 100644
--- /dev/null
+++ b/src/summary.anansi
@@ -0,0 +1,30 @@
+:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\section*{Summary}
+
+D-Bus is a low-latency, asynchronous IPC protocol. It is primarily used on
+Linux, BSD, and other free UNIX-like systems. More information is available
+at \url{http://dbus.freedesktop.org/}.
+
+This package is an implementation of the D-Bus protocol. It is intended
+for use in either a client or server, though currently only the client
+portion of connection establishment is implemented. Additionally, it
+implements the introspection file format.
+
+\vfill
+
+\noindent Homepage: \href{https://john-millikin.com/software/dbus-core/}
+                         {\small \tt https://john-millikin.com/software/dbus-core/}
diff --git a/src/types.anansi b/src/types.anansi
--- a/src/types.anansi
+++ b/src/types.anansi
@@ -1,1358 +1,1731 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{Types}
-
-The {\tt DBus.Types module} defines interfaces for storing, building, and
-deconstructing D-Bus values. Everything is defined in an internal module, and
-then exported via the public interface.
-
-:f DBus/Types.hs
-|copyright|
-module DBus.Types (
-	|type exports|
-	) where
-import DBus.Types.Internal
-:
-
-:f DBus/Types/Internal.cpphs
-|copyright|
-|text extensions|
-|type extensions|
-module DBus.Types.Internal where
-|text imports|
-|type imports|
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Char8 as B8
-import qualified Data.ByteString.Lazy as BL
-import qualified Data.ByteString.Char8 as BL8
-:
-
-D-Bus types are divided into two categories, ``atomic'' and ``container''
-types. Atoms are actual values -- strings, numbers, etc. Containers store
-atoms and other containers. The most interesting difference between the two
-is that atoms may be used as the keys in associative mappings
-(``dictionaries'').
-
-Internally, types are represented using an enumeration.
-
-:f DBus/Types/Internal.cpphs
-data Type
-	= DBusBoolean
-	| DBusByte
-	| DBusInt16
-	| DBusInt32
-	| DBusInt64
-	| DBusWord16
-	| DBusWord32
-	| DBusWord64
-	| DBusDouble
-	| DBusString
-	| DBusSignature
-	| DBusObjectPath
-	| DBusVariant
-	| DBusArray Type
-	| DBusDictionary Type Type
-	| DBusStructure [Type]
-	deriving (Show, Eq)
-:
-
-:f DBus/Types/Internal.cpphs
-|apidoc isAtomicType|
-isAtomicType :: Type -> Bool
-isAtomicType DBusBoolean    = True
-isAtomicType DBusByte       = True
-isAtomicType DBusInt16      = True
-isAtomicType DBusInt32      = True
-isAtomicType DBusInt64      = True
-isAtomicType DBusWord16     = True
-isAtomicType DBusWord32     = True
-isAtomicType DBusWord64     = True
-isAtomicType DBusDouble     = True
-isAtomicType DBusString     = True
-isAtomicType DBusSignature  = True
-isAtomicType DBusObjectPath = True
-isAtomicType _              = False
-:
-
-Each type can be converted to a textual representation, used in ``type
-signatures'' or for debugging.
-
-:f DBus/Types/Internal.cpphs
-|apidoc typeCode|
-typeCode :: Type -> Text
-|type codes|
-:
-
-:d type exports
-  -- * Available types
-  Type (..)
-, typeCode
-:
-
-:f Tests.hs
-instance Arbitrary Type where
-	arbitrary = oneof [atomicType, containerType]
-
-atomicType :: Gen Type
-atomicType = elements
-	[ DBusBoolean
-	, DBusByte
-	, DBusWord16
-	, DBusWord32
-	, DBusWord64
-	, DBusInt16
-	, DBusInt32
-	, DBusInt64
-	, DBusDouble
-	, DBusString
-	, DBusObjectPath
-	, DBusSignature
-	]
-
-containerType :: Gen Type
-containerType = do
-	c <- choose (0,3) :: Gen Int
-	case c of
-		0 -> fmap DBusArray arbitrary
-		1 -> do
-			kt <- atomicType
-			vt <- arbitrary
-			return $ DBusDictionary kt vt
-		2 -> fmap DBusStructure $ halfSized arbitrary
-		3 -> return DBusVariant
-:
-
-\subsection{Variants}
-
-A wrapper type is needed for safely storing generic D-Bus values in Haskell.
-The D-Bus ``variant'' type is perfect for this, because variants may store
-any D-Bus value.
-
-Any type which is an instance of {\tt Variable} is considered a valid
-D-Bus value, because it can be used to construct {\tt Variant}s. However,
-outside of this module, {\tt Variant}s can only be constructed from
-pre-defined types.
-
-:f DBus/Types/Internal.cpphs
-|apidoc Variant|
-data Variant
-	= VarBoxBool Bool
-	| VarBoxWord8 Word8
-	| VarBoxInt16 Int16
-	| VarBoxInt32 Int32
-	| VarBoxInt64 Int64
-	| VarBoxWord16 Word16
-	| VarBoxWord32 Word32
-	| VarBoxWord64 Word64
-	| VarBoxDouble Double
-	| VarBoxString Text
-	| VarBoxSignature Signature
-	| VarBoxObjectPath ObjectPath
-	| VarBoxVariant Variant
-	| VarBoxArray Array
-	| VarBoxDictionary Dictionary
-	| VarBoxStructure Structure
-	deriving (Eq)
-
-class Variable a where
-	toVariant :: a -> Variant
-	fromVariant :: Variant -> Maybe a
-:
-
-:d type exports
-  -- * Variants
-, Variant
-, Variable (..)
-:
-
-Variants can be printed, for debugging purposes -- this instance shouldn't
-be parsed or inspected or anything like that, since the output format might
-change drastically.
-
-:f DBus/Types/Internal.cpphs
-instance Show Variant where
-	showsPrec d var = showParen (d > 10) full where
-		full = s "Variant " . shows code . s " " . valueStr
-		code = typeCode $ variantType var
-		s = showString
-		valueStr = showsPrecVar 11 var
-
-showsPrecVar :: Int -> Variant -> ShowS
-showsPrecVar d var = case var of
-	(VarBoxBool x) -> showsPrec d x
-	(VarBoxWord8 x) -> showsPrec d x
-	(VarBoxInt16 x) -> showsPrec d x
-	(VarBoxInt32 x) -> showsPrec d x
-	(VarBoxInt64 x) -> showsPrec d x
-	(VarBoxWord16 x) -> showsPrec d x
-	(VarBoxWord32 x) -> showsPrec d x
-	(VarBoxWord64 x) -> showsPrec d x
-	(VarBoxDouble x) -> showsPrec d x
-	(VarBoxString x) -> showsPrec d x
-	(VarBoxSignature x) -> showsPrec d x
-	(VarBoxObjectPath x) -> showsPrec d x
-	(VarBoxVariant x) -> showsPrec d x
-	(VarBoxArray x) -> showsPrec d x
-	(VarBoxDictionary x) -> showsPrec d x
-	(VarBoxStructure x) -> showsPrec d x
-:
-
-Since many operations on D-Bus values depend on having the correct type,
-{\tt variantType} is used to retrieve which type is actually stored within
-a {\tt Variant}.
-
-:f DBus/Types/Internal.cpphs
-|apidoc variantType|
-variantType :: Variant -> Type
-variantType var = case var of
-	(VarBoxBool _) -> DBusBoolean
-	(VarBoxWord8 _) -> DBusByte
-	(VarBoxInt16 _) -> DBusInt16
-	(VarBoxInt32 _) -> DBusInt32
-	(VarBoxInt64 _) -> DBusInt64
-	(VarBoxWord16 _) -> DBusWord16
-	(VarBoxWord32 _) -> DBusWord32
-	(VarBoxWord64 _) -> DBusWord64
-	(VarBoxDouble _) -> DBusDouble
-	(VarBoxString _) -> DBusString
-	(VarBoxSignature _) -> DBusSignature
-	(VarBoxObjectPath _) -> DBusObjectPath
-	(VarBoxVariant _) -> DBusVariant
-	(VarBoxArray x) -> DBusArray (arrayType x)
-	(VarBoxDictionary x) -> let
-		keyT = dictionaryKeyType x
-		valueT = dictionaryValueType x
-		in DBusDictionary keyT valueT
-	(VarBoxStructure x) -> let
-		Structure items = x
-		in DBusStructure (map variantType items)
-
-variantSignature :: Variant -> Maybe Signature
-variantSignature = mkBytesSignature . typeCodeB . variantType
-:
-
-:d type exports
-, variantType
-:
-
-A macro is useful for reducing verbosity in simple {\tt Variable}
-instances.
-
-:f DBus/Types/Internal.cpphs
-#define INSTANCE_VARIABLE(TYPE) \
-	instance Variable TYPE where \
-		{ toVariant = VarBox/**/TYPE \
-		; fromVariant (VarBox/**/TYPE x) = Just x \
-		; fromVariant _ = Nothing \
-		}
-:
-
-Since {\tt Variant}s are D-Bus values themselves, they can be stored in variants.
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Variant)
-:
-
-For testing, {\tt Variant}s are usually generated by type.
-
-:f Tests.hs
-instance Arbitrary Variant where
-	arbitrary = arbitrary >>= genVariant
-
-genVariant :: Type -> Gen Variant
-genVariant t = case t of
-	DBusBoolean          -> fmap toVariant (arbitrary :: Gen Bool)
-	DBusByte             -> fmap toVariant (arbitrary :: Gen Word8)
-	DBusWord16           -> fmap toVariant (arbitrary :: Gen Word16)
-	DBusWord32           -> fmap toVariant (arbitrary :: Gen Word32)
-	DBusWord64           -> fmap toVariant (arbitrary :: Gen Word64)
-	DBusInt16            -> fmap toVariant (arbitrary :: Gen Int16)
-	DBusInt32            -> fmap toVariant (arbitrary :: Gen Int32)
-	DBusInt64            -> fmap toVariant (arbitrary :: Gen Int64)
-	DBusDouble           -> fmap toVariant (arbitrary :: Gen Double)
-	DBusString           -> fmap toVariant (arbitrary :: Gen String)
-	DBusObjectPath       -> fmap toVariant (arbitrary :: Gen ObjectPath)
-	DBusSignature        -> fmap toVariant (arbitrary :: Gen Signature)
-	(DBusArray _)        -> fmap toVariant (arbitrary :: Gen Array)
-	(DBusDictionary _ _) -> fmap toVariant (arbitrary :: Gen Dictionary)
-	(DBusStructure _)    -> fmap toVariant (arbitrary :: Gen Structure)
-	DBusVariant          -> fmap toVariant (arbitrary :: Gen Variant)
-:
-
-\subsection{Numerics}
-
-D-Bus supports most common numeric types:
-
-\begin{table}[h]
-\caption{D-Bus Numeric types}
-\begin{center}
-\begin{tabular}{ll}
-\toprule
-Type        & Description \\
-\midrule
-Boolean     & Either {\tt True} or {\tt False} \\
-Byte        & 8-bit unsigned integer \\
-Int16       & 16-bit signed integer \\
-Int32       & 32-bit signed integer \\
-Int64       & 64-bit signed integer \\
-Word16      & 16-bit unsigned integer \\
-Word32      & 32-bit unsigned integer \\
-Word64      & 64-bit unsigned integer \\
-Double      & 64-bit IEEE754 floating-point \\
-\bottomrule
-\end{tabular}
-\end{center}
-\end{table}
-
-All D-Bus numeric types are fixed-length, so the {\tt Int} and {\tt Integer}
-types can't be used. Instead, instances for the fixed-length integer types
-are defined and any others will have to be converted.
-
-:d type imports
-import Data.Word (Word8, Word16, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-:
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Bool)
-INSTANCE_VARIABLE(Word8)
-INSTANCE_VARIABLE(Int16)
-INSTANCE_VARIABLE(Int32)
-INSTANCE_VARIABLE(Int64)
-INSTANCE_VARIABLE(Word16)
-INSTANCE_VARIABLE(Word32)
-INSTANCE_VARIABLE(Word64)
-INSTANCE_VARIABLE(Double)
-:
-
-\subsection{Strings}
-
-Strings are a weird case; the built-in type, {\tt String}, is horribly
-inefficent. To provide better performance for large strings, packed Unicode
-strings defined in {\tt Data.Text} are used internally.
-
-:f DBus/Types/Internal.cpphs
-instance Variable TL.Text where
-	toVariant = VarBoxString
-	fromVariant (VarBoxString x) = Just x
-	fromVariant _ = Nothing
-:
-
-There's two different {\tt Text} types, strict and lazy. It'd be a pain
-to store both and have to convert later, so instead, all strict {\tt Text}
-values are converted to lazy values.
-
-:d type imports
-import qualified Data.Text as T
-:
-
-:f DBus/Types/Internal.cpphs
-instance Variable T.Text where
-	toVariant = toVariant . TL.fromChunks . (:[])
-	fromVariant = fmap (T.concat . TL.toChunks) . fromVariant
-:
-
-Built-in {\tt String}s can still be stored, of course, but it requires
-a language extension.
-
-:d type extensions
-{-# LANGUAGE TypeSynonymInstances #-}
-:
-
-:f DBus/Types/Internal.cpphs
-instance Variable String where
-	toVariant = toVariant . TL.pack
-	fromVariant = fmap TL.unpack . fromVariant
-:
-
-All this is verified using some QuickCheck properties
-
-:d test cases
-, F.testGroup "String"
-	[ testProperty "String -> strict Text"
-		$ funEq (fromVariant . toVariant) (Just . T.pack)
-	, testProperty "String <- strict Text"
-		$ funEq (fromVariant . toVariant) (Just . T.unpack)
-	, testProperty "String -> lazy Text"
-		$ funEq (fromVariant . toVariant) (Just . TL.pack)
-	, testProperty "String <- lazy Text"
-		$ funEq (fromVariant . toVariant) (Just . TL.unpack)
-	, testProperty "Strict Text -> lazy Text"
-		$ funEq (fromVariant . toVariant) (Just . TL.pack . T.unpack)
-	, testProperty "Strict Text <- lazy Text"
-		$ funEq (fromVariant . toVariant) (Just . T.pack . TL.unpack)
-	]
-:
-
-\subsection{Signatures}
-
-Valid D-Bus types must obey certain rules, such as ``dict keys must be
-atomic'', which are difficult to express in the Haskell type system.  A
-{\tt Signature} is guaranteed to be valid according to these rules. Creating
-one requires using the {\tt mkSignature} function, which will convert a valid
-D-Bus signature string into a {\tt Signature}.
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Signature)
-data Signature = Signature { signatureTypes :: [Type] }
-	deriving (Eq)
-
-instance Show Signature where
-	showsPrec d x = showParen (d > 10) $
-		showString "Signature " . shows (strSignature x)
-:
-
-Signatures can also be converted back into text, by concatenating the
-type codes of their contained types.
-
-:f DBus/Types/Internal.cpphs
-bytesSignature :: Signature -> B.ByteString
-bytesSignature (Signature ts) = B.concat $ map typeCodeB ts
-
-strSignature :: Signature -> Text
-strSignature (Signature ts) = TL.concat $ map typeCode ts
-:
-
-It doesn't make much sense to sort signatures, but since they can be used
-as dictionary keys, it's useful to have them as an instance of {\tt Ord}.
-
-:d type imports
-import Data.Ord (comparing)
-:
-
-:f DBus/Types/Internal.cpphs
-instance Ord Signature where
-	compare = comparing strSignature
-:
-
-:d type exports
-  -- * Signatures
-, Signature
-, signatureTypes
-, strSignature
-:
-
-\subsubsection{Type codes}
-
-For atomic types, the type code is a single letter. Arrays, structures,
-and dictionary types are multiple characters.
-
-:d type imports
-import Data.Text.Encoding (decodeUtf8)
-:
-
-:d type codes
-typeCode t = TL.fromChunks [decodeUtf8 $ typeCodeB t]
-
-typeCodeB :: Type -> B.ByteString
-typeCodeB DBusBoolean    = "b"
-typeCodeB DBusByte       = "y"
-typeCodeB DBusInt16      = "n"
-typeCodeB DBusInt32      = "i"
-typeCodeB DBusInt64      = "x"
-typeCodeB DBusWord16     = "q"
-typeCodeB DBusWord32     = "u"
-typeCodeB DBusWord64     = "t"
-typeCodeB DBusDouble     = "d"
-typeCodeB DBusString     = "s"
-typeCodeB DBusSignature  = "g"
-typeCodeB DBusObjectPath = "o"
-typeCodeB DBusVariant    = "v"
-:
-
-An array's type code is ``a'' followed by the type it contains. For example,
-an array of booleans would have the type string ``ab''.
-
-:d type codes
-typeCodeB (DBusArray t) = B8.cons 'a' $ typeCodeB t
-:
-
-A dictionary's type code is ``a\{$key\_type$ $value\_type$\}''. For example,
-a dictionary of bytes to booleans would have the type string ``a\{yb\}''.
-
-:d type codes
-typeCodeB (DBusDictionary k v) = B.concat ["a{", typeCodeB k, typeCodeB v, "}"]
-:
-
-A structure's type code is the concatenation of its contained types,
-wrapped by ``('' and ``)''. Structures may be empty, in which case their
-type code is simply ``()''.
-
-:d type codes
-typeCodeB (DBusStructure ts) = B.concat $
-	["("] ++ map typeCodeB ts ++ [")"]
-:
-
-\subsubsection{Parsing}
-
-When parsing, additional restrictions apply which are not inherent to the
-D-Bus type system. The signature parsing functions guarantee that any
-{\tt Signature} is valid according to D-Bus rules.
-
-Signature parsing is the most common operation when unmarshaling messages;
-therefore, an efficient parsing implementation is essential.
-
-Since all valid signatures as entirely ASCII, it's possible to parse them
-using byte-based parsers for better performance. These aren't exported from
-the public interface, but are still used within {\tt DBus.Wire} modules.
-
-:d type imports
-import qualified Data.ByteString.Unsafe as B
-import qualified Foreign as F
-import System.IO.Unsafe (unsafePerformIO)
-:
-
-There are three special cases which can be optimized:
-
-\begin{enumerate}
-\item Empty signatures occur when messages have no body, and can use a constant
-      result.
-\item Single-character signatures occur when parsing variants, and can use a
-      faster atom-only parser.
-\item Signatures larger than 255 characters are invalid.
-\end{enumerate}
-
-:f DBus/Types/Internal.cpphs
-mkBytesSignature :: B.ByteString -> Maybe Signature
-mkBytesSignature = unsafePerformIO . flip B.unsafeUseAsCStringLen io where
-	|fast signature parser|
-	|slow signature parser|
-	
-	io (cstr, len) = case len of
-		0 -> return $ Just $ Signature []
-		1 -> fmap fast $ F.peek cstr
-		_ | len <= 255 -> slow (F.castPtr cstr) len
-		_ -> return Nothing
-:
-
-:d fast signature parser
-parseAtom c yes no = case c of
-	0x62 -> yes DBusBoolean
-	0x79 -> yes DBusByte
-	0x6E -> yes DBusInt16
-	0x69 -> yes DBusInt32
-	0x78 -> yes DBusInt64
-	0x71 -> yes DBusWord16
-	0x75 -> yes DBusWord32
-	0x74 -> yes DBusWord64
-	0x64 -> yes DBusDouble
-	0x73 -> yes DBusString
-	0x67 -> yes DBusSignature
-	0x6F -> yes DBusObjectPath
-	_ -> no
-
-fast c = parseAtom c (\t -> Just (Signature [t])) $ case c of
-	0x76 -> Just (Signature [DBusVariant])
-	_ -> Nothing
-:
-
-:d slow signature parser
-slow :: F.Ptr Word8 -> Int -> IO (Maybe Signature)
-slow buf len = loop [] 0 where
-	loop acc ii | ii >= len = return . Just . Signature $ reverse acc
-	loop acc ii = do
-		c <- F.peekElemOff buf ii
-		let next t = loop (t : acc) (ii + 1)
-		parseAtom c next $ case c of
-			0x76 -> next DBusVariant
-			
-			-- '('
-			0x28 -> do
-				mt <- structure buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> loop (t : acc) ii'
-					Nothing -> return Nothing
-			
-			-- 'a'
-			0x61 -> do
-				mt <- array buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> loop (t : acc) ii'
-					Nothing -> return Nothing
-			
-			_ -> return Nothing
-:
-
-:d slow signature parser
-structure :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-structure buf len = loop [] where
-	loop _ ii | ii >= len = return Nothing
-	loop acc ii = do
-		c <- F.peekElemOff buf ii
-		let next t = loop (t : acc) (ii + 1)
-		parseAtom c next $ case c of
-			0x76 -> next DBusVariant
-			
-			-- '('
-			0x28 -> do
-				mt <- structure buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> loop (t : acc) ii'
-					Nothing -> return Nothing
-			
-			-- ')'
-			0x29 -> return $ Just $ (ii + 1, DBusStructure (reverse acc))
-			
-			-- 'a'
-			0x61 -> do
-				mt <- array buf len (ii + 1)
-				case mt of
-					Just (ii', t) -> loop (t : acc) ii'
-					Nothing -> return Nothing
-			
-			_ -> return Nothing
-:
-
-:d slow signature parser
-array :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-array _   len ii | ii >= len = return Nothing
-array buf len ii = do
-	c <- F.peekElemOff buf ii
-	let next t = return $ Just (ii + 1, DBusArray t)
-	parseAtom c next $ case c of
-		0x76 -> next DBusVariant
-		
-		-- '('
-		0x28 -> do
-			mt <- structure buf len (ii + 1)
-			case mt of
-				Just (ii', t) -> return $ Just (ii', DBusArray t)
-				Nothing -> return Nothing
-		
-		-- '{'
-		0x7B -> dict buf len (ii + 1)
-		
-		-- 'a'
-		0x61 -> do
-			mt <- array buf len (ii + 1)
-			case mt of
-				Just (ii', t) -> return $ Just (ii', DBusArray t)
-				Nothing -> return Nothing
-		
-		_ -> return Nothing
-:
-
-:d slow signature parser
-dict :: F.Ptr Word8 -> Int -> Int -> IO (Maybe (Int, Type))
-dict _   len ii | ii + 1 >= len = return Nothing
-dict buf len ii = do
-	c1 <- F.peekElemOff buf ii
-	c2 <- F.peekElemOff buf (ii + 1)
-	
-	let mt1 = parseAtom c1 Just Nothing
-	
-	let next t = return $ Just (ii + 2, t)
-	mt2 <- parseAtom c2 next $ case c2 of
-		0x76 -> next DBusVariant
-		
-		-- '('
-		0x28 -> structure buf len (ii + 2)
-		
-		-- 'a'
-		0x61 -> array buf len (ii + 2)
-		
-		_ -> return Nothing
-	
-	case mt2 of
-		Nothing -> return Nothing
-		Just (ii', t2) -> if ii' >= len
-			then return Nothing
-			else do
-				c3 <- F.peekElemOff buf ii'
-				return $ do
-					if c3 == 0x7D then Just () else Nothing
-					t1 <- mt1
-					Just (ii' + 1, DBusDictionary t1 t2)
-:
-
-The public interface for building signatures is {\tt Text}-based.
-
-:d type imports
-import Data.Text.Lazy.Encoding (encodeUtf8)
-:
-
-:f DBus/Types/Internal.cpphs
-mkSignature :: Text -> Maybe Signature
-mkSignature = mkBytesSignature . B.concat . BL.toChunks . encodeUtf8
-:
-
-Since many signatures are defined as string literals, it's useful to
-have a helper function to construct a signature directly from a string.
-If the input string is invalid, {\tt error} will be called.
-
-:d type imports
-import DBus.Util (mkUnsafe)
-import qualified Data.String as String
-:
-
-:f DBus/Types/Internal.cpphs
-mkSignature_ :: Text -> Signature
-mkSignature_ = mkUnsafe "signature" mkSignature
-
-instance String.IsString Signature where
-	fromString = mkUnsafe "signature" mkBytesSignature . BL8.pack
-:
-
-Most signature-related functions are exposed to clients, except the
-{\tt Signature} value constructor. If that were exposed, clients could
-construct invalid signatures.
-
-:d type exports
-, mkSignature
-, mkSignature_
-:
-
-Checking if a type is valid according to signature rules is common, and if
-performed through the signature parser, slow. Since such types are already
-guaranteed to be structurally valid, the only test needed is whether their
-size is within bounds.
-
-:f DBus/Types/Internal.cpphs
-maybeValidType :: Type -> Maybe ()
-maybeValidType t = if B.length (typeCodeB t) > 255
-	then Nothing
-	else Just ()
-:
-
-:f Tests.hs
-instance Arbitrary Signature where
-	arbitrary = sizedText 255 $ fmap (TL.concat . map typeCode) arbitrary
-:
-
-:d test cases
-, F.testGroup "Signature"
-	[ testProperty "Signature identity"
-		$ funEq (mkSignature . strSignature) Just
-	]
-:
-
-\subsection{Object paths}
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(ObjectPath)
-newtype ObjectPath = ObjectPath
-	{ strObjectPath :: Text
-	}
-	deriving (Eq, Ord)
-
-instance Show ObjectPath where
-	showsPrec d (ObjectPath x) = showParen (d > 10) $
-		showString "ObjectPath " . shows x
-
-instance String.IsString ObjectPath where
-	fromString = mkObjectPath_ . TL.pack
-:
-
-An object path may be one of
-
-\begin{itemize}
-\item The root path, {\tt "/"}.
-\item {\tt '/'}, followed by one or more element names. Each element name
-      contains characters in the set {\tt [a-zA-Z0-9\_]}, and must have at
-      least one character.
-\end{itemize}
-
-Element names are separated by {\tt '/'}, and the path may not end in
-{\tt '/'} unless it is the root path.
-
-:d type imports
-import Text.ParserCombinators.Parsec ((<|>))
-import qualified Text.ParserCombinators.Parsec as P
-import DBus.Util (checkLength, parseMaybe)
-:
-
-:f DBus/Types/Internal.cpphs
-mkObjectPath :: Text -> Maybe ObjectPath
-mkObjectPath s = parseMaybe path' (TL.unpack s) where
-	c = P.oneOf $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "_"
-	path = P.char '/' >>= P.optional . P.sepBy (P.many1 c) . P.char
-	path' = path >> P.eof >> return (ObjectPath s)
-
-mkObjectPath_ :: Text -> ObjectPath
-mkObjectPath_ = mkUnsafe "object path" mkObjectPath
-:
-
-:d type exports
-  -- * Object paths
-, ObjectPath
-, strObjectPath
-, mkObjectPath
-, mkObjectPath_
-:
-
-:f Tests.hs
-instance Arbitrary ObjectPath where
-	arbitrary = fmap (mkObjectPath_ . TL.pack) path' where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9'] ++ "_"
-		path = fmap (intercalate "/" . ([] :)) genElements
-		path' = frequency [(1, return "/"), (9, path)]
-		genElements = atLeast 1 (atLeast 1 (elements c))
-:
-
-:d test cases
-, F.testGroup "ObjectPath"
-	[ testProperty "ObjectPath identity"
-		$ funEq (mkObjectPath . strObjectPath) Just
-	]
-:
-
-\subsection{Arrays}
-
-Arrays are homogenous sequences of any valid D-Bus type. Arrays might be
-empty, so the type they contain is stored instead of being calculated from
-their contents (as in {\tt variantType}).
-
-Many D-Bus APIs represent binary data using an array of bytes; therefore,
-there is a special constructor for {\tt ByteString}-based arrays.
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Array)
-data Array
-	= VariantArray Type [Variant]
-	| ByteArray BL.ByteString
-	deriving (Eq)
-
-|apidoc arrayType|
-arrayType :: Array -> Type
-arrayType (VariantArray t _) = t
-arrayType (ByteArray _) = DBusByte
-
-arrayItems :: Array -> [Variant]
-arrayItems (VariantArray _ xs) = xs
-arrayItems (ByteArray xs) = map toVariant $ BL.unpack xs
-:
-
-:d type exports
-  -- * Arrays
-, Array
-, arrayType
-, arrayItems
-:
-
-Like {\tt Variant}, deriving {\tt Show} for {\tt Array} is mostly
-just useful for debugging.
-
-:f DBus/Types/Internal.cpphs
-instance Show Array where
-	showsPrec d array = showParen (d > 10) $
-		s "Array " . showSig . s " [" . s valueString . s "]" where
-			s = showString
-			showSig = shows . typeCode . arrayType $ array
-			showVar var = showsPrecVar 0 var ""
-			valueString = intercalate ", " $ map showVar $ arrayItems array
-:
-
-Clients constructing an array must provide the expected item type, which
-will be checked for validity. Every item in the array will be checked against
-the item type, to ensure the array is homogenous.
-
-:f DBus/Types/Internal.cpphs
-arrayFromItems :: Type -> [Variant] -> Maybe Array
-arrayFromItems DBusByte vs = fmap (ByteArray . BL.pack) (mapM fromVariant vs)
-
-arrayFromItems t vs = do
-	maybeValidType t
-	if all (\x -> variantType x == t) vs
-		then Just $ VariantArray t vs
-		else Nothing
-:
-
-Additionally, for ease of use, an {\tt Array} can be converted directly
-to/from lists of {\tt Variable} values.
-
-:f DBus/Types/Internal.cpphs
-toArray :: Variable a => Type -> [a] -> Maybe Array
-toArray t = arrayFromItems t . map toVariant
-
-fromArray :: Variable a => Array -> Maybe [a]
-fromArray = mapM fromVariant . arrayItems
-:
-
-:d type exports
-, toArray
-, fromArray
-, arrayFromItems
-:
-
-To provide a more efficient interface for byte array literals, these
-functions bypass the conversions in {\tt toArray} and {\tt fromArray}
-
-:f DBus/Types/Internal.cpphs
-arrayToBytes :: Array -> Maybe BL.ByteString
-arrayToBytes (ByteArray x) = Just x
-arrayToBytes _             = Nothing
-
-arrayFromBytes :: BL.ByteString -> Array
-arrayFromBytes = ByteArray
-:
-
-:d type exports
-, arrayToBytes
-, arrayFromBytes
-:
-
-And to simplify inclusion of {\tt ByteString}s in message, instances of
-{\tt Variable} exist for both strict and lazy {\tt ByteString}.
-
-:f DBus/Types/Internal.cpphs
-instance Variable BL.ByteString where
-	toVariant = toVariant . arrayFromBytes
-	fromVariant x = fromVariant x >>= arrayToBytes
-:
-
-:f DBus/Types/Internal.cpphs
-instance Variable B.ByteString where
-	toVariant x = toVariant . arrayFromBytes $ BL.fromChunks [x]
-	fromVariant = fmap (B.concat . BL.toChunks) . fromVariant
-:
-
-When generating random arrays for testing, only atomic values are used.
-Random containers are almost never homogenous.
-
-:f Tests.hs
-instance Arbitrary Array where
-	arbitrary = do
-		t <- atomicType
-		xs <- listOf $ genVariant t
-		return . fromJust $ arrayFromItems t xs
-
-prop_ArrayHomogeneous vs = isJust array == homogeneousTypes where
-	array = arrayFromItems firstType vs
-	homogeneousTypes = all (== firstType) types
-	types = map variantType vs
-	firstType = if null types
-		then DBusByte
-		else head types
-:
-
-:d test cases
-, F.testGroup "Array"
-	[ testProperty "Array identity"
-		$ \x -> Just x == arrayFromItems (arrayType x) (arrayItems x)
-	, testProperty "Array homogeneity" prop_ArrayHomogeneous
-	]
-:
-
-\subsection{Dictionaries}
-
-Dictionaries are a homogenous (key $\rightarrow$ value) mapping, where the
-key type must be atomic. Values may be of any valid D-Bus type. Like
-{\tt Array}, {\tt Dictionary} stores its contained types.
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Dictionary)
-
-data Dictionary = Dictionary
-	{ dictionaryKeyType   :: Type
-	, dictionaryValueType :: Type
-	, dictionaryItems     :: [(Variant, Variant)]
-	}
-	deriving (Eq)
-:
-
-:d type exports
-  -- * Dictionaries
-, Dictionary
-, dictionaryItems
-, dictionaryKeyType
-, dictionaryValueType
-:
-
-{\tt show}ing a {\tt Dictionary} displays the mapping in a more readable
-format than a list of pairs.
-
-:d type imports
-import Data.List (intercalate)
-:
-
-:f DBus/Types/Internal.cpphs
-instance Show Dictionary where
-	showsPrec d (Dictionary kt vt pairs) = showParen (d > 10) $
-		s "Dictionary " . showSig . s " {" . s valueString . s "}" where
-			s = showString
-			showSig = shows $ TL.append (typeCode kt) (typeCode vt)
-			valueString = intercalate ", " $ map showPair pairs
-			showPair (k, v) = (showsPrecVar 0 k . showString " -> " . showsPrecVar 0 v) ""
-:
-
-Constructing a {\tt Dictionary} works like constructing an {\tt Array},
-except that there are two types to check, and the key type must be atomic.
-
-:d type imports
-import Control.Monad (unless)
-:
-
-:f DBus/Types/Internal.cpphs
-dictionaryFromItems :: Type -> Type -> [(Variant, Variant)] -> Maybe Dictionary
-dictionaryFromItems kt vt pairs = do
-	unless (isAtomicType kt) Nothing
-	maybeValidType kt
-	maybeValidType vt
-	
-	let sameType (k, v) = variantType k == kt &&
-	                      variantType v == vt
-	if all sameType pairs
-		then Just $ Dictionary kt vt pairs
-		else Nothing
-:
-
-The closest match for dictionary semantics in Haskell is the
-{\tt Data.Map.Map} type. Therefore, the utility conversion functions work
-with {\tt Map}s instead of pair lists.
-
-:d type imports
-import Control.Arrow ((***))
-import qualified Data.Map as Map
-:
-
-:f DBus/Types/Internal.cpphs
-toDictionary :: (Variable a, Variable b) => Type -> Type -> Map.Map a b
-             -> Maybe Dictionary
-toDictionary kt vt = dictionaryFromItems kt vt . pairs where
-	pairs = map (toVariant *** toVariant) . Map.toList
-:
-
-:d type imports
-import Control.Monad (forM)
-:
-
-:f DBus/Types/Internal.cpphs
-fromDictionary :: (Variable a, Ord a, Variable b) => Dictionary
-               -> Maybe (Map.Map a b)
-fromDictionary (Dictionary _ _ vs) = do
-	pairs <- forM vs $ \(k, v) -> do
-		k' <- fromVariant k
-		v' <- fromVariant v
-		return (k', v')
-	return $ Map.fromList pairs
-:
-
-:d type exports
-, toDictionary
-, fromDictionary
-, dictionaryFromItems
-:
-
-When generating random dictionaries for testing, only atomic values are used.
-Random containers are almost never homogenous.
-
-:f Tests.hs
-instance Arbitrary Dictionary where
-	arbitrary = do
-		kt <- atomicType
-		vt <- atomicType
-		ks <- listOf $ genVariant kt
-		vs <- vectorOf (length ks) $ genVariant vt
-		
-		return . fromJust $ dictionaryFromItems kt vt $ zip ks vs
-
-prop_DictionaryHomogeneous x = all correctType pairs where
-	pairs = dictionaryItems x
-	kType = dictionaryKeyType x
-	vType = dictionaryValueType x
-	correctType (k, v) = variantType k == kType &&
-	                     variantType v == vType
-:
-
-:d test cases
-, F.testGroup "Dictionary"
-	[ testProperty "Dictionary identity"
-		$ \x -> Just x == dictionaryFromItems
-			(dictionaryKeyType x)
-			(dictionaryValueType x)
-			(dictionaryItems x)
-	, testProperty "Dictionary homogeneity" prop_DictionaryHomogeneous
-	, testProperty "Dictionary must have atomic keys" 
-		$ \vt -> forAll containerType $ \kt ->
-			isNothing (dictionaryFromItems kt vt [])
-	, testProperty "Dictionary <-> Array conversion"
-		$ funEq (arrayToDictionary . dictionaryToArray) Just
-	]
-:
-
-\subsubsection{Converting between {\tt Array} and {\tt Dictionary}}
-
-Converting between {\tt Array} and {\tt Dictionary} is useful when
-(un)marshaling -- dictionaries can be thought of as arrays of two-element
-structures, much as a {\tt Map} is a list of pairs.
-
-:f DBus/Types/Internal.cpphs
-dictionaryToArray :: Dictionary -> Array
-dictionaryToArray (Dictionary kt vt items) = array where
-	Just array = toArray itemType structs
-	itemType = DBusStructure [kt, vt]
-	structs = [Structure [k, v] | (k, v) <- items]
-:
-
-:f DBus/Types/Internal.cpphs
-arrayToDictionary :: Array -> Maybe Dictionary
-arrayToDictionary array = do
-	let toPair x = do
-		struct <- fromVariant x
-		case struct of
-			Structure [k, v] -> Just (k, v)
-			_                -> Nothing
-	(kt, vt) <- case arrayType array of
-		DBusStructure [kt, vt] -> Just (kt, vt)
-		_                      -> Nothing
-	pairs <- mapM toPair $ arrayItems array
-	dictionaryFromItems kt vt pairs
-:
-
-:d type exports
-, dictionaryToArray
-, arrayToDictionary
-:
-
-\subsection{Structures}
-
-A heterogeneous, fixed-length container; equivalent in purpose to a Haskell
-tuple.
-
-:f DBus/Types/Internal.cpphs
-INSTANCE_VARIABLE(Structure)
-
-data Structure = Structure [Variant]
-	deriving (Show, Eq)
-:
-
-:d type exports
-  -- * Structures
-, Structure (..)
-:
-
-:f Tests.hs
-instance Arbitrary Structure where
-	arbitrary = fmap Structure $ halfSized arbitrary
-:
-
-\subsection{Names}
-
-Various aspects of D-Bus require the use of specially-formatted strings,
-called ``names''. All names are limited to 255 characters, and use subsets
-of ASCII.
-
-Since all names have basically the same structure (a {\tt newtype}
-declaration and some helper functions), I define a macro to automate
-the definitions.
-
-:f DBus/Types/Internal.cpphs
-#define NAME_TYPE(TYPE, NAME) \
-	newtype TYPE = TYPE {str/**/TYPE :: Text} \
-		deriving (Eq, Ord); \
-		\
-	instance Show TYPE where \
-		{ showsPrec d (TYPE x) = showParen (d > 10) $ \
-			showString "TYPE " . shows x \
-		}; \
-		\
-	instance String.IsString TYPE where \
-		{ fromString = mk/**/TYPE/**/_ . TL.pack }; \
-		\
-	instance Variable TYPE where \
-		{ toVariant = toVariant . str/**/TYPE \
-		; fromVariant = (mk/**/TYPE =<<) . fromVariant }; \
-		                                                \
-	mk/**/TYPE/**/_ :: Text -> TYPE; \
-	mk/**/TYPE/**/_ = mkUnsafe NAME mk/**/TYPE
-:
-
-:d type exports
--- * Names
-:
-
-\subsubsection{Bus names}
-
-There are two forms of bus names, ``unique'' and ``well-known''.
-
-Unique names begin with {\tt `:'} and contain two or more elements, separated
-by {\tt `.'}. Each element consists of characters from the set
-{\tt [a-zA-Z0-9\_-]}.
-
-Well-known names contain two or more elements, separated by {\tt `.'}. Each
-element consists of characters from the set {\tt [a-zA-Z0-9\_-]}, and must
-not start with a digit.
-
-:f DBus/Types/Internal.cpphs
-NAME_TYPE(BusName, "bus name")
-
-mkBusName :: Text -> Maybe BusName
-mkBusName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
-	c' = c ++ ['0'..'9']
-	parser = (unique <|> wellKnown) >> P.eof >> return (BusName s)
-	unique = P.char ':' >> elems c'
-	wellKnown = elems c
-	elems start = elem' start >> P.many1 (P.char '.' >> elem' start)
-	elem' start = P.oneOf start >> P.many (P.oneOf c')
-:
-
-:d type exports
-  -- ** Bus names
-, BusName
-, strBusName
-, mkBusName
-, mkBusName_
-:
-
-:f Tests.hs
-instance Arbitrary BusName where
-	arbitrary = sizedText 255 (oneof [unique, wellKnown]) where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
-		c' = c ++ ['0'..'9']
-		
-		unique = do
-			elems' <- atLeast 2 $ elems c'
-			return . TL.pack $ ':' : intercalate "." elems'
-		
-		wellKnown = do
-			elems' <- atLeast 2 $ elems c
-			return . TL.pack $ intercalate "." elems'
-		
-		elems start = do
-			x <- elements start
-			xs <- atLeast 0 (elements c')
-			return (x:xs)
-:
-
-:d test cases
-, F.testGroup "BusName"
-	[ testProperty "BusName identity"
-		$ funEq (mkBusName . strBusName) Just
-	]
-:
-
-\subsubsection{Interface names}
-
-An interface name consists of two or more {\tt '.'}-separated elements. Each
-element constists of characters from the set {\tt [a-zA-Z0-9\_]}, may not
-start with a digit, and must have at least one character.
-
-:f DBus/Types/Internal.cpphs
-NAME_TYPE(InterfaceName, "interface name")
-
-mkInterfaceName :: Text -> Maybe InterfaceName
-mkInterfaceName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-	c' = c ++ ['0'..'9']
-	element = P.oneOf c >> P.many (P.oneOf c')
-	name = element >> P.many1 (P.char '.' >> element)
-	parser = name >> P.eof >> return (InterfaceName s)
-:
-
-:d type exports
-  -- ** Interface names
-, InterfaceName
-, strInterfaceName
-, mkInterfaceName
-, mkInterfaceName_
-:
-
-:f Tests.hs
-instance Arbitrary InterfaceName where
-	arbitrary = sizedText 255 genName where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-		c' = c ++ ['0'..'9']
-		
-		genName = fmap (TL.pack . intercalate ".") genElements
-		genElements = atLeast 2 genElement
-		genElement = do
-			x <- elements c
-			xs <- atLeast 0 (elements c')
-			return (x:xs)
-:
-
-:d test cases
-, F.testGroup "InterfaceName"
-	[ testProperty "InterfaceName identity"
-		$ funEq (mkInterfaceName . strInterfaceName) Just
-	]
-:
-
-\subsubsection{Error names}
-
-Error names have the same format as interface names, so the parser logic
-can just be re-purposed.
-
-:f DBus/Types/Internal.cpphs
-NAME_TYPE(ErrorName, "error name")
-
-mkErrorName :: Text -> Maybe ErrorName
-mkErrorName = fmap (ErrorName . strInterfaceName) . mkInterfaceName
-:
-
-:d type exports
-  -- ** Error names
-, ErrorName
-, strErrorName
-, mkErrorName
-, mkErrorName_
-:
-
-:f Tests.hs
-instance Arbitrary ErrorName where
-	arbitrary = fmap (mkErrorName_ . strInterfaceName) arbitrary
-:
-
-:d test cases
-, F.testGroup "ErrorName"
-	[ testProperty "ErrorName identity"
-		$ funEq (mkErrorName . strErrorName) Just
-	]
-:
-
-\subsubsection{Member names}
-
-Member names must contain only characters from the set {\tt [a-zA-Z0-9\_]},
-may not begin with a digit, and must be at least one character long.
-
-:f DBus/Types/Internal.cpphs
-NAME_TYPE(MemberName, "member name")
-
-mkMemberName :: Text -> Maybe MemberName
-mkMemberName s = checkLength 255 (TL.unpack s) >>= parseMaybe parser where
-	c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-	c' = c ++ ['0'..'9']
-	name = P.oneOf c >> P.many (P.oneOf c')
-	parser = name >> P.eof >> return (MemberName s)
-:
-
-:d type exports
-  -- ** Member names
-, MemberName
-, strMemberName
-, mkMemberName
-, mkMemberName_
-:
-
-:f Tests.hs
-instance Arbitrary MemberName where
-	arbitrary = sizedText 255 genName where
-		c = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
-		c' = c ++ ['0'..'9']
-		
-		genName = do
-			x <- elements c
-			xs <- atLeast 0 (elements c')
-			return . TL.pack $ (x:xs)
-:
-
-:d test cases
-, F.testGroup "MemberName"
-	[ testProperty "MemberName identity"
-		$ funEq (mkMemberName . strMemberName) Just
-	]
-:
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\section{Values and types}
+
+\dbus{} values are divided into two categories, \emph{atoms} and
+\emph{containers}. Atoms are strings, numbers, and so on. Containers can
+store other values, including other containers. Generally, values act like
+their Haskell equivalents, with one important exception: \dbus{} dictionaries
+only support atomic keys. Every \dbus{} type has a \emph{type code}, a short
+string describing what sort of data the value stores.
+
+\begin{table}[h]
+\label{tab:dbus-types}
+\caption{\dbus{} Types}
+\begin{center}
+\begin{tabular}{llll}
+\toprule
+\dbus{} Type  & Code    & Description & Haskell Type \\
+\midrule
+Boolean     & {\tt b} & {\tt True} or {\tt False} & {\tt Bool} \\
+Byte        & {\tt y} & 8-bit unsigned integer & {\tt Word8} \\
+Int16       & {\tt n} & 16-bit signed integer & {\tt Int16} \\
+UInt16      & {\tt q} & 16-bit unsigned integer & {\tt Word16} \\
+Int32       & {\tt i} & 32-bit signed integer & {\tt Int32} \\
+UInt32      & {\tt u} & 32-bit unsigned integer & {\tt Word32} \\
+Int64       & {\tt x} & 64-bit signed integer & {\tt Int64} \\
+UInt64      & {\tt t} & 64-bit unsigned integer & {\tt Word64} \\
+Double      & {\tt d} & 64-bit IEEE754 floating-point & {\tt Double} \\
+String      & {\tt s} & Unicode text & {\tt Text} \\
+Object Path & {\tt o} & \dbus{} remote object path & {\tt DBus.Types.ObjectPath} \\
+Signature   & {\tt g} & List of \dbus{} types & {\tt DBus.Types.Signature} \\
+Variant     & {\tt v} & Can contain any \dbus{} value & {\tt DBus.Types.Variant} \\
+Array       & {\tt a}\emph{t} & Homogenous list of \emph{t} & {\tt Vector} \\
+Dictionary  & {\tt a\{}\emph{k}\emph{t}{\tt \}} & Associative map of \emph{k} to \emph{t} & {\tt Map} \\
+Structure   & {\tt (}\emph{codes}{\tt )} & Heterogeneous list of \dbus{} values & Tuples \\
+\bottomrule
+\end{tabular}
+\end{center}
+\end{table}
+
+\clearpage
+\subsubsection*{Values and types (continued)}
+
+\begin{multicols}{2}
+
+Since the set of types is fixed, they are internally stored as an enumeration,
+named {\tt Type}. The names mostly match the \dbus{} names, but a few have
+been slightly changed to conform with Haskell naming conventions.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+data Type
+	= TypeBoolean
+	| TypeWord8
+	| TypeWord16
+	| TypeWord32
+	| TypeWord64
+	| TypeInt16
+	| TypeInt32
+	| TypeInt64
+	| TypeDouble
+	| TypeString
+	| TypeSignature
+	| TypeObjectPath
+	| TypeVariant
+	| TypeArray Type
+	| TypeDictionary Type Type
+	| TypeStructure [Type]
+	deriving (Eq, Ord)
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+I have two choices when deciding how to show {\tt Type}s; either use type
+codes, as in signatures, or try to generate a more Haskell-ish format. I
+chose the second option because it's easier to read; for example, compare
+{\tt "a\{sas\}"} and {\tt Map String [String]}. This is particularly
+important when working with complex or deeply-nested structures, which are
+common in some APIs.
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+instance Show Type where
+	showsPrec d = showString . showType (d > 10)
+
+showType :: Bool -> Type -> String
+showType paren t = case t of
+	TypeBoolean -> "Bool"
+	TypeWord8 -> "Word8"
+	TypeWord16 -> "Word16"
+	TypeWord32 -> "Word32"
+	TypeWord64 -> "Word64"
+	TypeInt16 -> "Int16"
+	TypeInt32 -> "Int32"
+	TypeInt64 -> "Int64"
+	TypeDouble -> "Double"
+	TypeString -> "String"
+	TypeSignature -> "Signature"
+	TypeObjectPath -> "ObjectPath"
+	TypeVariant -> "Variant"
+	TypeArray t' -> concat ["[", show t', "]"]
+	TypeDictionary kt vt -> showParen paren (
+	                        showString "Map " .
+	                        shows kt .
+	                        showString " " .
+	                        showsPrec 11 vt) ""
+	TypeStructure ts -> concat
+		["(", intercalate ", " (map show ts), ")"]
+:
+
+\end{multicols}
+
+\clearpage
+\subsection{Type signatures}
+
+\begin{multicols}{2}
+
+A list of types is called a \emph{signature}. Signatures are traditionally
+represented as a string of type codes, such as {\tt "a\{sas\}"} for
+{\tt Map String [String]}. However, this library stores signatures as
+{\tt [Type]} to take advantage of Haskell's strong typing.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype Signature = Signature [Type]
+	deriving (Eq, Ord)
+
+signatureTypes :: Signature -> [Type]
+signatureTypes (Signature types) = types
+
+instance Show Signature where
+	showsPrec d sig = showParen (d > 10) $
+		showString "Signature " .
+		shows (signatureText sig)
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Although signatures are strongly-typed internally, they are exposed to the
+user as if they're special strings matching the \dbus{} signature format.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+signatureText :: Signature -> Text
+signatureText = Data.Text.Encoding.decodeUtf8
+              . Data.ByteString.Char8.pack
+              . concatMap typeCode
+              . signatureTypes
+
+typeCode :: Type -> String
+typeCode TypeBoolean    = "b"
+typeCode TypeWord8      = "y"
+typeCode TypeWord16     = "q"
+typeCode TypeWord32     = "u"
+typeCode TypeWord64     = "t"
+typeCode TypeInt16      = "n"
+typeCode TypeInt32      = "i"
+typeCode TypeInt64      = "x"
+typeCode TypeDouble     = "d"
+typeCode TypeString     = "s"
+typeCode TypeSignature  = "g"
+typeCode TypeObjectPath = "o"
+typeCode TypeVariant    = "v"
+typeCode (TypeArray t)  = 'a' : typeCode t
+typeCode (TypeDictionary kt vt) = concat
+	[ "a{", typeCode kt , typeCode vt, "}"]
+
+typeCode (TypeStructure ts) = concat
+	["(", concatMap typeCode ts, ")"]
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection*{Parsing signatures}
+
+\begin{multicols}{2}
+
+Signature parsing is the most common operation when unmarshaling messages;
+therefore, an efficient parsing implementation is essential. However, I still
+want the library's users to see a text-based interface to signatures.
+
+Therefore, there are actually two signature parsing APIs -- one for other
+modules in this library (especially {\tt DBus.Wire}, and a small wrapper for
+users. The wrapper follows the pattern for other special strings, so users
+can use string literals and so on.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+instance Data.String.IsString Signature where
+	fromString = signature_ . Data.Text.pack
+
+signature :: Text -> Maybe Signature
+signature text = parseSignature bytes where
+	bytes = Data.Text.Encoding.encodeUtf8 text
+
+signature_ :: Text -> Signature
+signature_ = tryParse "signature" signature
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+\noindent There are three special cases which can be optimized:
+
+\begin{enumerate}
+\item Empty signatures occur when messages have no body, and can use a constant
+      result.
+\item Single-character signatures occur when parsing variants, and can use a
+      faster non-recursive parser.
+\item All signatures larger than 255 characters are invalid, so they can be
+      failed immediately.
+\end{enumerate}
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+parseSignature :: ByteString -> Maybe Signature
+parseSignature bytes =
+	case Data.ByteString.length bytes of
+		0 -> Just (Signature [])
+		1 -> parseSigFast bytes
+		len | len <= 255 -> parseSigFull bytes
+		_ -> Nothing
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Additionally, the library might already has a list of {\tt Type}s available,
+and just wants to see if they're a valid signature. Rather than re-parsing
+them, we can assume the types are already nested correctly, and just check
+their string length.
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+checkSignature :: [Type] -> Maybe Signature
+checkSignature = check where
+	check ts = if sumLen ts > 255
+		then Nothing
+		else Just (Signature ts)
+	sumLen :: [Type] -> Int
+	sumLen = sum . map len
+
+	len (TypeArray t) = 1 + len t
+	len (TypeDictionary kt vt) = 3 + len kt + len vt
+	len (TypeStructure ts) = 2 + sumLen ts
+	len _ = 1
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection*{Fast signature parser}
+
+\begin{multicols}{2}
+
+The fast parser relies on all atoms having single-character codes; if the
+input string has only one character, it must be either an atomic type or
+{\tt TypeVariant}.
+
+This optimization is important when parsing variants, as they very often
+contain signatures with only a single atomic type.
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+parseSigFast :: ByteString -> Maybe Signature
+parseSigFast bytes =
+	let byte = Data.ByteString.head bytes in
+	parseAtom byte
+		(\t -> Just (Signature [t]))
+		(case byte of
+			0x76 -> Just (Signature [TypeVariant])
+			_ -> Nothing)
+
+parseAtom :: Word8 -> (Type -> a) -> a -> a
+parseAtom byte yes no = case byte of
+	0x62 -> yes TypeBoolean
+	0x6E -> yes TypeInt16
+	0x69 -> yes TypeInt32
+	0x78 -> yes TypeInt64
+	0x79 -> yes TypeWord8
+	0x71 -> yes TypeWord16
+	0x75 -> yes TypeWord32
+	0x74 -> yes TypeWord64
+	0x64 -> yes TypeDouble
+	0x73 -> yes TypeString
+	0x67 -> yes TypeSignature
+	0x6F -> yes TypeObjectPath
+	_ -> no
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection*{Full signature parser}
+
+This is horrible, gnarly, and almost completely undocumented. Someday I'll get
+around to cleaning it up, or at least hanging some curtains on it.
+
+:d DBus.Types
+parseSigFull :: ByteString -> Maybe Signature
+parseSigFull bytes = unsafePerformIO io where
+	io = Data.ByteString.Unsafe.unsafeUseAsCStringLen bytes castBuf
+	castBuf (ptr, len) = parseSigBuf (Foreign.castPtr ptr, len)
+	parseSigBuf (buf, len) = mainLoop [] 0 where
+		|full signature parser|
+:
+
+:d full signature parser
+mainLoop acc ii | ii >= len = return (Just (Signature (reverse acc)))
+mainLoop acc ii = do
+	c <- Foreign.peekElemOff buf ii
+	let next t = mainLoop (t : acc) (ii + 1)
+	parseAtom c next $ case c of
+		0x76 -> next TypeVariant
+		0x28 -> do -- '('
+			mt <- structure (ii + 1)
+			case mt of
+				Just (ii', t) -> mainLoop (t : acc) ii'
+				Nothing -> return Nothing
+		0x61 -> do -- 'a'
+			mt <- array (ii + 1)
+			case mt of
+				Just (ii', t) -> mainLoop (t : acc) ii'
+				Nothing -> return Nothing
+		_ -> return Nothing
+:
+
+:d full signature parser
+structure :: Int -> IO (Maybe (Int, Type))
+structure = loop [] where
+	loop _ ii | ii >= len = return Nothing
+	loop acc ii = do
+		c <- Foreign.peekElemOff buf ii
+		let next t = loop (t : acc) (ii + 1)
+		parseAtom c next $ case c of
+			0x76 -> next TypeVariant
+			0x28 -> do -- '('
+				mt <- structure (ii + 1)
+				case mt of
+					Just (ii', t) -> loop (t : acc) ii'
+					Nothing -> return Nothing
+			0x61 -> do -- 'a'
+				mt <- array (ii + 1)
+				case mt of
+					Just (ii', t) -> loop (t : acc) ii'
+					Nothing -> return Nothing
+			-- ')'
+			0x29 -> return $ case acc of
+				[] -> Nothing
+				_ -> Just $ (ii + 1, TypeStructure (reverse acc))
+			_ -> return Nothing
+:
+
+\clearpage
+\subsubsection*{Full signature parser (continued)}
+
+:d full signature parser
+array :: Int -> IO (Maybe (Int, Type))
+array ii | ii >= len = return Nothing
+array ii = do
+	c <- Foreign.peekElemOff buf ii
+	let next t = return $ Just (ii + 1, TypeArray t)
+	parseAtom c next $ case c of
+		0x76 -> next TypeVariant
+		0x7B -> dict (ii + 1) -- '{'
+		0x28 -> do -- '('
+			mt <- structure (ii + 1)
+			case mt of
+				Just (ii', t) -> return $ Just (ii', TypeArray t)
+				Nothing -> return Nothing
+		0x61 -> do -- 'a'
+			mt <- array (ii + 1)
+			case mt of
+				Just (ii', t) -> return $ Just (ii', TypeArray t)
+				Nothing -> return Nothing
+		_ -> return Nothing
+:
+
+:d full signature parser
+dict :: Int -> IO (Maybe (Int, Type))
+dict ii | ii + 1 >= len = return Nothing
+dict ii = do
+	c1 <- Foreign.peekElemOff buf ii
+	c2 <- Foreign.peekElemOff buf (ii + 1)
+	
+	let next t = return (Just (ii + 2, t))
+	mt2 <- parseAtom c2 next $ case c2 of
+		0x76 -> next TypeVariant
+		0x28 -> structure (ii + 2) -- '('
+		0x61 -> array (ii + 2) -- 'a'
+		_ -> return Nothing
+	
+	case mt2 of
+		Nothing -> return Nothing
+		Just (ii', t2) -> if ii' >= len
+			then return Nothing
+			else do
+				c3 <- Foreign.peekElemOff buf ii'
+				return $ do
+					if c3 == 0x7D then Just () else Nothing
+					t1 <- parseAtom c1 Just Nothing
+					Just (ii' + 1, TypeDictionary t1 t2)
+:
+
+\clearpage
+\subsection{Generic value boxing}
+
+\begin{multicols}{2}
+
+The \dbus{} type system is similar to Haskell's, but has some minor
+differences. Most notably, {\em variants} can store any \dbus{} type, and
+dictionaries must have atomic keys. To provide a clean interface for
+converting between \dbus{} and Haskell types, the interface is encoded with
+three classes:
+
+\begin{enumerate}
+\item {\tt IsVariant} is the most general, and the only class that users may
+      add instances for. Any type that can be converted to primitive \dbus{}
+      values can be stored in a {\tt Variant}, and converted safely back to
+      its original form.
+\item {\tt IsValue} is slightly stricter, and is used for constraining
+      container values. If containers were constrained to {\tt IsVariant},
+      users could define an instance for {\tt Either} and create heterogenous
+      containers.
+\item {\tt IsAtom} is the strictest, and is used for constraining dictionary
+      key types. Only atomic values can be converted with this class, and
+      users cannot define their own instances.
+\end{enumerate}
+
+It is possible to make this slightly less verbose by using existential
+types, but the additional indirection causes slower message parsing.
+
+As a special optimization, arrays of bytes can be stored directly in a
+{\tt Value} in three common formats. This allows the marshaling system to
+avoid copying data unless needed.
+
+{\tt ValueVector} and {\tt ValueMap} require special handling. \dbus{} needs
+to know their full type even if they're empty, but {\tt ([] :: [Value])}
+contains no information about its contents. As a workaround, the full type
+of the container is stored in the box itself at construction.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+class IsVariant a where
+	toVariant :: a -> Variant
+	fromVariant :: Variant -> Maybe a
+
+class IsVariant a => IsValue a where
+	typeOf :: a -> Type
+	toValue :: a -> Value
+	fromValue :: Value -> Maybe a
+
+class IsValue a => IsAtom a where
+	toAtom :: a -> Atom
+	fromAtom :: Atom -> Maybe a
+
+|apidoc DBus.Types.Variant|
+newtype Variant = Variant Value
+	deriving (Eq)
+
+data Value
+	= ValueAtom Atom
+	| ValueVariant Variant
+	| ValueBytes ByteString
+	| ValueVector Type (Vector Value)
+	| ValueMap Type Type (Map Atom Value)
+	| ValueStructure [Value]
+	deriving (Show)
+
+data Atom
+	= AtomBool Bool
+	| AtomWord8 Word8
+	| AtomWord16 Word16
+	| AtomWord32 Word32
+	| AtomWord64 Word64
+	| AtomInt16 Int16
+	| AtomInt32 Int32
+	| AtomInt64 Int64
+	| AtomDouble Double
+	| AtomText Text
+	| AtomSignature Signature
+	| AtomObjectPath ObjectPath
+	deriving (Show, Eq, Ord)
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+The byte-handling optimization comes at a cost, however; it's no longer
+possible to derive {\tt Eq}, and the instance is quite ugly.
+
+:d DBus.Types
+instance Eq Value where
+	(==) (ValueBytes x) y = case y of
+		ValueBytes y' -> x == y'
+		ValueVector TypeWord8 y' -> x == vectorToBytes y'
+		_ -> False
+	
+	(==) (ValueVector TypeWord8 x) y = case y of
+		ValueBytes y' -> vectorToBytes x == y'
+		ValueVector TypeWord8 y' -> x == y'
+		_ -> False
+	
+	(==) (ValueAtom x) (ValueAtom y) = x == y
+	(==) (ValueVariant x) (ValueVariant y) = x == y
+	(==) (ValueVector tx x) (ValueVector ty y) = tx == ty && x == y
+	(==) (ValueMap ktx vtx x) (ValueMap kty vty y) = ktx == kty && vtx == vty && x == y
+	(==) (ValueStructure x) (ValueStructure y) = x == y
+	(==) _ _ = False
+:
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+If a user is interacting with the library through an REPL (e.g. GHCI), they
+might want to print the content of a variant -- for example, to print messages
+received from the bus. Due to the various wrappers between {\tt Variant} and
+the actual data, this is somewhat complex.
+
+:d DBus.Types
+showAtom :: Bool -> Atom -> String
+showAtom _ (AtomBool x) = show x
+showAtom _ (AtomWord8 x) = show x
+showAtom _ (AtomWord16 x) = show x
+showAtom _ (AtomWord32 x) = show x
+showAtom _ (AtomWord64 x) = show x
+showAtom _ (AtomInt16 x) = show x
+showAtom _ (AtomInt32 x) = show x
+showAtom _ (AtomInt64 x) = show x
+showAtom _ (AtomDouble x) = show x
+showAtom _ (AtomText x) = show x
+showAtom p (AtomSignature x) = showsPrec (if p then 11 else 0) x ""
+showAtom p (AtomObjectPath x) = showsPrec (if p then 11 else 0) x ""
+
+showValue :: Bool -> Value -> String
+showValue p (ValueAtom x) = showAtom p x
+showValue p (ValueVariant x) = showsPrec (if p then 11 else 0) x ""
+showValue _ (ValueBytes xs) = 'b' : show xs
+showValue _ (ValueVector TypeWord8 xs) = 'b' : show (vectorToBytes xs)
+showValue _ (ValueVector _ xs) = showThings "[" (showValue False) "]" (Data.Vector.toList xs)
+showValue _ (ValueMap _ _ xs) = showThings "{" showPair "}" (Data.Map.toList xs) where
+	showPair (k, v) = showAtom False k ++ ": " ++ showValue False v
+showValue _ (ValueStructure xs) = showThings "(" (showValue False) ")" xs
+
+showThings :: String -> (a -> String) -> String -> [a] -> String
+showThings a s z xs = a ++ intercalate ", " (map s xs) ++ z
+
+vectorToBytes :: Vector Value -> ByteString
+vectorToBytes = Data.ByteString.pack
+              . Data.Vector.toList
+              . Data.Vector.map (\(ValueAtom (AtomWord8 x)) -> x)
+:
+
+To preserve the variant-based public interface, {\tt showAtom} and
+{\tt showValue} are not exported to the user. This preserves the
+appearance that {\tt Variant} is a simple wrapping box.
+
+\begin{quote}
+:d DBus.Types
+instance Show Variant where
+	showsPrec d (Variant x) = showParen (d > 10) $
+		showString "Variant " .  showString (showValue True x)
+:
+\end{quote}
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+Printing a {\tt Variant} lets the user see what value it contains, but
+sometimes they need to know exactly what type \dbus{} thinks it is. This
+is particularly important when working with integers, as some APIs will
+only accept integers of a particular size.
+
+:d DBus.Types
+|apidoc DBus.Types.variantType|
+variantType :: Variant -> Type
+variantType (Variant val) = valueType val
+
+valueType :: Value -> Type
+valueType (ValueAtom x) = atomType x
+valueType (ValueVariant _) = TypeVariant
+valueType (ValueVector t _) = TypeArray t
+valueType (ValueBytes _) = TypeArray TypeWord8
+valueType (ValueMap kt vt _) = TypeDictionary kt vt
+valueType (ValueStructure vs) = TypeStructure (map valueType vs)
+
+atomType :: Atom -> Type
+atomType (AtomBool _) = TypeBoolean
+atomType (AtomWord8 _) = TypeWord8
+atomType (AtomWord16 _) = TypeWord16
+atomType (AtomWord32 _) = TypeWord32
+atomType (AtomWord64 _) = TypeWord64
+atomType (AtomInt16 _) = TypeInt16
+atomType (AtomInt32 _) = TypeInt32
+atomType (AtomInt64 _) = TypeInt64
+atomType (AtomDouble _) = TypeDouble
+atomType (AtomText _) = TypeString
+atomType (AtomSignature _) = TypeSignature
+atomType (AtomObjectPath _) = TypeObjectPath
+:
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+\begin{multicols}{2}
+
+Since atoms are stored directly in the {\tt Atom} box, there is no fancy
+logic required in their class instances. They're still pretty verbose, so
+I used a small macro to keep things reasonable.
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+#define IS_ATOM(HsType, AtomCons, TypeCons) \
+	instance IsAtom HsType where \
+	{ toAtom = AtomCons \
+	; fromAtom (AtomCons x) = Just x \
+	; fromAtom _ = Nothing \
+	}; \
+	instance IsValue HsType where \
+	{ typeOf _ = TypeCons \
+	; toValue = ValueAtom . toAtom \
+	; fromValue (ValueAtom x) = fromAtom x \
+	; fromValue _ = Nothing \
+	}; \
+	instance IsVariant HsType where \
+	{ toVariant = Variant . toValue \
+	; fromVariant (Variant val) = fromValue val \
+	}
+
+IS_ATOM(Bool,       AtomBool,       TypeBoolean)
+IS_ATOM(Word8,      AtomWord8,      TypeWord8)
+IS_ATOM(Word16,     AtomWord16,     TypeWord16)
+IS_ATOM(Word32,     AtomWord32,     TypeWord32)
+IS_ATOM(Word64,     AtomWord64,     TypeWord64)
+IS_ATOM(Int16,      AtomInt16,      TypeInt16)
+IS_ATOM(Int32,      AtomInt32,      TypeInt32)
+IS_ATOM(Int64,      AtomInt64,      TypeInt64)
+IS_ATOM(Double,     AtomDouble,     TypeDouble)
+IS_ATOM(Text,       AtomText,       TypeString)
+IS_ATOM(Signature,  AtomSignature,  TypeSignature)
+IS_ATOM(ObjectPath, AtomObjectPath, TypeObjectPath)
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+~
+
+\vfill
+\columnbreak
+
+:d DBus.Types
+instance IsValue Variant where
+	typeOf _ = TypeVariant
+	toValue = ValueVariant
+	fromValue (ValueVariant x) = Just x
+	fromValue _ = Nothing
+
+instance IsVariant Variant where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+:d DBus.Types
+instance IsAtom Data.Text.Lazy.Text where
+	toAtom = toAtom . Data.Text.Lazy.toStrict
+	fromAtom = fmap Data.Text.Lazy.fromStrict . fromAtom
+
+instance IsValue Data.Text.Lazy.Text where
+	typeOf _ = TypeString
+	toValue = ValueAtom . toAtom
+	fromValue (ValueAtom x) = fromAtom x
+	fromValue _ = Nothing
+
+instance IsVariant Data.Text.Lazy.Text where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+:d DBus.Types
+instance IsAtom String where
+	toAtom = toAtom . Data.Text.pack
+	fromAtom = fmap Data.Text.unpack . fromAtom
+
+instance IsValue String where
+	typeOf _ = TypeString
+	toValue = ValueAtom . toAtom
+	fromValue (ValueAtom x) = fromAtom x
+	fromValue _ = Nothing
+
+instance IsVariant String where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+Arrays are stored as a {\tt Vector Value}; this is somewhat inefficient,
+but allows type-safe casting between different array representations.
+
+:d DBus.Types
+instance IsValue a => IsValue (Vector a) where
+	typeOf v = TypeArray (vectorItemType v)
+	toValue v = ValueVector (vectorItemType v) (Data.Vector.map toValue v)
+	fromValue (ValueVector _ v) = Data.Vector.mapM fromValue v
+	fromValue _ = Nothing
+
+vectorItemType :: IsValue a => Vector a -> Type
+vectorItemType v = typeOf (undefined `asTypeOf` Data.Vector.head v)
+
+instance IsValue a => IsVariant (Vector a) where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+:d DBus.Types
+instance IsValue a => IsValue [a] where
+	typeOf v = TypeArray (typeOf (undefined `asTypeOf` head v))
+	toValue = toValue . Data.Vector.fromList
+	fromValue = fmap Data.Vector.toList . fromValue
+
+instance IsValue a => IsVariant [a] where
+	toVariant = toVariant . Data.Vector.fromList
+	fromVariant = fmap Data.Vector.toList . fromVariant
+:
+
+As an optimization, arrays of bytes are treated specially -- they can be
+converted to/from packed bytestrings.
+
+:d DBus.Types
+instance IsValue ByteString where
+	typeOf _ = TypeArray TypeWord8
+	toValue = ValueBytes
+	fromValue (ValueBytes bs) = Just bs
+	fromValue (ValueVector TypeWord8 v) = Just (vectorToBytes v)
+	fromValue _ = Nothing
+
+instance IsVariant ByteString where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+:d DBus.Types
+instance IsValue Data.ByteString.Lazy.ByteString where
+	typeOf _ = TypeArray TypeWord8
+	toValue = toValue
+	        . Data.ByteString.concat 
+	        . Data.ByteString.Lazy.toChunks
+	fromValue = fmap (\bs -> Data.ByteString.Lazy.fromChunks [bs])
+	          . fromValue
+
+instance IsVariant Data.ByteString.Lazy.ByteString where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+:d DBus.Types
+instance (Ord k, IsAtom k, IsValue v) => IsValue (Map k v) where
+	typeOf m = TypeDictionary kt vt where
+		(kt, vt) = mapItemType m
+	
+	toValue m = ValueMap kt vt (bimap box m) where
+		(kt, vt) = mapItemType m
+		box k v = (toAtom k, toValue v)
+	
+	fromValue (ValueMap _ _ m) = bimapM unbox m where
+		unbox k v = do
+			k' <- fromAtom k
+			v' <- fromValue v
+			return (k', v')
+	fromValue _ = Nothing
+
+bimap :: Ord k' => (k -> v -> (k', v')) -> Map k v -> Map k' v'
+bimap f = Data.Map.fromList . map (\(k, v) -> f k v) . Data.Map.toList
+
+bimapM :: (Monad m, Ord k') => (k -> v -> m (k', v')) -> Map k v -> m (Map k' v')
+bimapM f = liftM Data.Map.fromList . mapM (\(k, v) -> f k v) . Data.Map.toList
+
+mapItemType :: (IsValue k, IsValue v) => Map k v -> (Type, Type)
+mapItemType m = (typeOf k, typeOf v) where
+	mapItem :: Map k v -> (k, v)
+	mapItem _ = (undefined, undefined)
+	(k, v) = mapItem m
+
+instance (Ord k, IsAtom k, IsValue v) => IsVariant (Map k v) where
+	toVariant = Variant . toValue
+	fromVariant (Variant val) = fromValue val
+:
+
+\clearpage
+\subsubsection*{Generic value boxing (continued)}
+
+\dbus{}'s structures are essentially the same as Haskell's tuples, except they
+can contain up to 255 items. There's no way I'm going to define 255 instances
+for {\tt IsValue} and {\tt IsVariant}; other classes (such as {\tt Show}) only
+go up to 15 or so, so that's how far {\tt dbus-core} goes too.
+
+I'm also not going to include all the instance declarations inline in this
+document, since they're all essentially the same. Here's the instances for
+two-element tuples, as a template.
+
+:d DBus.Types
+instance (IsValue a1, IsValue a2) => IsValue (a1, a2) where
+	typeOf ~(a1, a2) = TypeStructure [typeOf a1, typeOf a2]
+	toValue (a1, a2) = ValueStructure [toValue a1, toValue a2]
+	fromValue (ValueStructure [a1, a2]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		return (a1', a2')
+	fromValue _ = Nothing
+
+instance (IsVariant a1, IsVariant a2) => IsVariant (a1, a2) where
+	toVariant (a1, a2) = Variant (ValueStructure [varToVal a1, varToVal a2])
+	fromVariant (Variant (ValueStructure [a1, a2])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		return (a1', a2')
+	fromVariant _ = Nothing
+
+varToVal :: IsVariant a => a -> Value
+varToVal a = case toVariant a of
+	Variant val -> val
+:
+
+\clearpage
+\subsection{Special string types}
+
+Various aspects of \dbus{} require the use of specially-formatted strings. Every
+special string type gets its own Haskell type and construction function; this
+allows the library to assume all such strings are correctly formatted. The
+constructors will evaluate to {\tt Nothing} if their input is invalid. In
+addition, partial versions (suffixed with {\tt \_}) are available for users
+who don't care about validation; these will throw an exception if the input
+is invalid. Finally, {\tt IsString} instances are available for all special
+strings, so users can just enable {\tt OverloadedStrings} and use string
+literals directly.
+
+Validation is performed using Parsec. Unfortunately, Parsec does not work
+with packed strings; I'll define a few utility functions first, so the
+validation logic is more obvious. Note that these discard the Parsec error
+message; if some input doesn't match, the exact error is unlikely to be
+interesting.
+
+:d text validation imports
+import qualified Text.ParserCombinators.Parsec as Parsec
+import           Text.ParserCombinators.Parsec ((<|>), oneOf)
+:
+
+:d text validation
+skipSepBy1 :: Parsec.Parser a -> Parsec.Parser b -> Parsec.Parser ()
+skipSepBy1 p sep = do
+	void p
+	Parsec.skipMany (sep >> p)
+
+runParser :: Parsec.Parser a -> Text -> Maybe a
+runParser parser text = case Parsec.parse parser "" (Data.Text.unpack text) of
+	Left _ -> Nothing
+	Right a -> Just a
+
+tryParse :: String -> (Text -> Maybe a) -> Text -> a
+tryParse label parse text = case parse text of
+	Just x -> x
+	Nothing -> error ("Invalid " ++ label ++ ": " ++ show text)
+:
+
+\clearpage
+\subsubsection{Object paths}
+
+\begin{multicols}{2}
+
+\dbus{} is an object-oriented protocol; most \dbus{} sessions consist of method
+calls sent to \emph{objects} exported by other applications. An objects is
+identified by a \emph{object path}, such as {\tt /org/freedesktop/DBus}, which
+is unique within each application.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype ObjectPath = ObjectPath Text
+	deriving (Eq, Ord, Show)
+
+objectPathText :: ObjectPath -> Text
+objectPathText (ObjectPath text) = text
+
+objectPath :: Text -> Maybe ObjectPath
+objectPath text = do
+	runParser parseObjectPath text
+	return (ObjectPath text)
+
+objectPath_ :: Text -> ObjectPath
+objectPath_ = tryParse "object path" objectPath
+
+instance Data.String.IsString ObjectPath where
+	fromString = objectPath_ . Data.Text.pack
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+An object path may be one of
+
+\begin{itemize}
+\item The root path, {\tt "/"}.
+\item {\tt '/'}, followed by one or more elements, separated by {\tt '/'}.
+      Each element contains characters in the set {\tt [a-zA-Z0-9\_]}, and
+      must have at least one character.
+\end{itemize}
+
+Element names are separated by {\tt '/'}, and the path may not end in
+{\tt '/'} unless it is the root path.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+parseObjectPath :: Parsec.Parser ()
+parseObjectPath = root <|> object where
+	root = Parsec.try $ do
+		slash
+		Parsec.eof
+	
+	object = do
+		slash
+		skipSepBy1 element slash
+		Parsec.eof
+	
+	element = Parsec.skipMany1 (oneOf chars)
+	
+	slash = void (Parsec.char '/')
+	chars = concat [ ['a'..'z']
+	               , ['A'..'Z']
+	               , ['0'..'9']
+	               , "_"]
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Interface names}
+
+\begin{multicols}{2}
+
+Each object may have several \emph{interfaces}, each identified by an
+\emph{interface name}. Interfaces are the basic units of \dbus{} APIs, and
+even simple objects are expected to contain several (such as
+{\tt org.freedesktop.DBus.Introspectable} or
+{\tt org.freedesktop.DBus.Properties}). They correspond generally to Haskell
+classes, or Python protocols.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype InterfaceName = InterfaceName Text
+	deriving (Eq, Ord, Show)
+
+interfaceNameText :: InterfaceName -> Text
+interfaceNameText (InterfaceName text) = text
+
+interfaceName :: Text -> Maybe InterfaceName
+interfaceName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseInterfaceName text
+	return (InterfaceName text)
+
+interfaceName_ :: Text -> InterfaceName
+interfaceName_ = tryParse "interface name" interfaceName
+
+instance Data.String.IsString InterfaceName where
+	fromString = interfaceName_ . Data.Text.pack
+
+instance IsVariant InterfaceName where
+	toVariant = toVariant . interfaceNameText
+	fromVariant = fromVariant >=> interfaceName
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+An interface name consists of two or more {\tt '.'}-separated elements. Each
+element constists of characters from the set {\tt [a-zA-Z0-9\_]}, may not
+start with a digit, and must have at least one character.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+parseInterfaceName :: Parsec.Parser ()
+parseInterfaceName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
+	alphanum = alpha ++ ['0'..'9']
+	element = do
+		void (oneOf alpha)
+		Parsec.skipMany (oneOf alphanum)
+	name = do
+		element
+		void (Parsec.char '.')
+		skipSepBy1 element (Parsec.char '.')
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Member names}
+
+\begin{multicols}{2}
+
+An interface, in turn, contains several \emph{members}, each identified by a
+\emph{member name} such as {\tt Introspect}. A member might be either a
+\emph{method}, which clients can call, or a \emph{signal}, which clients can
+wait for.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype MemberName = MemberName Text
+	deriving (Eq, Ord, Show)
+
+memberNameText :: MemberName -> Text
+memberNameText (MemberName text) = text
+
+memberName :: Text -> Maybe MemberName
+memberName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseMemberName text
+	return (MemberName text)
+
+memberName_ :: Text -> MemberName
+memberName_ = tryParse "member name" memberName
+
+instance Data.String.IsString MemberName where
+	fromString = memberName_ . Data.Text.pack
+
+instance IsVariant MemberName where
+	toVariant = toVariant . memberNameText
+	fromVariant = fromVariant >=> memberName
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Member names must contain only characters from the set {\tt [a-zA-Z0-9\_]},
+may not begin with a digit, and must be at least one character long.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+parseMemberName :: Parsec.Parser ()
+parseMemberName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_"
+	alphanum = alpha ++ ['0'..'9']
+	name = do
+		void (oneOf alpha)
+		Parsec.skipMany (oneOf alphanum)
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Error names}
+
+\begin{multicols}{2}
+
+Every error returned from a method call has an \emph{error name}, so
+clients can know (generally) what went wrong without having to parse the
+error message. Applications may define their own error names, or use one
+of the standardized names listed in section~\ref{sec:standard-error-names}.
+
+Error names have the same format as interface names, so the parser logic
+can be reused.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype ErrorName = ErrorName Text
+	deriving (Eq, Ord, Show)
+
+errorNameText :: ErrorName -> Text
+errorNameText (ErrorName text) = text
+
+errorName :: Text -> Maybe ErrorName
+errorName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseInterfaceName text
+	return (ErrorName text)
+
+errorName_ :: Text -> ErrorName
+errorName_ = tryParse "error name" errorName
+
+instance Data.String.IsString ErrorName where
+	fromString = errorName_ . Data.Text.pack
+
+instance IsVariant ErrorName where
+	toVariant = toVariant . errorNameText
+	fromVariant = fromVariant >=> errorName
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Bus names}
+
+\begin{multicols}{2}
+
+Bus names are used when connecting to a central message dispatch bus. Every
+connection is assigned a \emph{unique name}, such as {\tt :103.1}. This name
+is usually used by the bus to send signals and method returns to client
+applications.
+
+Additionally, applications may request a \emph{well-known} name such as
+{\tt org.freedesktop.DBus}. These are similar to internet hostnames; client
+applications are written to send messages to this address, where they can be
+served by whatever server happens to be running at the time.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+newtype BusName = BusName Text
+	deriving (Eq, Ord, Show)
+
+busNameText :: BusName -> Text
+busNameText (BusName text) = text
+
+busName :: Text -> Maybe BusName
+busName text = do
+	when (Data.Text.length text > 255) Nothing
+	runParser parseBusName text
+	return (BusName text)
+
+busName_ :: Text -> BusName
+busName_ = tryParse "bus name" busName
+
+instance Data.String.IsString BusName where
+	fromString = busName_ . Data.Text.pack
+
+instance IsVariant BusName where
+	toVariant = toVariant . busNameText
+	fromVariant = fromVariant >=> busName
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Unique names begin with {\tt `:'} and contain two or more elements, separated
+by {\tt `.'}. Each element consists of characters from the set
+{\tt [a-zA-Z0-9\_-]}.
+
+Well-known names contain two or more elements, separated by {\tt `.'}. Each
+element consists of characters from the set {\tt [a-zA-Z0-9\_-]}, and must
+not start with a digit.
+
+\vfill
+
+\columnbreak
+
+:d DBus.Types
+parseBusName :: Parsec.Parser ()
+parseBusName = name >> Parsec.eof where
+	alpha = ['a'..'z'] ++ ['A'..'Z'] ++ "_-"
+	alphanum = alpha ++ ['0'..'9']
+	
+	name = unique <|> wellKnown
+	unique = do
+		void (Parsec.char ':')
+		elements alphanum
+	
+	wellKnown = elements alpha
+	
+	elements start = do
+		element start
+		Parsec.skipMany1 $ do
+			void (Parsec.char '.')
+			element start
+	
+	element start = do
+		void (oneOf start)
+		Parsec.skipMany (oneOf alphanum)
+:
+
+\end{multicols}
+
+\clearpage
+\subsection{Container boxes}
+
+:d DBus.Types
+newtype Structure = Structure [Value]
+	deriving (Eq)
+
+instance Show Structure where
+	show (Structure xs) = showValue True (ValueStructure xs)
+
+instance IsVariant Structure where
+	toVariant (Structure xs) = Variant (ValueStructure xs)
+	fromVariant (Variant (ValueStructure xs)) = Just (Structure xs)
+	fromVariant _ = Nothing
+
+structureItems :: Structure -> [Variant]
+structureItems (Structure xs) = map Variant xs
+:
+
+:d DBus.Types
+data Array
+	= Array Type (Vector Value)
+	| ArrayBytes ByteString
+
+instance Show Array where
+	show (Array t xs) = showValue True (ValueVector t xs)
+	show (ArrayBytes xs) = showValue True (ValueBytes xs)
+
+instance Eq Array where
+	x == y = norm x == norm y where
+		norm (Array TypeWord8 xs) = Left (vectorToBytes xs)
+		norm (Array t xs) = Right (t, xs)
+		norm (ArrayBytes xs) = Left xs
+
+instance IsVariant Array where
+	toVariant (Array t xs) = Variant (ValueVector t xs)
+	toVariant (ArrayBytes bs) = Variant (ValueBytes bs)
+	fromVariant (Variant (ValueVector t xs)) = Just (Array t xs)
+	fromVariant (Variant (ValueBytes bs)) = Just (ArrayBytes bs)
+	fromVariant _ = Nothing
+
+arrayItems :: Array -> [Variant]
+arrayItems (Array _ xs) = map Variant (Data.Vector.toList xs)
+arrayItems (ArrayBytes bs) = map toVariant (Data.ByteString.unpack bs)
+:
+
+:d DBus.Types
+data Dictionary = Dictionary Type Type (Map Atom Value)
+	deriving (Eq)
+
+instance Show Dictionary where
+	show (Dictionary kt vt xs) = showValue True (ValueMap kt vt xs)
+
+instance IsVariant Dictionary where
+	toVariant (Dictionary kt vt xs) = Variant (ValueMap kt vt xs)
+	fromVariant (Variant (ValueMap kt vt xs)) = Just (Dictionary kt vt xs)
+	fromVariant _ = Nothing
+
+dictionaryItems :: Dictionary -> [(Variant, Variant)]
+dictionaryItems (Dictionary _ _ xs) = do
+	(k, v) <- Data.Map.toList xs
+	return (Variant (ValueAtom k), Variant v)
+:
+
+\begin{comment}
+\clearpage
+\subsection{Boring type instances}
+
+:d DBus.Types
+instance (IsValue a1, IsValue a2, IsValue a3) => IsValue (a1, a2, a3) where
+	typeOf ~(a1, a2, a3) = TypeStructure [typeOf a1, typeOf a2, typeOf a3]
+	toValue (a1, a2, a3) = ValueStructure [toValue a1, toValue a2, toValue a3]
+	fromValue (ValueStructure [a1, a2, a3]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		return (a1', a2', a3')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4) => IsValue (a1, a2, a3, a4) where
+	typeOf ~(a1, a2, a3, a4) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4]
+	toValue (a1, a2, a3, a4) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4]
+	fromValue (ValueStructure [a1, a2, a3, a4]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		return (a1', a2', a3', a4')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5) => IsValue (a1, a2, a3, a4, a5) where
+	typeOf ~(a1, a2, a3, a4, a5) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5]
+	toValue (a1, a2, a3, a4, a5) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		return (a1', a2', a3', a4', a5')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6) => IsValue (a1, a2, a3, a4, a5, a6) where
+	typeOf ~(a1, a2, a3, a4, a5, a6) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6]
+	toValue (a1, a2, a3, a4, a5, a6) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		return (a1', a2', a3', a4', a5', a6')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7) => IsValue (a1, a2, a3, a4, a5, a6, a7) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7]
+	toValue (a1, a2, a3, a4, a5, a6, a7) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		return (a1', a2', a3', a4', a5', a6', a7')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		return (a1', a2', a3', a4', a5', a6', a7', a8')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13, typeOf a14]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13, toValue a14]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		a14' <- fromValue a14
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14')
+	fromValue _ = Nothing
+
+instance (IsValue a1, IsValue a2, IsValue a3, IsValue a4, IsValue a5, IsValue a6, IsValue a7, IsValue a8, IsValue a9, IsValue a10, IsValue a11, IsValue a12, IsValue a13, IsValue a14, IsValue a15) => IsValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) where
+	typeOf ~(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = TypeStructure [typeOf a1, typeOf a2, typeOf a3, typeOf a4, typeOf a5, typeOf a6, typeOf a7, typeOf a8, typeOf a9, typeOf a10, typeOf a11, typeOf a12, typeOf a13, typeOf a14, typeOf a15]
+	toValue (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = ValueStructure [toValue a1, toValue a2, toValue a3, toValue a4, toValue a5, toValue a6, toValue a7, toValue a8, toValue a9, toValue a10, toValue a11, toValue a12, toValue a13, toValue a14, toValue a15]
+	fromValue (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15]) = do
+		a1' <- fromValue a1
+		a2' <- fromValue a2
+		a3' <- fromValue a3
+		a4' <- fromValue a4
+		a5' <- fromValue a5
+		a6' <- fromValue a6
+		a7' <- fromValue a7
+		a8' <- fromValue a8
+		a9' <- fromValue a9
+		a10' <- fromValue a10
+		a11' <- fromValue a11
+		a12' <- fromValue a12
+		a13' <- fromValue a13
+		a14' <- fromValue a14
+		a15' <- fromValue a15
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14', a15')
+	fromValue _ = Nothing
+:
+
+:d DBus.Types
+instance (IsVariant a1, IsVariant a2, IsVariant a3) => IsVariant (a1, a2, a3) where
+	toVariant (a1, a2, a3) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3])
+	fromVariant (Variant (ValueStructure [a1, a2, a3])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		return (a1', a2', a3')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4) => IsVariant (a1, a2, a3, a4) where
+	toVariant (a1, a2, a3, a4) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		return (a1', a2', a3', a4')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5) => IsVariant (a1, a2, a3, a4, a5) where
+	toVariant (a1, a2, a3, a4, a5) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		return (a1', a2', a3', a4', a5')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6) => IsVariant (a1, a2, a3, a4, a5, a6) where
+	toVariant (a1, a2, a3, a4, a5, a6) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		return (a1', a2', a3', a4', a5', a6')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7) => IsVariant (a1, a2, a3, a4, a5, a6, a7) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		return (a1', a2', a3', a4', a5', a6', a7')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		return (a1', a2', a3', a4', a5', a6', a7', a8')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13, varToVal a14])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		a14' <- (fromVariant . Variant) a14
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14')
+	fromVariant _ = Nothing
+
+instance (IsVariant a1, IsVariant a2, IsVariant a3, IsVariant a4, IsVariant a5, IsVariant a6, IsVariant a7, IsVariant a8, IsVariant a9, IsVariant a10, IsVariant a11, IsVariant a12, IsVariant a13, IsVariant a14, IsVariant a15) => IsVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) where
+	toVariant (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) = Variant (ValueStructure [varToVal a1, varToVal a2, varToVal a3, varToVal a4, varToVal a5, varToVal a6, varToVal a7, varToVal a8, varToVal a9, varToVal a10, varToVal a11, varToVal a12, varToVal a13, varToVal a14, varToVal a15])
+	fromVariant (Variant (ValueStructure [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15])) = do
+		a1' <- (fromVariant . Variant) a1
+		a2' <- (fromVariant . Variant) a2
+		a3' <- (fromVariant . Variant) a3
+		a4' <- (fromVariant . Variant) a4
+		a5' <- (fromVariant . Variant) a5
+		a6' <- (fromVariant . Variant) a6
+		a7' <- (fromVariant . Variant) a7
+		a8' <- (fromVariant . Variant) a8
+		a9' <- (fromVariant . Variant) a9
+		a10' <- (fromVariant . Variant) a10
+		a11' <- (fromVariant . Variant) a11
+		a12' <- (fromVariant . Variant) a12
+		a13' <- (fromVariant . Variant) a13
+		a14' <- (fromVariant . Variant) a14
+		a15' <- (fromVariant . Variant) a15
+		return (a1', a2', a3', a4', a5', a6', a7', a8', a9', a10', a11', a12', a13', a14', a15')
+	fromVariant _ = Nothing
+:
+
+\end{comment}
diff --git a/src/util.anansi b/src/util.anansi
deleted file mode 100644
--- a/src/util.anansi
+++ /dev/null
@@ -1,233 +0,0 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{UUIDs}
-
-D-Bus {\sc uuid}s are 128-bit unique identifiers, used for server instances
-and machine {\sc id}s. They are not compatible with {\sc rfc4122}.
-
-:f DBus/UUID.hs
-|copyright|
-module DBus.UUID
-	( UUID
-	, toHex
-	, fromHex
-	) where
-|text imports|
-
-newtype UUID = UUID Text -- TODO: (Word64, Word64)?
-	deriving (Eq)
-
-instance Show UUID where
-	showsPrec d uuid = showParen (d > 10) $
-		showString "UUID " . shows (toHex uuid)
-
-toHex :: UUID -> Text
-toHex (UUID text) = text
-
-fromHex :: Text -> Maybe UUID
-fromHex text = if validUUID text
-	then Just $ UUID text
-	else Nothing
-
-validUUID :: Text -> Bool
-validUUID text = valid where
-	valid = and [TL.length text == 32, TL.all validChar text]
-	validChar c = or
-		[ c >= '0' && c <= '9'
-		, c >= 'a' && c <= 'f'
-		, c >= 'A' && c <= 'F'
-		]
-:
-
-\section{Misc. utility functions}
-
-:f DBus/Util.hs
-|copyright|
-module DBus.Util where
-import Text.ParserCombinators.Parsec (Parser, parse)
-import Data.Char (digitToInt)
-import Data.List (isPrefixOf)
-
-checkLength :: Int -> String -> Maybe String
-checkLength length' s | length s <= length' = Just s
-checkLength _ _ = Nothing
-
-parseMaybe :: Parser a -> String -> Maybe a
-parseMaybe p = either (const Nothing) Just . parse p ""
-
-mkUnsafe :: Show a => String -> (a -> Maybe b) -> a -> b
-mkUnsafe label f x = case f x of
-	Just x' -> x'
-	Nothing -> error $ "Invalid " ++ label ++ ": " ++ show x
-
-hexToInt :: String -> Int
-hexToInt = foldl ((+) . (16 *)) 0 . map digitToInt
-
-eitherToMaybe :: Either a b -> Maybe b
-eitherToMaybe (Left  _) = Nothing
-eitherToMaybe (Right x) = Just x
-
-fromRight :: Either a b -> b
-fromRight (Right x) = x
-fromRight _ = error "DBus.Util.fromRight: Left"
-
-maybeIndex :: [a] -> Int -> Maybe a
-maybeIndex (x:_ ) 0         = Just x
-maybeIndex (_:xs) n | n > 0 = maybeIndex xs (n - 1)
-maybeIndex _ _ = Nothing
-
--- | Read values from a monad until a guard value is read; return all
--- values, including the guard.
---
-readUntil :: (Monad m, Eq a) => [a] -> m a -> m [a]
-readUntil guard getx = readUntil' [] where
-	guard' = reverse guard
-	step xs | isPrefixOf guard' xs = return . reverse $ xs
-	        | otherwise            = readUntil' xs
-	readUntil' xs = do
-		x <- getx
-		step $ x:xs
-
--- | Drop /n/ items from the end of a list
-dropEnd :: Int -> [a] -> [a]
-dropEnd n xs = take (length xs - n) xs
-
-void :: Monad m => m a -> m ()
-void m = m >> return ()
-:
-
-\subsection{Bundled ErrorT variant}
-
-The default {\tt ErrorT} type in the {\tt transformers} package has an idiotic
-dependency on the {\tt Error} class, which is used to implement the obsolete
-{\tt fail} function. This module is a variant, which doesn't include this
-dependency.
-
-:f DBus/Util/MonadError.hs
-|copyright|
-module DBus.Util.MonadError
-	( ErrorM (..)
-	, ErrorT (..)
-	, throwErrorM
-	, throwErrorT
-	) where
-newtype ErrorM e a = ErrorM { runErrorM :: Either e a }
-
-instance Functor (ErrorM e) where
-	fmap f m = ErrorM $ case runErrorM m of
-		Left err -> Left err
-		Right x -> Right $ f x
-
-instance Monad (ErrorM e) where
-	return = ErrorM . Right
-	(>>=) m k = case runErrorM m of
-		Left err -> ErrorM $ Left err
-		Right x -> k x
-
-throwErrorM :: e -> ErrorM e a
-throwErrorM = ErrorM . Left
-
-newtype ErrorT e m a = ErrorT { runErrorT :: m (Either e a) }
-
-instance Monad m => Monad (ErrorT e m) where
-	return = ErrorT . return . Right
-	(>>=) m k = ErrorT $ do
-		x <- runErrorT m
-		case x of
-			Left l -> return $ Left l
-			Right r -> runErrorT $ k r
-
-throwErrorT :: Monad m => e -> ErrorT e m a
-throwErrorT = ErrorT . return . Left
-:
-
-\subsection{Extra test support}
-
-The test suite requires a whole bunch of imports
-
-:d test imports
-import Test.QuickCheck
-import qualified Test.Framework as F
-import Test.Framework.Providers.QuickCheck2 (testProperty)
-
-import Control.Arrow ((&&&))
-import Control.Monad (replicateM)
-import qualified Data.Binary.Get as G
-import Data.Char (isPrint)
-import Data.String
-import Data.List (intercalate, isInfixOf)
-import Data.Maybe (fromJust, isJust, isNothing)
-import qualified Data.Map as Map
-import qualified Data.Set as Set
-import qualified Data.Text as T
-import qualified Data.Text.Lazy as TL
-import Data.Word (Word8, Word16, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-
-import DBus.Address
-import DBus.Message.Internal
-import DBus.Types
-import DBus.Wire.Internal
-import DBus.Wire.Marshal
-import DBus.Wire.Unmarshal
-import qualified DBus.Introspection as I
-:
-
-:f Tests.hs
-halfSized :: Gen a -> Gen a
-halfSized gen = sized $ \n -> if n > 0 then
-	resize (n `div` 2) gen
-	else gen
-
-funEq :: Eq b => (a -> b) -> (a -> b) -> a -> Bool
-funEq f g x = f x == g x
-
-sizedText :: (IsString a, Arbitrary a) => Integer -> Gen TL.Text -> Gen a
-sizedText maxSize gen = step where
-	step = do
-		s <- gen
-		if toInteger (TL.length s) > maxSize
-			then halfSized step
-			else return . fromString . TL.unpack $ s
-
-atLeast :: Int -> Gen a -> Gen [a]
-atLeast minSize g = sized $ \n -> do
-	count <- choose (minSize, max minSize n)
-	replicateM count g
-
-isRight :: Either a b -> Bool
-isRight = either (const False) (const True)
-:
-
-Some tests, such as address parsing, are single-case tests instead of
-the more common ``property''. This function lets them be run only once.
-
-:f Tests.hs
-test :: Testable a => F.TestName -> a -> F.Test
-test name prop = F.plusTestOptions options (testProperty name prop) where
-	options = F.TestOptions Nothing (Just 1) Nothing Nothing
-:
-
-QuickCheck doesn't define instances for fixed-size integral types or
-variants of {\tt Text}, so define them here.
-
-:f Tests.hs
-instance Arbitrary T.Text where
-	arbitrary = fmap T.pack arbitrary
-
-instance Arbitrary TL.Text where
-	arbitrary = fmap TL.pack arbitrary
-:
diff --git a/src/utilities.anansi b/src/utilities.anansi
new file mode 100644
--- /dev/null
+++ b/src/utilities.anansi
@@ -0,0 +1,114 @@
+:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\section{Miscellaneous}
+
+:f DBus/Util.hs
+|copyright|
+module DBus.Util
+	( hexToInt
+	, maybeIndex
+	, readUntil
+	, dropEnd
+	, void
+	, untilM
+	) where
+import Data.Char (digitToInt)
+import Data.List (isPrefixOf)
+
+hexToInt :: String -> Int
+hexToInt = foldl ((+) . (16 *)) 0 . map digitToInt
+
+maybeIndex :: [a] -> Int -> Maybe a
+maybeIndex (x:_ ) 0         = Just x
+maybeIndex (_:xs) n | n > 0 = maybeIndex xs (n - 1)
+maybeIndex _ _ = Nothing
+
+-- | Read values from a monad until a guard value is read; return all
+-- values, including the guard.
+--
+readUntil :: (Monad m, Eq a) => [a] -> m a -> m [a]
+readUntil guard getx = readUntil' [] where
+	guard' = reverse guard
+	step xs | isPrefixOf guard' xs = return . reverse $ xs
+	        | otherwise            = readUntil' xs
+	readUntil' xs = do
+		x <- getx
+		step $ x:xs
+
+-- | Drop /n/ items from the end of a list
+dropEnd :: Int -> [a] -> [a]
+dropEnd n xs = take (length xs - n) xs
+
+void :: Monad m => m a -> m ()
+void m = m >> return ()
+:
+
+:f DBus/Util.hs
+untilM :: Monad m => m Bool -> m a -> m [a]
+untilM test comp = do
+	done <- test
+	if done
+		then return []
+		else do
+			x <- comp
+			xs <- untilM test comp
+			return (x:xs)
+:
+
+\subsection*{Bundled ErrorT variant}
+
+The default {\tt ErrorT} type in the {\tt transformers} package has an idiotic
+dependency on the {\tt Error} class, which is used to implement the obsolete
+{\tt fail} function. This module is a variant, which doesn't include this
+dependency.
+
+:f DBus/Util/MonadError.hs
+|copyright|
+module DBus.Util.MonadError
+	( ErrorM (..)
+	, ErrorT (..)
+	, throwErrorM
+	, throwErrorT
+	) where
+newtype ErrorM e a = ErrorM { runErrorM :: Either e a }
+
+instance Functor (ErrorM e) where
+	fmap f m = ErrorM $ case runErrorM m of
+		Left err -> Left err
+		Right x -> Right $ f x
+
+instance Monad (ErrorM e) where
+	return = ErrorM . Right
+	(>>=) m k = case runErrorM m of
+		Left err -> ErrorM $ Left err
+		Right x -> k x
+
+throwErrorM :: e -> ErrorM e a
+throwErrorM = ErrorM . Left
+
+newtype ErrorT e m a = ErrorT { runErrorT :: m (Either e a) }
+
+instance Monad m => Monad (ErrorT e m) where
+	return = ErrorT . return . Right
+	(>>=) m k = ErrorT $ do
+		x <- runErrorT m
+		case x of
+			Left l -> return $ Left l
+			Right r -> runErrorT $ k r
+
+throwErrorT :: Monad m => e -> ErrorT e m a
+throwErrorT = ErrorT . return . Left
+:
diff --git a/src/wire.anansi b/src/wire.anansi
--- a/src/wire.anansi
+++ b/src/wire.anansi
@@ -1,1233 +1,1092 @@
-:# Copyright (C) 2009-2010 John Millikin <jmillikin@gmail.com>
-:# 
-:# This program is free software: you can redistribute it and/or modify
-:# it under the terms of the GNU General Public License as published by
-:# the Free Software Foundation, either version 3 of the License, or
-:# any later version.
-:# 
-:# This program is distributed in the hope that it will be useful,
-:# but WITHOUT ANY WARRANTY; without even the implied warranty of
-:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-:# GNU General Public License for more details.
-:# 
-:# You should have received a copy of the GNU General Public License
-:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-\section{Wire format}
-
-{\tt DBus.Wire} is also split into an internal and external interface.
-
-:f DBus/Wire.hs
-|copyright|
-module DBus.Wire (
-	|wire exports|
-	) where
-import DBus.Wire.Internal
-import DBus.Wire.Marshal
-import DBus.Wire.Unmarshal
-:
-
-:f DBus/Wire/Internal.hs
-|copyright|
-module DBus.Wire.Internal where
-import Data.Word (Word8, Word64)
-import qualified DBus.Types as T
-:
-
-\subsection{Endianness}
-
-:f DBus/Wire/Internal.hs
-data Endianness = LittleEndian | BigEndian
-	deriving (Show, Eq)
-
-encodeEndianness :: Endianness -> Word8
-encodeEndianness LittleEndian = 108
-encodeEndianness BigEndian    = 66
-
-decodeEndianness :: Word8 -> Maybe Endianness
-decodeEndianness 108 = Just LittleEndian
-decodeEndianness 66  = Just BigEndian
-decodeEndianness _   = Nothing
-:
-
-:d wire exports
-  Endianness (..)
-:
-
-:f Tests.hs
-instance Arbitrary Endianness where
-	arbitrary = elements [LittleEndian, BigEndian]
-:
-
-\subsection{Alignment}
-
-Every built-in type has an associated alignment. If a value of the given
-type is marshaled, it must have {\sc nul} bytes inserted until it starts
-on a byte index divisible by its alignment.
-
-:f DBus/Wire/Internal.hs
-alignment :: T.Type -> Word8
-|alignments|
-
-padding :: Word64 -> Word8 -> Word64
-padding current count = required where
-	count' = fromIntegral count
-	missing = mod current count'
-	required = if missing > 0
-		then count' - missing
-		else 0
-:
-
-\subsection{Marshaling}
-
-Marshaling is implemented using an error transformer over an internal
-state. The {\tt Builder} type is used for efficient construction of lazy
-byte strings, but it doesn't provide any way to retrieve the length of its
-internal buffer, so the byte count is tracked separately.
-
-:f DBus/Wire/Marshal.hs
-|copyright|
-{-# LANGUAGE TypeFamilies #-}
-module DBus.Wire.Marshal where
-|text imports|
-|marshal imports|
-import DBus.Wire.Internal
-import Control.Monad (when)
-import Data.Maybe (fromJust)
-import Data.Word (Word8, Word32, Word64)
-import Data.Int (Int64)
-
-import qualified DBus.Types as T
-import qualified DBus.Types.Internal as T
-:
-
-:d marshal imports
-import qualified Data.ByteString as BS
-import qualified Data.ByteString.Lazy as L
-import qualified Data.Binary.Builder as B
-:
-
-:f DBus/Wire/Marshal.hs
-data MarshalState = MarshalState {-# UNPACK #-} !B.Builder {-# UNPACK #-} !Word64
-
-data MarshalR a = MarshalRL MarshalError | MarshalRR a {-# UNPACK #-} !MarshalState
-
-type Marshal = MarshalM ()
-newtype MarshalM a = MarshalM { unMarshalM :: Endianness -> MarshalState -> MarshalR a }
-
-instance Monad MarshalM where
-	{-# INLINE return #-}
-	return a = MarshalM $ \_ s -> MarshalRR a s
-	
-	{-# INLINE (>>=) #-}
-	m >>= k = MarshalM $ \e s -> case unMarshalM m e s of
-		MarshalRL err -> MarshalRL err
-		MarshalRR a s' -> unMarshalM (k a) e s'
-	
-	{-# INLINE (>>) #-}
-	m >> k = MarshalM $ \e s -> case unMarshalM m e s of
-		MarshalRL err -> MarshalRL err
-		MarshalRR _ s' -> unMarshalM k e s'
-
-throwError :: MarshalError -> MarshalM a
-throwError err = MarshalM $ \_ _ -> MarshalRL err
-
-{-# INLINE getState #-}
-getState :: MarshalM MarshalState
-getState = MarshalM $ \_ s -> MarshalRR s s
-
-{-# INLINE putState #-}
-putState :: MarshalState -> MarshalM ()
-putState s = MarshalM $ \_ _ -> MarshalRR () s
-:
-
-Clients can perform marshaling via {\tt marshal} and {\tt runMarshal},
-which will generate a {\tt ByteString} with the fully marshaled data.
-
-:f DBus/Wire/Marshal.hs
-runMarshal :: Marshal -> Endianness -> Either MarshalError L.ByteString
-runMarshal m e = case unMarshalM m e (MarshalState B.empty 0) of
-	MarshalRL err -> Left err
-	MarshalRR _ (MarshalState builder _) -> Right $ B.toLazyByteString builder
-:
-
-:f DBus/Wire/Marshal.hs
-marshal :: T.Variant -> Marshal
-marshal v = case v of
-	|marshalers|
-:
-
-TODO: describe these functions
-
-:f DBus/Wire/Marshal.hs
-appendS :: BS.ByteString -> Marshal
-appendS bytes = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.fromByteString bytes
-	count' = count + fromIntegral (BS.length bytes)
-	in MarshalRR () (MarshalState builder' count')
-:
-
-:f DBus/Wire/Marshal.hs
-appendL :: L.ByteString -> Marshal
-appendL bytes = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.fromLazyByteString bytes
-	count' = count + fromIntegral (L.length bytes)
-	in MarshalRR () (MarshalState builder' count')
-:
-
-:f DBus/Wire/Marshal.hs
-pad :: Word8 -> Marshal
-pad count = MarshalM $ \e s@(MarshalState _ existing) -> let
-	padding' = fromIntegral $ padding existing count
-	bytes = BS.replicate padding' 0
-	in unMarshalM (appendS bytes) e s
-:
-
-Most numeric values already have marshalers implemented in the
-{\tt Data.Binary.Builder} module; this function lets them be re-used easily.
-
-:f DBus/Wire/Marshal.hs
-marshalBuilder :: Word8 -> (a -> B.Builder) -> (a -> B.Builder) -> a -> Marshal
-marshalBuilder size be le x = do
-	pad size
-	MarshalM $ \e (MarshalState builder count) -> let
-		builder' = B.append builder $ case e of
-			BigEndian -> be x
-			LittleEndian -> le x
-		size' = fromIntegral size
-		in MarshalRR () (MarshalState builder' (count + size'))
-:
-
-\subsubsection{Errors}
-
-Marshaling can fail for four reasons:
-
-\begin{itemize}
-\item The message exceeds the maximum message size of $2^{27}$ bytes.
-\item An array in the message exceeds the maximum array size of $2^{26}$ bytes.
-\item The body's signature is not valid (for example, more than 255 fields).
-\item A variant's signature is not valid -- same causes as an invalid body
-      signature.
-\item Some text is invalid -- for example, it contains {\sc nul}
-      ({\tt '\textbackslash{}0'}) or invalid Unicode.
-\end{itemize}
-
-:f DBus/Wire/Marshal.hs
-data MarshalError
-	= MessageTooLong Word64
-	| ArrayTooLong Word64
-	| InvalidBodySignature Text
-	| InvalidVariantSignature Text
-	| InvalidText Text
-	deriving (Eq)
-
-instance Show MarshalError where
-	show (MessageTooLong x) = concat
-		["Message too long (", show x, " bytes)."]
-	show (ArrayTooLong x) = concat
-		["Array too long (", show x, " bytes)."]
-	show (InvalidBodySignature x) = concat
-		["Invalid body signature: ", show x]
-	show (InvalidVariantSignature x) = concat
-		["Invalid variant signature: ", show x]
-	show (InvalidText x) = concat
-		["Text cannot be marshaled: ", show x]
-:
-
-:d wire exports
-, MarshalError (..)
-:
-
-\subsection{Unmarshaling}
-
-Unmarshaling also uses an error transformer and internal state.
-
-:f DBus/Wire/Unmarshal.hs
-|copyright|
-|text extensions|
-{-# LANGUAGE TypeFamilies #-}
-module DBus.Wire.Unmarshal where
-|text imports|
-|unmarshal imports|
-import Control.Monad (when, unless)
-import Data.Maybe (fromJust, listToMaybe, fromMaybe)
-import Data.Word (Word8, Word32, Word64)
-import Data.Int (Int16, Int32, Int64)
-
-import DBus.Wire.Internal
-import qualified DBus.Types.Internal as T
-import DBus.Util (void)
-:
-
-:d unmarshal imports
-import Control.Monad (liftM)
-import qualified DBus.Util.MonadError as E
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Lazy as BL
-:
-
-A specialised, state-like monad is used for performance reasons. This is
-equivalent to {\tt State.StateT UnmarshalState (E.ErrorM UnmarshalError)}.
-
-:f DBus/Wire/Unmarshal.hs
-data UnmarshalState = UnmarshalState BL.ByteString {-# UNPACK #-} !Word64
-
-data UnmarshalR a = UnmarshalRL UnmarshalError | UnmarshalRR a {-# UNPACK #-} !UnmarshalState
-
-newtype Unmarshal a = Unmarshal { unUnmarshal :: Endianness -> UnmarshalState -> UnmarshalR a }
-
-instance Monad Unmarshal where
-	{-# INLINE return #-}
-	return a = Unmarshal $ \_ s -> UnmarshalRR a s
-	
-	{-# INLINE (>>=) #-}
-	m >>= k = Unmarshal $ \e s -> case unUnmarshal m e s of
-		UnmarshalRL err -> UnmarshalRL err
-		UnmarshalRR a s' -> unUnmarshal (k a) e s'
-	
-	{-# INLINE (>>) #-}
-	m >> k = Unmarshal $ \e s -> case unUnmarshal m e s of
-		UnmarshalRL err -> UnmarshalRL err
-		UnmarshalRR _ s' -> unUnmarshal k e s'
-
-throwError :: UnmarshalError -> Unmarshal a
-throwError err = Unmarshal $ \_ _ -> UnmarshalRL err
-
-{-# INLINE getState #-}
-getState :: Unmarshal UnmarshalState
-getState = Unmarshal $ \_ s -> UnmarshalRR s s
-
-{-# INLINE putState #-}
-putState :: UnmarshalState -> Unmarshal ()
-putState s = Unmarshal $ \_ _ -> UnmarshalRR () s
-:
-
-:f DBus/Wire/Unmarshal.hs
-runUnmarshal :: Unmarshal a -> Endianness -> BL.ByteString -> Either UnmarshalError a
-runUnmarshal m e bytes = case unUnmarshal m e (UnmarshalState bytes 0) of
-	UnmarshalRL err -> Left err
-	UnmarshalRR a _ -> Right a
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshal :: T.Signature -> Unmarshal [T.Variant]
-unmarshal = mapM unmarshalType . T.signatureTypes
-
-unmarshalType :: T.Type -> Unmarshal T.Variant
-|unmarshalers|
-:
-
-TODO: describe these functions
-
-:f DBus/Wire/Unmarshal.hs
-{-# INLINE consume #-}
-consume :: Word64 -> Unmarshal BL.ByteString
-consume count = Unmarshal $ \_ (UnmarshalState bytes offset) -> let
-	count' = fromIntegral count
-	(x, bytes') = BL.splitAt count' bytes
-	in if BL.length x == count'
-		then UnmarshalRR x (UnmarshalState bytes' (offset + count))
-		else UnmarshalRL $ UnexpectedEOF offset
-:
-
-:f DBus/Wire/Unmarshal.hs
-skipPadding :: Word8 -> Unmarshal ()
-skipPadding count = do
-	(UnmarshalState _ offset) <- getState
-	bytes <- consume $ padding offset count
-	unless (BL.all (== 0) bytes) $
-		throwError $ InvalidPadding offset
-:
-
-:f DBus/Wire/Unmarshal.hs
-skipTerminator :: Unmarshal ()
-skipTerminator = do
-	(UnmarshalState _ offset) <- getState
-	bytes <- consume 1
-	unless (BL.all (== 0) bytes) $
-		throwError $ MissingTerminator offset
-:
-
-:f DBus/Wire/Unmarshal.hs
-fromMaybeU :: Show a => Text -> (a -> Maybe b) -> a -> Unmarshal b
-fromMaybeU label f x = case f x of
-	Just x' -> return x'
-	Nothing -> throwError . Invalid label . TL.pack . show $ x
-
-fromMaybeU' :: (Show a, T.Variable b) => Text -> (a -> Maybe b) -> a
-           -> Unmarshal T.Variant
-fromMaybeU' label f x = do
-	x' <- fromMaybeU label f x
-	return $ T.toVariant x'
-:
-
-:d unmarshal imports
-import qualified Data.Binary.Get as G
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalGet :: Word8 -> G.Get a -> G.Get a -> Unmarshal a
-unmarshalGet count be le = do
-	skipPadding count
-	bs <- consume . fromIntegral $ count
-	
-	Unmarshal $ \e s -> let
-		get = case e of
-			BigEndian -> be
-			LittleEndian -> le
-		in UnmarshalRR (G.runGet get bs) s
-
-unmarshalGet' :: T.Variable a => Word8 -> G.Get a -> G.Get a
-              -> Unmarshal T.Variant
-unmarshalGet' count be le = T.toVariant `liftM` unmarshalGet count be le
-:
-
-:f DBus/Wire/Unmarshal.hs
-untilM :: Monad m => m Bool -> m a -> m [a]
-untilM test comp = do
-	done <- test
-	if done
-		then return []
-		else do
-			x <- comp
-			xs <- untilM test comp
-			return $ x:xs
-:
-
-\subsubsection{Errors}
-
-Unmarshaling can fail for four reasons:
-
-\begin{itemize}
-\item The message's declared protocol version is unsupported.
-\item Unexpected {\sc eof}, when there are less bytes remaining than are
-      required.
-\item An invalid byte sequence for a given value type.
-\item Missing required header fields for the declared message type.
-\item Non-zero bytes were found where padding was expected.
-\item A string, signature, or object path was not {\sc null}-terminated.
-\item An array's size didn't match the number of elements
-\end{itemize}
-
-:f DBus/Wire/Unmarshal.hs
-data UnmarshalError
-	= UnsupportedProtocolVersion Word8
-	| UnexpectedEOF Word64
-	| Invalid Text Text
-	| MissingHeaderField Text
-	| InvalidHeaderField Text T.Variant
-	| InvalidPadding Word64
-	| MissingTerminator Word64
-	| ArraySizeMismatch
-	deriving (Eq)
-
-instance Show UnmarshalError where
-	show (UnsupportedProtocolVersion x) = concat
-		["Unsupported protocol version: ", show x]
-	show (UnexpectedEOF pos) = concat
-		["Unexpected EOF at position ", show pos]
-	show (Invalid label x) = TL.unpack $ TL.concat
-		["Invalid ", label, ": ", x]
-	show (MissingHeaderField x) = concat
-		["Required field " , show x , " is missing."]
-	show (InvalidHeaderField x got) = concat
-		[ "Invalid header field ", show x, ": ", show got]
-	show (InvalidPadding pos) = concat
-		["Invalid padding at position ", show pos]
-	show (MissingTerminator pos) = concat
-		["Missing NUL terminator at position ", show pos]
-	show ArraySizeMismatch = "Array size mismatch"
-:
-
-:d wire exports
-, UnmarshalError (..)
-:
-
-\subsection{Numerics}
-
-Numeric values are fixed-length, and aligned ``naturally'' -- ie, a 4-byte
-integer will have a 4-byte alignment.
-
-:d alignments
-alignment T.DBusByte    = 1
-alignment T.DBusWord16  = 2
-alignment T.DBusWord32  = 4
-alignment T.DBusWord64  = 8
-alignment T.DBusInt16   = 2
-alignment T.DBusInt32   = 4
-alignment T.DBusInt64   = 8
-alignment T.DBusDouble  = 8
-:
-
-Because some integral types are often used as components of other values,
-there's separate functions for handling them.
-
-:f DBus/Wire/Marshal.hs
-marshalWord32 :: Word32 -> Marshal
-marshalWord32 = marshalBuilder 4 B.putWord32be B.putWord32le
-:
-
-:f DBus/Wire/Marshal.hs
-{-# INLINE marshalWord8 #-}
-marshalWord8 :: Word8 -> Marshal
-marshalWord8 x = MarshalM $ \_ (MarshalState builder count) -> let
-	builder' = B.append builder $ B.singleton x
-	in MarshalRR () (MarshalState builder' (count + 1))
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalWord32 :: Unmarshal Word32
-unmarshalWord32 = unmarshalGet 4 G.getWord32be G.getWord32le
-:
-
-:d marshalers
-T.VarBoxWord8  x -> marshalWord8 x
-T.VarBoxWord16 x -> marshalBuilder 2 B.putWord16be B.putWord16le x
-T.VarBoxWord32 x -> marshalWord32 x
-T.VarBoxWord64 x -> marshalBuilder 8 B.putWord64be B.putWord64le x
-T.VarBoxInt16  x -> marshalBuilder 2 B.putWord16be B.putWord16le $ fromIntegral x
-T.VarBoxInt32  x -> marshalBuilder 4 B.putWord32be B.putWord32le $ fromIntegral x
-T.VarBoxInt64  x -> marshalBuilder 8 B.putWord64be B.putWord64le $ fromIntegral x
-:
-
-:d unmarshalers
-unmarshalType T.DBusByte = liftM (T.toVariant . BL.head) $ consume 1
-unmarshalType T.DBusWord16 = unmarshalGet' 2 G.getWord16be G.getWord16le
-unmarshalType T.DBusWord32 = unmarshalGet' 4 G.getWord32be G.getWord32le
-unmarshalType T.DBusWord64 = unmarshalGet' 8 G.getWord64be G.getWord64le
-
-unmarshalType T.DBusInt16  = do
-	x <- unmarshalGet 2 G.getWord16be G.getWord16le
-	return . T.toVariant $ (fromIntegral x :: Int16)
-
-unmarshalType T.DBusInt32  = do
-	x <- unmarshalGet 4 G.getWord32be G.getWord32le
-	return . T.toVariant $ (fromIntegral x :: Int32)
-
-unmarshalType T.DBusInt64  = do
-	x <- unmarshalGet 8 G.getWord64be G.getWord64le
-	return . T.toVariant $ (fromIntegral x :: Int64)
-:
-
-{\tt Double}s are marshaled as in-bit IEEE-754 floating-point format.
-
-:d marshal imports
-import Data.Binary.Put (runPut)
-import qualified Data.Binary.IEEE754 as IEEE
-:
-
-:d unmarshal imports
-import qualified Data.Binary.IEEE754 as IEEE
-:
-
-:d marshalers
-T.VarBoxDouble x -> marshalDouble x
-:
-
-:f DBus/Wire/Marshal.hs
-marshalDouble :: Double -> Marshal
-marshalDouble x = do
-	pad 8
-	MarshalM $ \e s -> let
-		put = case e of
-			BigEndian -> IEEE.putFloat64be
-			LittleEndian -> IEEE.putFloat64le
-		bytes = runPut $ put x
-		in unMarshalM (appendL bytes) e s
-:
-
-:d unmarshalers
-unmarshalType T.DBusDouble = unmarshalGet' 8 IEEE.getFloat64be IEEE.getFloat64le
-:
-
-\subsection{Booleans}
-
-Booleans are marshaled as 4-byte unsigned integers containing either of
-the values 0 or 1. Yes, really.
-
-:d alignments
-alignment T.DBusBoolean = 4
-:
-
-:d marshalers
-T.VarBoxBool x -> marshalWord32 $ if x then 1 else 0
-:
-
-:d unmarshalers
-unmarshalType T.DBusBoolean = unmarshalWord32 >>=
-	fromMaybeU' "boolean" (\x -> case x of
-		0 -> Just False
-		1 -> Just True
-		_ -> Nothing)
-:
-
-\subsection{Strings and object paths}
-
-Strings are encoded in {\sc utf-8}, terminated with {\tt NUL}, and prefixed
-with their length as an unsigned 32-bit integer. Their alignment is that of
-their length. Object paths are marshaled just like strings, though additional
-checks are required when unmarshaling.
-
-Because the encoding functions from {\tt Data.Text} raise exceptions on
-error, checking their return value requires some ugly workarounds.
-
-:f DBus/Wire/Unicode.hs
-|copyright|
-module DBus.Wire.Unicode
-	( maybeEncodeUtf8
-	, maybeDecodeUtf8) where
-import Data.ByteString.Lazy (ByteString)
-import Data.Text.Lazy (Text)
-import Data.Text.Lazy.Encoding (encodeUtf8, decodeUtf8)
-import Data.Text.Encoding.Error (UnicodeException)
-import qualified Control.Exception as Exc
-import System.IO.Unsafe (unsafePerformIO)
-
-excToMaybe :: a -> Maybe a
-excToMaybe x = unsafePerformIO $ fmap Just (Exc.evaluate x) `Exc.catch` unicodeError
-
-unicodeError :: UnicodeException -> IO (Maybe a)
-unicodeError = const $ return Nothing
-
-maybeEncodeUtf8 :: Text -> Maybe ByteString
-maybeEncodeUtf8 = excToMaybe . encodeUtf8
-
-maybeDecodeUtf8 :: ByteString -> Maybe Text
-maybeDecodeUtf8 = excToMaybe . decodeUtf8
-:
-
-:d marshal imports
-import DBus.Wire.Unicode (maybeEncodeUtf8)
-:
-
-:f DBus/Wire/Marshal.hs
-marshalText :: Text -> Marshal
-marshalText x = do
-	bytes <- case maybeEncodeUtf8 x of
-		Just x' -> return x'
-		Nothing -> throwError $ InvalidText x
-	when (L.any (== 0) bytes) $
-		throwError $ InvalidText x
-	marshalWord32 . fromIntegral . L.length $ bytes
-	appendL bytes
-	marshalWord8 0
-:
-
-:d unmarshal imports
-import DBus.Wire.Unicode (maybeDecodeUtf8)
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalText :: Unmarshal Text
-unmarshalText = do
-	byteCount <- unmarshalWord32
-	bytes <- consume . fromIntegral $ byteCount
-	skipTerminator
-	fromMaybeU "text" maybeDecodeUtf8 bytes
-:
-
-:d alignments
-alignment T.DBusString     = 4
-alignment T.DBusObjectPath = 4
-:
-
-:d marshalers
-T.VarBoxString x -> marshalText x
-T.VarBoxObjectPath x -> marshalText . T.strObjectPath $ x
-:
-
-:d unmarshalers
-unmarshalType T.DBusString = liftM T.toVariant unmarshalText
-
-unmarshalType T.DBusObjectPath = unmarshalText >>=
-	fromMaybeU' "object path" T.mkObjectPath
-:
-
-\subsection{Signatures}
-
-Signatures are similar to strings, except their length is limited to 255
-characters and is therefore stored as a single byte.
-
-:f DBus/Wire/Marshal.hs
-marshalSignature :: T.Signature -> Marshal
-marshalSignature x = do
-	let bytes = T.bytesSignature x
-	let size = fromIntegral . BS.length $ bytes
-	marshalWord8 size
-	appendS bytes
-	marshalWord8 0
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalSignature :: Unmarshal T.Signature
-unmarshalSignature = do
-	byteCount <- BL.head `liftM` consume 1
-	lazy <- consume $ fromIntegral byteCount
-	skipTerminator
-	let bytes = B.concat $ BL.toChunks lazy
-	fromMaybeU "signature" T.mkBytesSignature bytes
-:
-
-:d alignments
-alignment T.DBusSignature  = 1
-:
-
-:d marshalers
-T.VarBoxSignature x -> marshalSignature x
-:
-
-:d unmarshalers
-unmarshalType T.DBusSignature = liftM T.toVariant unmarshalSignature
-:
-
-\subsection{Containers}
-
-\subsubsection{Arrays}
-
-:d alignments
-alignment (T.DBusArray _) = 4
-:
-
-:d marshalers
-T.VarBoxArray x -> marshalArray x
-:
-
-:d unmarshalers
-unmarshalType (T.DBusArray t) = T.toVariant `liftM` unmarshalArray t
-:
-
-Marshaling arrays is complicated, because the array body must be marshaled
-\emph{first} to calculate the array length. This requires building a
-temporary marshaler, to get the padding right.
-
-:d marshal imports
-import qualified DBus.Constants as C
-:
-
-:f DBus/Wire/Marshal.hs
-marshalArray :: T.Array -> Marshal
-marshalArray x = do
-	(arrayPadding, arrayBytes) <- getArrayBytes (T.arrayType x) x
-	let arrayLen = L.length arrayBytes
-	when (arrayLen > fromIntegral C.arrayMaximumLength)
-		(throwError $ ArrayTooLong $ fromIntegral arrayLen)
-	marshalWord32 $ fromIntegral arrayLen
-	appendL $ L.replicate arrayPadding 0
-	appendL arrayBytes
-:
-
-:f DBus/Wire/Marshal.hs
-getArrayBytes :: T.Type -> T.Array -> MarshalM (Int64, L.ByteString)
-getArrayBytes T.DBusByte x = return (0, bytes) where
-	Just bytes = T.arrayToBytes x
-:
-
-:f DBus/Wire/Marshal.hs
-getArrayBytes itemType x = do
-	let vs = T.arrayItems x
-	s <- getState
-	(MarshalState _ afterLength) <- marshalWord32 0 >> getState
-	(MarshalState _ afterPadding) <- pad (alignment itemType) >> getState
-	
-	putState $ MarshalState B.empty afterPadding
-	(MarshalState itemBuilder _) <- mapM_ marshal vs >> getState
-	
-	let itemBytes = B.toLazyByteString itemBuilder
-	    paddingSize = fromIntegral $ afterPadding - afterLength
-	
-	putState s
-	return (paddingSize, itemBytes)
-:
-
-Unmarshaling is much easier, especially if it's a byte array.
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalArray :: T.Type -> Unmarshal T.Array
-unmarshalArray T.DBusByte = do
-	byteCount <- unmarshalWord32
-	T.arrayFromBytes `liftM` consume (fromIntegral byteCount)
-:
-
-:f DBus/Wire/Unmarshal.hs
-unmarshalArray itemType = do
-	let getOffset = do
-		(UnmarshalState _ o) <- getState
-		return o
-	byteCount <- unmarshalWord32
-	skipPadding (alignment itemType)
-	start <- getOffset
-	let end = start + fromIntegral byteCount
-	vs <- untilM (liftM (>= end) getOffset) (unmarshalType itemType)
-	end' <- getOffset
-	when (end' > end) $
-		throwError ArraySizeMismatch
-	fromMaybeU "array" (T.arrayFromItems itemType) vs
-:
-
-\subsubsection{Dictionaries}
-
-:d alignments
-alignment (T.DBusDictionary _ _) = 4
-:
-
-:d marshalers
-T.VarBoxDictionary x -> marshalArray (T.dictionaryToArray x)
-:
-
-:d unmarshalers
-unmarshalType (T.DBusDictionary kt vt) = do
-	let pairType = T.DBusStructure [kt, vt]
-	array <- unmarshalArray pairType
-	fromMaybeU' "dictionary" T.arrayToDictionary array
-:
-
-\subsubsection{Structures}
-
-:d alignments
-alignment (T.DBusStructure _) = 8
-:
-
-:d marshalers
-T.VarBoxStructure (T.Structure vs) -> do
-	pad 8
-	mapM_ marshal vs
-:
-
-:d unmarshalers
-unmarshalType (T.DBusStructure ts) = do
-	skipPadding 8
-	liftM (T.toVariant . T.Structure) $ mapM unmarshalType ts
-:
-
-\subsubsection{Variants}
-
-:d alignments
-alignment T.DBusVariant = 1
-:
-
-:d marshalers
-T.VarBoxVariant x -> do
-	let textSig = T.typeCode . T.variantType $ x
-	sig <- case T.variantSignature x of
-		Just x' -> return x'
-		Nothing -> throwError $ InvalidVariantSignature textSig
-	marshalSignature sig
-	marshal x
-:
-
-:d unmarshalers
-unmarshalType T.DBusVariant = do
-	let getType sig = case T.signatureTypes sig of
-		[t] -> Just t
-		_   -> Nothing
-	
-	t <- fromMaybeU "variant signature" getType =<< unmarshalSignature
-	T.toVariant `liftM` unmarshalType t
-:
-
-\subsection{Messages}
-
-:d marshal imports
-import qualified DBus.Message.Internal as M
-:
-
-:d unmarshal imports
-import qualified DBus.Message.Internal as M
-:
-
-\subsubsection{Flags}
-
-:d unmarshal imports
-import Data.Bits ((.&.))
-import qualified Data.Set as Set
-:
-
-:d marshal imports
-import Data.Bits ((.|.))
-import qualified Data.Set as Set
-:
-
-:f DBus/Wire/Marshal.hs
-encodeFlags :: Set.Set M.Flag -> Word8
-encodeFlags flags = foldr (.|.) 0 $ map flagValue $ Set.toList flags where
-	flagValue M.NoReplyExpected = 0x1
-	flagValue M.NoAutoStart     = 0x2
-:
-
-:f DBus/Wire/Unmarshal.hs
-decodeFlags :: Word8 -> Set.Set M.Flag
-decodeFlags word = Set.fromList flags where
-	flagSet = [ (0x1, M.NoReplyExpected)
-	          , (0x2, M.NoAutoStart)
-	          ]
-	flags = flagSet >>= \(x, y) -> [y | word .&. x > 0]
-:
-
-\subsubsection{Header fields}
-
-:f DBus/Wire/Marshal.hs
-encodeField :: M.HeaderField -> T.Structure
-encodeField (M.Path x)        = encodeField' 1 x
-encodeField (M.Interface x)   = encodeField' 2 x
-encodeField (M.Member x)      = encodeField' 3 x
-encodeField (M.ErrorName x)   = encodeField' 4 x
-encodeField (M.ReplySerial x) = encodeField' 5 x
-encodeField (M.Destination x) = encodeField' 6 x
-encodeField (M.Sender x)      = encodeField' 7 x
-encodeField (M.Signature x)   = encodeField' 8 x
-
-encodeField' :: T.Variable a => Word8 -> a -> T.Structure
-encodeField' code x = T.Structure
-	[ T.toVariant code
-	, T.toVariant $ T.toVariant x
-	]
-:
-
-:f DBus/Wire/Unmarshal.hs
-decodeField :: T.Structure
-            -> E.ErrorM UnmarshalError [M.HeaderField]
-decodeField struct = case unpackField struct of
-	(1, x) -> decodeField' x M.Path "path"
-	(2, x) -> decodeField' x M.Interface "interface"
-	(3, x) -> decodeField' x M.Member "member"
-	(4, x) -> decodeField' x M.ErrorName "error name"
-	(5, x) -> decodeField' x M.ReplySerial "reply serial"
-	(6, x) -> decodeField' x M.Destination "destination"
-	(7, x) -> decodeField' x M.Sender "sender"
-	(8, x) -> decodeField' x M.Signature "signature"
-	_      -> return []
-
-decodeField' :: T.Variable a => T.Variant -> (a -> b) -> Text
-             -> E.ErrorM UnmarshalError [b]
-decodeField' x f label = case T.fromVariant x of
-	Just x' -> return [f x']
-	Nothing -> E.throwErrorM $ InvalidHeaderField label x
-:
-
-:f DBus/Wire/Unmarshal.hs
-unpackField :: T.Structure -> (Word8, T.Variant)
-unpackField struct = (c', v') where
-	T.Structure [c, v] = struct
-	c' = fromJust . T.fromVariant $ c
-	v' = fromJust . T.fromVariant $ v
-:
-
-\subsubsection{Header layout}
-
-TODO: describe header layout here
-
-\subsubsection{Marshaling}
-
-:d wire exports
-, marshalMessage
-:
-
-:f DBus/Wire/Marshal.hs
-|apidoc marshalMessage|
-marshalMessage :: M.Message a => Endianness -> M.Serial -> a
-               -> Either MarshalError L.ByteString
-marshalMessage e serial msg = runMarshal marshaler e where
-	body = M.messageBody msg
-	marshaler = do
-		sig <- checkBodySig body
-		empty <- getState
-		mapM_ marshal body
-		(MarshalState bodyBytesB _) <- getState
-		putState empty
-		marshalEndianness e
-		let bodyBytes = B.toLazyByteString bodyBytesB
-		marshalHeader msg serial sig
-			$ fromIntegral . L.length $ bodyBytes
-		pad 8
-		appendL bodyBytes
-		checkMaximumSize
-:
-
-:f DBus/Wire/Marshal.hs
-checkBodySig :: [T.Variant] -> MarshalM T.Signature
-checkBodySig vs = let
-	textSig = TL.concat . map (T.typeCode . T.variantType) $ vs
-	bytesSig = BS.concat . map (T.typeCodeB . T.variantType) $ vs
-	invalid = throwError $ InvalidBodySignature textSig
-	in case T.mkBytesSignature bytesSig of
-		Just x -> return x
-		Nothing -> invalid
-:
-
-:f DBus/Wire/Marshal.hs
-marshalHeader :: M.Message a => a -> M.Serial -> T.Signature -> Word32
-              -> Marshal
-marshalHeader msg serial bodySig bodyLength = do
-	let fields = M.Signature bodySig : M.messageHeaderFields msg
-	marshalWord8 . M.messageTypeCode $ msg
-	marshalWord8 . encodeFlags . M.messageFlags $ msg
-	marshalWord8 C.protocolVersion
-	marshalWord32 bodyLength
-	marshalWord32 . M.serialValue $ serial
-	let fieldType = T.DBusStructure [T.DBusByte, T.DBusVariant]
-	marshalArray . fromJust . T.toArray fieldType
-	        $ map encodeField fields
-:
-
-:f DBus/Wire/Marshal.hs
-marshalEndianness :: Endianness -> Marshal
-marshalEndianness = marshal . T.toVariant . encodeEndianness
-:
-
-:f DBus/Wire/Marshal.hs
-checkMaximumSize :: Marshal
-checkMaximumSize = do
-	(MarshalState _ messageLength) <- getState
-	when (messageLength > fromIntegral C.messageMaximumLength)
-		(throwError $ MessageTooLong $ fromIntegral messageLength)
-:
-
-\subsubsection{Unmarshaling}
-
-:d unmarshal imports
-import qualified DBus.Constants as C
-:
-
-:d wire exports
-, unmarshalMessage
-:
-
-:f DBus/Wire/Unmarshal.hs
-|apidoc unmarshalMessage|
-unmarshalMessage :: Monad m => (Word32 -> m BL.ByteString)
-                 -> m (Either UnmarshalError M.ReceivedMessage)
-unmarshalMessage getBytes' = E.runErrorT $ do
-	let getBytes = E.ErrorT . liftM Right . getBytes'
-	
-	|read fixed-length header|
-	|read full header|
-	|read body|
-	|build message|
-:
-
-The first part of the header has a fixed size of 16 bytes, so it can be
-retrieved without any size calculations.
-
-:d read fixed-length header
-let fixedSig = "yyyyuuu"
-fixedBytes <- getBytes 16
-:
-
-The first field of interest is the protocol version; if the incoming
-message's version is different from this library, the message cannot be
-parsed.
-
-:d read fixed-length header
-let messageVersion = BL.index fixedBytes 3
-when (messageVersion /= C.protocolVersion) $
-	E.throwErrorT $ UnsupportedProtocolVersion messageVersion
-:
-
-Next is the endianness, used for parsing pretty much every other field.
-
-:d read fixed-length header
-let eByte = BL.index fixedBytes 0
-endianness <- case decodeEndianness eByte of
-	Just x' -> return x'
-	Nothing -> E.throwErrorT . Invalid "endianness" . TL.pack . show $ eByte
-:
-
-With the endianness out of the way, the rest of the fixed header
-can be decoded
-
-:d read fixed-length header
-let unmarshal' x bytes = case runUnmarshal (unmarshal x) endianness bytes of
-	Right x' -> return x'
-	Left  e  -> E.throwErrorT e
-fixed <- unmarshal' fixedSig fixedBytes
-let typeCode = fromJust . T.fromVariant $ fixed !! 1
-let flags = decodeFlags . fromJust . T.fromVariant $ fixed !! 2
-let bodyLength = fromJust . T.fromVariant $ fixed !! 4
-let serial = fromJust . T.fromVariant $ fixed !! 5
-:
-
-The last field of the fixed header is actually part of the field array,
-but is treated as a single {\tt Word32} so it'll be known how many bytes
-to retrieve.
-
-:d read fixed-length header
-let fieldByteCount = fromJust . T.fromVariant $ fixed !! 6
-:
-
-With the field byte count, the remainder of the header bytes can be
-pulled out of the monad.
-
-:d read full header
-let headerSig  = "yyyyuua(yv)"
-fieldBytes <- getBytes fieldByteCount
-let headerBytes = BL.append fixedBytes fieldBytes
-header <- unmarshal' headerSig headerBytes
-:
-
-And the header fields can be parsed.
-
-:d read full header
-let fieldArray = fromJust . T.fromVariant $ header !! 6
-let fieldStructures = fromJust . T.fromArray $ fieldArray
-fields <- case E.runErrorM $ concat `liftM` mapM decodeField fieldStructures of
-	Left err -> E.throwErrorT err
-	Right x -> return x
-:
-
-The body is always aligned to 8 bytes, so pull out the padding before
-unmarshaling it.
-
-:d read body
-let bodyPadding = padding (fromIntegral fieldByteCount + 16) 8
-void (getBytes (fromIntegral bodyPadding))
-:
-
-:f DBus/Wire/Unmarshal.hs
-findBodySignature :: [M.HeaderField] -> T.Signature
-findBodySignature fields = fromMaybe "" signature where
-	signature = listToMaybe [x | M.Signature x <- fields]
-:
-
-:d read body
-let bodySig = findBodySignature fields
-:
-
-Then pull the body bytes, and unmarshal it.
-
-:d read body
-bodyBytes <- getBytes bodyLength
-body <- unmarshal' bodySig bodyBytes
-:
-
-Even if the received message was structurally valid, building the
-{\tt ReceivedMessage} can still fail due to missing header fields.
-
-:d build message
-y <- case E.runErrorM $ buildReceivedMessage typeCode fields of
-	Right x -> return x
-	Left err -> E.throwErrorT $ MissingHeaderField err
-return $ y serial flags body
-:
-
-This really belongs in the Message section...
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage :: Word8 -> [M.HeaderField] -> E.ErrorM Text
-                        (M.Serial -> (Set.Set M.Flag) -> [T.Variant]
-                         -> M.ReceivedMessage)
-:
-
-Method calls
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage 1 fields = do
-	path <- require "path" [x | M.Path x <- fields]
-	member <- require "member name" [x | M.Member x <- fields]
-	return $ \serial flags body -> let
-		iface = listToMaybe [x | M.Interface x <- fields]
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.MethodCall path member iface dest flags body
-		in M.ReceivedMethodCall serial sender msg
-:
-
-Method returns
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage 2 fields = do
-	replySerial <- require "reply serial" [x | M.ReplySerial x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.MethodReturn replySerial dest body
-		in M.ReceivedMethodReturn serial sender msg
-:
-
-Errors
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage 3 fields = do
-	name <- require "error name" [x | M.ErrorName x <- fields]
-	replySerial <- require "reply serial" [x | M.ReplySerial x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.Error name replySerial dest body
-		in M.ReceivedError serial sender msg
-:
-
-Signals
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage 4 fields = do
-	path <- require "path" [x | M.Path x <- fields]
-	member <- require "member name" [x | M.Member x <- fields]
-	iface <- require "interface" [x | M.Interface x <- fields]
-	return $ \serial _ body -> let
-		dest = listToMaybe [x | M.Destination x <- fields]
-		sender = listToMaybe [x | M.Sender x <- fields]
-		msg = M.Signal path member iface dest body
-		in M.ReceivedSignal serial sender msg
-:
-
-Unknown
-
-:f DBus/Wire/Unmarshal.hs
-buildReceivedMessage typeCode fields = return $ \serial flags body -> let
-	sender = listToMaybe [x | M.Sender x <- fields]
-	msg = M.Unknown typeCode flags body
-	in M.ReceivedUnknown serial sender msg
-:
-
-:f DBus/Wire/Unmarshal.hs
-require :: Text -> [a] -> E.ErrorM Text a
-require _     (x:_) = return x
-require label _     = E.throwErrorM label
-:
-
-:f Tests.hs
-prop_Unmarshal :: Endianness -> Variant -> Property
-prop_Unmarshal e x = valid ==> unmarshaled == Right [x] where
-	sig = mkSignature . typeCode . variantType $ x
-	Just sig' = sig
-	
-	bytes = runMarshal (marshal x) e
-	Right bytes' = bytes
-	
-	valid = isJust sig && isRight bytes
-	unmarshaled = runUnmarshal (unmarshal sig') e bytes'
-
-prop_MarshalMessage e serial msg expected = valid ==> correct where
-	bytes = marshalMessage e serial msg
-	Right bytes' = bytes
-	
-	getBytes = G.getLazyByteString . fromIntegral
-	unmarshaled = G.runGet (unmarshalMessage getBytes) bytes'
-	
-	valid = isRight bytes
-	correct = unmarshaled == Right expected
-
-prop_WireMethodCall e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedMethodCall serial Nothing msg
-
-prop_WireMethodReturn e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedMethodReturn serial Nothing msg
-
-prop_WireError e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedError serial Nothing msg
-
-prop_WireSignal e serial msg = prop_MarshalMessage e serial msg
-	$ ReceivedSignal serial Nothing msg
-:
-
-:d test cases
-, F.testGroup "Wire format"
-	[ testProperty "Marshal -> Ummarshal" prop_Unmarshal
-	, F.testGroup "Messages"
-		[ testProperty "Method calls" prop_WireMethodCall
-		, testProperty "Method returns" prop_WireMethodReturn
-		, testProperty "Errors" prop_WireError
-		, testProperty "Signals" prop_WireSignal
-		]
-	]
+:# Copyright (C) 2009-2011 John Millikin <jmillikin@gmail.com>
+:# 
+:# This program is free software: you can redistribute it and/or modify
+:# it under the terms of the GNU General Public License as published by
+:# the Free Software Foundation, either version 3 of the License, or
+:# any later version.
+:# 
+:# This program is distributed in the hope that it will be useful,
+:# but WITHOUT ANY WARRANTY; without even the implied warranty of
+:# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+:# GNU General Public License for more details.
+:# 
+:# You should have received a copy of the GNU General Public License
+:# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+\section{Wire format}
+
+\begin{multicols}{2}
+
+\dbus{} uses a simple binary format to serialize messages. Because the format
+is binary, the \emph{endianness} of serialized values is important. \dbus{}
+supports both big- and little-endian serialization, so clients can choose
+whichever is more efficient on their hardware.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+data Endianness = LittleEndian | BigEndian
+	deriving (Show, Eq)
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+When written over the wire, message endianness is represented as a single
+byte: {\tt 0x6C} for little-endian, {\tt 0x42} for big-endian. These magic
+numbers are the {\sc ascii} values for {\tt 'l'} and {\tt 'B'}, respectively.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+encodeEndianness :: Endianness -> Word8
+encodeEndianness LittleEndian = 0x6C
+encodeEndianness BigEndian    = 0x42
+
+decodeEndianness :: Word8 -> Maybe Endianness
+decodeEndianness 0x6C = Just LittleEndian
+decodeEndianness 0x42 = Just BigEndian
+decodeEndianness _    = Nothing
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+Each built-in type has an associated alignment. When serialized, padding is
+inserted between values to ensure they always start at their preferred
+alignment.
+
+Numeric values are fixed-length, and aligned ``naturally''; eg, a 4-byte
+integer will have a 4-byte alignment. Types with a length prefix, such as
+strings and arrays, use their length's alignment.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+alignment :: Type -> Word8
+alignment TypeBoolean = 4
+alignment TypeWord8 = 1
+alignment TypeWord16 = 2
+alignment TypeWord32 = 4
+alignment TypeWord64 = 8
+alignment TypeInt16 = 2
+alignment TypeInt32 = 4
+alignment TypeInt64 = 8
+alignment TypeDouble = 8
+alignment TypeString = 4
+alignment TypeObjectPath = 4
+alignment TypeSignature = 1
+alignment (TypeArray _) = 4
+alignment (TypeDictionary _ _) = 4
+alignment (TypeStructure _) = 8
+alignment TypeVariant = 1
+:
+
+:d DBus.Wire
+padding :: Word64 -> Word8 -> Word64
+padding current count = required where
+	count' = fromIntegral count
+	missing = mod current count'
+	required = if missing > 0
+		then count' - missing
+		else 0
+:
+
+\end{multicols}
+
+\clearpage
+\subsection{Serialization support}
+
+\begin{multicols}{2}
+
+Messages can be quite large, so it's important that both the serializer and
+parser be efficient. The standard {\tt Get} and {\tt Put} monads are too slow,
+so I define my own type for building and parsing binary data. This is
+equivalent to an {\tt ErrorT . ReaderT . StateT} stack, but inlined and
+strict.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+data WireR s a
+	= WireRL String
+	| WireRR a {-# UNPACK #-} !s
+
+newtype Wire s a = Wire
+	{ unWire :: Endianness -> s -> WireR s a
+	}
+
+instance Monad (Wire s) where
+	{-# INLINE return #-}
+	return a = Wire (\_ s -> WireRR a s)
+	
+	{-# INLINE (>>=) #-}
+	m >>= k = Wire $ \e s -> case unWire m e s of
+		WireRL err -> WireRL err
+		WireRR a s' -> unWire (k a) e s'
+	
+	{-# INLINE (>>) #-}
+	m >> k = Wire $ \e s -> case unWire m e s of
+		WireRL err -> WireRL err
+		WireRR _ s' -> unWire k e s'
+
+throwError :: String -> Wire s a
+throwError err = Wire (\_ _ -> WireRL err)
+
+{-# INLINE getState #-}
+getState :: Wire s s
+getState = Wire (\_ s -> WireRR s s)
+
+{-# INLINE putState #-}
+putState :: s -> Wire s ()
+putState s = Wire (\_ _ -> WireRR () s)
+
+{-# INLINE chooseEndian #-}
+chooseEndian :: a -> a -> Wire s a
+chooseEndian big little = Wire (\e s -> case e of
+	BigEndian -> WireRR big s
+	LittleEndian -> WireRR little s)
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Marshaling}
+
+\begin{multicols}{2}
+
+Marshaling is the process of converting a sequence of values into a
+{\tt ByteString}. The {\tt Builder} type is used for efficient construction
+of lazy byte strings, but it doesn't provide any way to retrieve the length
+of its internal buffer, so the byte count is tracked separately.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+type Marshal = Wire MarshalState
+
+newtype MarshalError = MarshalError Text
+	deriving (Show, Eq)
+
+data MarshalState = MarshalState
+	{-# UNPACK #-} !Data.Binary.Builder.Builder
+	{-# UNPACK #-} !Word64
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+TODO
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+marshal :: Value -> Marshal ()
+marshal (ValueAtom x) = marshalAtom x
+marshal (ValueBytes xs) = marshalStrictBytes xs
+marshal (ValueVector t xs) = marshalVector t xs
+marshal (ValueMap kt vt xs) = marshalMap kt vt xs
+marshal (ValueStructure xs) = marshalStructure xs
+marshal (ValueVariant x) = marshalVariant x
+:
+
+:d DBus.Wire
+marshalAtom :: Atom -> Marshal ()
+marshalAtom (AtomWord8 x) = marshalWord8 x
+marshalAtom (AtomWord16 x) = marshalWord16 x
+marshalAtom (AtomWord32 x) = marshalWord32 x
+marshalAtom (AtomWord64 x) = marshalWord64 x
+marshalAtom (AtomInt16 x) = marshalInt16 x
+marshalAtom (AtomInt32 x) = marshalInt32 x
+marshalAtom (AtomInt64 x) = marshalInt64 x
+marshalAtom (AtomDouble x) = marshalDouble x
+marshalAtom (AtomBool x) = marshalBool x
+marshalAtom (AtomText x) = marshalText x
+marshalAtom (AtomObjectPath x) = marshalObjectPath x
+marshalAtom (AtomSignature x) = marshalSignature x
+:
+
+\end{multicols}
+
+\clearpage
+
+TODO: describe these functions
+
+:d DBus.Wire
+appendB :: Word64 -> Data.Binary.Builder.Builder -> Marshal ()
+appendB size bytes = Wire (\_ (MarshalState builder count) -> let
+	builder' = Data.Binary.Builder.append builder bytes
+	count' = count + size
+	in WireRR () (MarshalState builder' count'))
+:
+
+:d DBus.Wire
+appendS :: ByteString -> Marshal ()
+appendS bytes = appendB
+	(fromIntegral (Data.ByteString.length bytes))
+	(Data.Binary.Builder.fromByteString bytes)
+:
+
+:d DBus.Wire
+appendL :: Data.ByteString.Lazy.ByteString -> Marshal ()
+appendL bytes = appendB
+	(fromIntegral (Data.ByteString.Lazy.length bytes))
+	(Data.Binary.Builder.fromLazyByteString bytes)
+:
+
+:d DBus.Wire
+pad :: Word8 -> Marshal ()
+pad count = do
+	(MarshalState _ existing) <- getState
+	let padding' = fromIntegral (padding existing count)
+	appendS (Data.ByteString.replicate padding' 0)
+:
+
+Most numeric values already have marshalers implemented in the
+{\tt Data.Binary.Builder} module; this function lets them be re-used easily.
+
+:d DBus.Wire
+marshalBuilder :: Word8
+               -> (a -> Data.Binary.Builder.Builder)
+               -> (a -> Data.Binary.Builder.Builder)
+               -> a -> Marshal ()
+marshalBuilder size be le x = do
+	builder <- chooseEndian (be x) (le x)
+	pad size
+	appendB (fromIntegral size) builder
+:
+
+
+\clearpage
+\subsubsection{Unmarshaling}
+
+\begin{multicols}{2}
+
+TODO
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+type Unmarshal = Wire UnmarshalState
+
+newtype UnmarshalError = UnmarshalError Text
+	deriving (Show, Eq)
+
+data UnmarshalState = UnmarshalState
+	{-# UNPACK #-} !ByteString
+	{-# UNPACK #-} !Word64
+:
+
+\end{multicols}
+
+\begin{multicols}{2}
+
+TODO
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+unmarshal :: Type -> Unmarshal Value
+unmarshal TypeWord8 = liftM toValue unmarshalWord8
+unmarshal TypeWord16 = liftM toValue unmarshalWord16
+unmarshal TypeWord32 = liftM toValue unmarshalWord32
+unmarshal TypeWord64 = liftM toValue unmarshalWord64
+unmarshal TypeInt16 = liftM toValue unmarshalInt16
+unmarshal TypeInt32 = liftM toValue unmarshalInt32
+unmarshal TypeInt64 = liftM toValue unmarshalInt64
+unmarshal TypeDouble = liftM toValue unmarshalDouble
+unmarshal TypeBoolean = liftM toValue unmarshalBool
+unmarshal TypeString = liftM toValue unmarshalText
+unmarshal TypeObjectPath = liftM toValue unmarshalObjectPath
+unmarshal TypeSignature = liftM toValue unmarshalSignature
+unmarshal (TypeArray TypeWord8) = liftM toValue unmarshalByteArray
+unmarshal (TypeArray t) = liftM (ValueVector t) (unmarshalArray t)
+unmarshal (TypeDictionary kt vt) = unmarshalDictionary kt vt
+unmarshal (TypeStructure ts) = unmarshalStructure ts
+unmarshal TypeVariant = unmarshalVariant
+:
+
+\end{multicols}
+
+\clearpage
+
+TODO: describe these functions
+
+:d DBus.Wire
+{-# INLINE consume #-}
+consume :: Word64 -> Unmarshal ByteString
+consume count = do
+	(UnmarshalState bytes offset) <- getState
+	let count' = fromIntegral count
+	let (x, bytes') = Data.ByteString.splitAt count' bytes
+	let lenConsumed = Data.ByteString.length x
+	if lenConsumed == count'
+		then do
+			putState (UnmarshalState bytes' (offset + count))
+			return x
+		else throwError (concat
+			[ "Unexpected EOF at offset "
+			, show (offset + fromIntegral lenConsumed)
+			])
+:
+
+:d DBus.Wire
+skipPadding :: Word8 -> Unmarshal ()
+skipPadding count = do
+	(UnmarshalState _ offset) <- getState
+	bytes <- consume (padding offset count)
+	unless (Data.ByteString.all (== 0) bytes) (throwError (concat
+		[ "Value padding ", show bytes
+		, " contains invalid bytes."
+		]))
+:
+
+:d DBus.Wire
+skipTerminator :: Unmarshal ()
+skipTerminator = do
+	byte <- unmarshalWord8
+	when (byte /= 0) (throwError "Textual value is not NUL-terminated.")
+:
+
+:d DBus.Wire
+fromMaybeU :: Show a => String -> (a -> Maybe b) -> a -> Unmarshal b
+fromMaybeU label f x = case f x of
+	Just x' -> return x'
+	Nothing -> throwError (concat ["Invalid ", label, ": ", show x])
+:
+
+:d DBus.Wire
+unmarshalGet :: Word8 -> Data.Binary.Get.Get a -> Data.Binary.Get.Get a -> Unmarshal a
+unmarshalGet count be le = do
+	skipPadding count
+	bytes <- consume (fromIntegral count)
+	get <- chooseEndian be le
+	let lazy = Data.ByteString.Lazy.fromChunks [bytes]
+	return (Data.Binary.Get.runGet get lazy)
+:
+
+
+\clearpage
+\subsection{Atoms}
+\subsubsection{Integers}
+
+:d DBus.Wire
+marshalWord8 :: Word8 -> Marshal ()
+marshalWord8 x = appendB 1 (Data.Binary.Builder.singleton x)
+
+unmarshalWord8 :: Unmarshal Word8
+unmarshalWord8 = liftM Data.ByteString.head (consume 1)
+:
+
+\begin{multicols}{2}
+
+:d DBus.Wire
+marshalWord16 :: Word16 -> Marshal ()
+marshalWord16 = marshalBuilder 2
+	Data.Binary.Builder.putWord16be
+	Data.Binary.Builder.putWord16le
+
+marshalWord32 :: Word32 -> Marshal ()
+marshalWord32 = marshalBuilder 4
+	Data.Binary.Builder.putWord32be
+	Data.Binary.Builder.putWord32le
+
+marshalWord64 :: Word64 -> Marshal ()
+marshalWord64 = marshalBuilder 8
+	Data.Binary.Builder.putWord64be
+	Data.Binary.Builder.putWord64le
+
+marshalInt16 :: Int16 -> Marshal ()
+marshalInt16 = marshalWord16 . fromIntegral
+
+marshalInt32 :: Int32 -> Marshal ()
+marshalInt32 = marshalWord32 . fromIntegral
+
+marshalInt64 :: Int64 -> Marshal ()
+marshalInt64 = marshalWord64 . fromIntegral
+:
+
+\columnbreak
+
+:d DBus.Wire
+unmarshalWord16 :: Unmarshal Word16
+unmarshalWord16 = unmarshalGet 2
+	Data.Binary.Get.getWord16be
+	Data.Binary.Get.getWord16le
+
+unmarshalWord32 :: Unmarshal Word32
+unmarshalWord32 = unmarshalGet 4
+	Data.Binary.Get.getWord32be
+	Data.Binary.Get.getWord32le
+
+unmarshalWord64 :: Unmarshal Word64
+unmarshalWord64 = unmarshalGet 8
+	Data.Binary.Get.getWord64be
+	Data.Binary.Get.getWord64le
+
+unmarshalInt16 :: Unmarshal Int16
+unmarshalInt16 = liftM fromIntegral unmarshalWord16
+
+unmarshalInt32 :: Unmarshal Int32
+unmarshalInt32 = liftM fromIntegral unmarshalWord32
+
+unmarshalInt64 :: Unmarshal Int64
+unmarshalInt64 = liftM fromIntegral unmarshalWord64
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Doubles}
+
+\begin{multicols}{2}
+
+{\tt Double}s are marshaled in 64-bit IEEE-754 floating-point format.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+marshalDouble :: Double -> Marshal ()
+marshalDouble x = do
+	put <- chooseEndian
+		Data.Binary.IEEE754.putFloat64be
+		Data.Binary.IEEE754.putFloat64le
+	pad 8
+	appendL (runPut (put x))
+
+unmarshalDouble :: Unmarshal Double
+unmarshalDouble = unmarshalGet 8
+	Data.Binary.IEEE754.getFloat64be
+	Data.Binary.IEEE754.getFloat64le
+:
+
+\end{multicols}
+
+\subsubsection{Booleans}
+
+\begin{multicols}{2}
+
+Booleans are marshaled as 4-byte unsigned integers containing either of
+the values 0 or 1. Yes, really.
+
+\vfill
+\columnbreak
+
+:d DBus.Wire
+marshalBool :: Bool -> Marshal ()
+marshalBool False = marshalWord32 0
+marshalBool True  = marshalWord32 1
+
+unmarshalBool :: Unmarshal Bool
+unmarshalBool = do
+	word <- unmarshalWord32
+	case word of
+		0 -> return False
+		1 -> return True
+		_ -> throwError (concat
+			[ "Invalid boolean: "
+			, show word
+			])
+:
+
+\end{multicols}
+
+\clearpage
+\subsubsection{Strings and object paths}
+
+Strings are encoded in {\sc utf-8}, terminated with {\tt NUL}, and prefixed
+with their length as an unsigned 32-bit integer. Their alignment is that of
+their length. Object paths are marshaled just like strings, though additional
+checks are required when unmarshaling.
+
+:d DBus.Wire
+marshalText :: Text -> Marshal ()
+marshalText text = do
+	let bytes = Data.Text.Encoding.encodeUtf8 text
+	when (Data.ByteString.any (== 0) bytes) (throwError (concat
+		[ "String "
+		, show text
+		, " contained forbidden character: '\\x00'"
+		]))
+	marshalWord32 (fromIntegral (Data.ByteString.length bytes))
+	appendS bytes
+	marshalWord8 0
+:
+
+:d DBus.Wire
+unmarshalText :: Unmarshal Text
+unmarshalText = do
+	byteCount <- unmarshalWord32
+	bytes <- consume (fromIntegral byteCount)
+	skipTerminator
+	fromMaybeU "text" maybeDecodeUtf8 bytes
+
+maybeDecodeUtf8 :: ByteString -> Maybe Text
+maybeDecodeUtf8 bs = case Data.Text.Encoding.decodeUtf8' bs of
+	Right text -> Just text
+	_ -> Nothing
+:
+
+:d DBus.Wire
+marshalObjectPath :: ObjectPath -> Marshal ()
+marshalObjectPath = marshalText . objectPathText
+:
+
+:d DBus.Wire
+unmarshalObjectPath :: Unmarshal ObjectPath
+unmarshalObjectPath = do
+	text <- unmarshalText
+	fromMaybeU "object path" objectPath text
+:
+
+\clearpage
+\subsubsection{Signatures}
+
+Signatures are similar to strings, except their length is limited to 255
+characters and is therefore stored as a single byte.
+
+:d DBus.Wire
+signatureBytes :: Signature -> ByteString
+signatureBytes (Signature ts) = Data.ByteString.Char8.pack (concatMap typeCode ts)
+
+marshalSignature :: Signature -> Marshal ()
+marshalSignature x = do
+	let bytes = signatureBytes x
+	marshalWord8 (fromIntegral (Data.ByteString.length bytes))
+	appendS bytes
+	marshalWord8 0
+:
+
+:d DBus.Wire
+unmarshalSignature :: Unmarshal Signature
+unmarshalSignature = do
+	byteCount <- unmarshalWord8
+	bytes <- consume (fromIntegral byteCount)
+	skipTerminator
+	fromMaybeU "signature" parseSignature bytes
+:
+
+\clearpage
+\subsection{Containers}
+\subsubsection{Arrays}
+
+Marshaling arrays is complicated, because the array body must be marshaled
+\emph{first} to calculate the array length. This requires building a
+temporary marshaler, to get the padding right.
+
+:d DBus.Wire
+arrayMaximumLength :: Int64
+arrayMaximumLength = 67108864
+:
+
+:d DBus.Wire
+marshalVector :: Type -> Vector Value -> Marshal ()
+marshalVector t x = do
+	(arrayPadding, arrayBytes) <- getArrayBytes t x
+	let arrayLen = Data.ByteString.Lazy.length arrayBytes
+	when (arrayLen > arrayMaximumLength) (throwError (concat
+		[ "Marshaled array size ("
+		, show arrayLen
+		, " bytes) exceeds maximum limit of ("
+		, show arrayMaximumLength
+		, " bytes)."
+		]))
+	marshalWord32 (fromIntegral arrayLen)
+	appendL (Data.ByteString.Lazy.replicate arrayPadding 0)
+	appendL arrayBytes
+
+marshalStrictBytes :: ByteString -> Marshal ()
+marshalStrictBytes bytes = do
+	let arrayLen = Data.ByteString.length bytes
+	when (fromIntegral arrayLen > arrayMaximumLength) (throwError (concat
+		[ "Marshaled array size ("
+		, show arrayLen
+		, " bytes) exceeds maximum limit of ("
+		, show arrayMaximumLength
+		, " bytes)."
+		]))
+	marshalWord32 (fromIntegral arrayLen)
+	appendS bytes
+:
+
+:d DBus.Wire
+getArrayBytes :: Type -> Vector Value -> Marshal (Int64, Data.ByteString.Lazy.ByteString)
+getArrayBytes itemType vs = do
+	s <- getState
+	(MarshalState _ afterLength) <- marshalWord32 0 >> getState
+	(MarshalState _ afterPadding) <- pad (alignment itemType) >> getState
+	
+	putState (MarshalState Data.Binary.Builder.empty afterPadding)
+	(MarshalState itemBuilder _) <- Data.Vector.mapM_ marshal vs >> getState
+	
+	let itemBytes = Data.Binary.Builder.toLazyByteString itemBuilder
+	    paddingSize = fromIntegral (afterPadding - afterLength)
+	
+	putState s
+	return (paddingSize, itemBytes)
+:
+
+Unmarshaling is much easier, especially if it's a byte array.
+
+:d DBus.Wire
+unmarshalByteArray :: Unmarshal ByteString
+unmarshalByteArray = do
+	byteCount <- unmarshalWord32
+	consume (fromIntegral byteCount)
+
+unmarshalArray :: Type -> Unmarshal (Vector Value)
+unmarshalArray itemType = do
+	let getOffset = do
+		(UnmarshalState _ o) <- getState
+		return o
+	byteCount <- unmarshalWord32
+	skipPadding (alignment itemType)
+	start <- getOffset
+	let end = start + fromIntegral byteCount
+	vs <- untilM (liftM (>= end) getOffset) (unmarshal itemType)
+	end' <- getOffset
+	when (end' > end) (throwError (concat
+		[ "Array data size exeeds array size of "
+		, show end
+		]))
+	return (Data.Vector.fromList vs)
+:
+
+\clearpage
+\subsubsection{Dictionaries}
+
+:d DBus.Wire
+dictionaryToArray :: Map Atom Value -> Vector Value
+dictionaryToArray = Data.Vector.fromList . map step . Data.Map.toList where
+	step (k, v) = ValueStructure [ValueAtom k, v]
+:
+
+:d DBus.Wire
+arrayToDictionary :: Vector Value -> Map Atom Value
+arrayToDictionary = Data.Map.fromList . map step . Data.Vector.toList where
+	step (ValueStructure [ValueAtom k, v]) = (k, v)
+	step _ = error "arrayToDictionary: internal error"
+:
+
+:d DBus.Wire
+marshalMap :: Type -> Type -> Map Atom Value -> Marshal ()
+marshalMap kt vt x = let
+	structType = TypeStructure [kt, vt]
+	array = dictionaryToArray x
+	in marshalVector structType array
+:
+
+:d DBus.Wire
+unmarshalDictionary :: Type -> Type -> Unmarshal Value
+unmarshalDictionary kt vt = do
+	let pairType = TypeStructure [kt, vt]
+	array <- unmarshalArray pairType
+	return (ValueMap kt vt (arrayToDictionary array))
+:
+
+\clearpage
+\subsubsection{Structures}
+
+:d DBus.Wire
+marshalStructure :: [Value] -> Marshal ()
+marshalStructure vs = do
+	pad 8
+	mapM_ marshal vs
+:
+
+:d DBus.Wire
+unmarshalStructure :: [Type] -> Unmarshal Value
+unmarshalStructure ts = do
+	skipPadding 8
+	liftM ValueStructure (mapM unmarshal ts)
+:
+
+\subsubsection{Variants}
+
+:d DBus.Wire
+marshalVariant :: Variant -> Marshal ()
+marshalVariant var@(Variant val) = do
+	sig <- case checkSignature [valueType val] of
+		Just x' -> return x'
+		Nothing -> throwError (concat
+			[ "Signature "
+			, show (typeCode (valueType val))
+			, " for variant "
+			, show var
+			, " is malformed or too large."
+			])
+	marshalSignature sig
+	marshal val
+:
+
+:d DBus.Wire
+unmarshalVariant :: Unmarshal Value
+unmarshalVariant = do
+	let getType sig = case signatureTypes sig of
+		[t] -> Just t
+		_   -> Nothing
+	
+	t <- fromMaybeU "variant signature" getType =<< unmarshalSignature
+	(toValue . Variant) `liftM` unmarshal t
+:
+
+\clearpage
+\subsection{Messages}
+
+:d DBus.Wire
+protocolVersion :: Word8
+protocolVersion = 1
+
+messageMaximumLength :: Word64
+messageMaximumLength = 134217728
+:
+
+\subsubsection{Flags}
+
+:d DBus.Wire
+encodeFlags :: Set Flag -> Word8
+encodeFlags flags = foldr (.|.) 0 (map flagValue (Data.Set.toList flags)) where
+	flagValue NoReplyExpected = 0x1
+	flagValue NoAutoStart     = 0x2
+:
+
+:d DBus.Wire
+decodeFlags :: Word8 -> Set Flag
+decodeFlags word = Data.Set.fromList flags where
+	flagSet = [ (0x1, NoReplyExpected)
+	          , (0x2, NoAutoStart)
+	          ]
+	flags = flagSet >>= \(x, y) -> [y | word .&. x > 0]
+:
+
+\clearpage
+\subsubsection{Header fields}
+
+:d DBus.Wire
+encodeField :: HeaderField -> Value
+encodeField (HeaderPath x)        = encodeField' 1 x
+encodeField (HeaderInterface x)   = encodeField' 2 x
+encodeField (HeaderMember x)      = encodeField' 3 x
+encodeField (HeaderErrorName x)   = encodeField' 4 x
+encodeField (HeaderReplySerial x) = encodeField' 5 x
+encodeField (HeaderDestination x) = encodeField' 6 x
+encodeField (HeaderSender x)      = encodeField' 7 x
+encodeField (HeaderSignature x)   = encodeField' 8 x
+
+encodeField' :: IsVariant a => Word8 -> a -> Value
+encodeField' code x = toValue (code, toVariant x)
+:
+
+:d DBus.Wire
+decodeField :: (Word8, Variant)
+            -> E.ErrorM UnmarshalError [HeaderField]
+decodeField struct = case struct of
+	(1, x) -> decodeField' x HeaderPath "path"
+	(2, x) -> decodeField' x HeaderInterface "interface"
+	(3, x) -> decodeField' x HeaderMember "member"
+	(4, x) -> decodeField' x HeaderErrorName "error name"
+	(5, x) -> decodeField' x HeaderReplySerial "reply serial"
+	(6, x) -> decodeField' x HeaderDestination "destination"
+	(7, x) -> decodeField' x HeaderSender "sender"
+	(8, x) -> decodeField' x HeaderSignature "signature"
+	_      -> return []
+
+decodeField' :: IsVariant a => Variant -> (a -> b) -> Text
+             -> E.ErrorM UnmarshalError [b]
+decodeField' x f label = case fromVariant x of
+	Just x' -> return [f x']
+	Nothing -> E.throwErrorM (UnmarshalError (Data.Text.pack (concat
+		[ "Header field "
+		, show label
+		, " contains invalid value "
+		, show x
+		])))
+:
+
+\clearpage
+\subsubsection{Marshaling}
+
+:d DBus.Wire
+|apidoc DBus.Wire.marshalMessage|
+marshalMessage :: Message a => Endianness -> Serial -> a
+               -> Either MarshalError Data.ByteString.ByteString
+marshalMessage e serial msg = runMarshal where
+	body = messageBody msg
+	marshaler = do
+		sig <- checkBodySig body
+		empty <- getState
+		mapM_ (marshal . (\(Variant x) -> x)) body
+		(MarshalState bodyBytesB _) <- getState
+		putState empty
+		marshal (toValue (encodeEndianness e))
+		let bodyBytes = Data.Binary.Builder.toLazyByteString bodyBytesB
+		marshalHeader msg serial sig (fromIntegral (Data.ByteString.Lazy.length bodyBytes))
+		pad 8
+		appendL bodyBytes
+		checkMaximumSize
+	emptyState = MarshalState Data.Binary.Builder.empty 0
+	runMarshal = case unWire marshaler e emptyState of
+		WireRL err -> Left (MarshalError (Data.Text.pack err))
+		WireRR _ (MarshalState builder _) -> Right (toStrict builder)
+	toStrict = Data.ByteString.concat
+	         . Data.ByteString.Lazy.toChunks
+	         . Data.Binary.Builder.toLazyByteString
+
+checkBodySig :: [Variant] -> Marshal Signature
+checkBodySig vs = case checkSignature (map variantType vs) of
+	Just x -> return x
+	Nothing -> throwError (concat
+		[ "Message body ", show vs
+		, " has too many items"
+		])
+
+marshalHeader :: Message a => a -> Serial -> Signature -> Word32
+              -> Marshal ()
+marshalHeader msg serial bodySig bodyLength = do
+	let fields = HeaderSignature bodySig : messageHeaderFields msg
+	marshalWord8 (messageTypeCode msg)
+	marshalWord8 (encodeFlags (messageFlags msg))
+	marshalWord8 protocolVersion
+	marshalWord32 bodyLength
+	marshalWord32 (serialValue serial)
+	let fieldType = TypeStructure [TypeWord8, TypeVariant]
+	marshalVector fieldType (Data.Vector.fromList (map encodeField fields))
+
+checkMaximumSize :: Marshal ()
+checkMaximumSize = do
+	(MarshalState _ messageLength) <- getState
+	when (messageLength > messageMaximumLength) (throwError (concat
+		[ "Marshaled message size (", show messageLength
+		, " bytes) exeeds maximum limit of ("
+		, show messageMaximumLength, " bytes)."
+		]))
+:
+
+\clearpage
+\subsubsection{Unmarshaling}
+
+:d DBus.Wire
+unmarshalMessageM :: Monad m => (Word32 -> m ByteString)
+                  -> m (Either UnmarshalError ReceivedMessage)
+unmarshalMessageM getBytes' = E.runErrorT $ do
+	let getBytes = E.ErrorT . liftM Right . getBytes'
+	
+	|read fixed-length header|
+	|read full header|
+	|read body|
+	|build message|
+:
+
+The first part of the header has a fixed size of 16 bytes, so it can be
+retrieved without any size calculations.
+
+:d read fixed-length header
+let fixedSig = "yyyyuuu"
+fixedBytes <- getBytes 16
+:
+
+The first field of interest is the protocol version; if the incoming
+message's version is different from this library, the message cannot be
+parsed.
+
+:d read fixed-length header
+let messageVersion = Data.ByteString.index fixedBytes 3
+when (messageVersion /= protocolVersion) (E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+	[ "Unsupported protocol version: "
+	, show messageVersion
+	]))))
+:
+
+Next is the endianness, used for parsing pretty much every other field.
+
+:d read fixed-length header
+let eByte = Data.ByteString.index fixedBytes 0
+endianness <- case decodeEndianness eByte of
+	Just x' -> return x'
+	Nothing -> E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+		[ "Invalid endianness: "
+		, show eByte
+		])))
+:
+
+With the endianness out of the way, the rest of the fixed header
+can be decoded
+
+:d read fixed-length header
+let unmarshalSig = mapM unmarshal . signatureTypes
+let unmarshal' x bytes = case unWire (unmarshalSig x) endianness (UnmarshalState bytes 0) of
+	WireRR x' _ -> return x'
+	WireRL err  -> E.throwErrorT (UnmarshalError (Data.Text.pack err))
+fixed <- unmarshal' fixedSig fixedBytes
+let messageType = fromJust (fromValue (fixed !! 1))
+let flags = decodeFlags (fromJust (fromValue (fixed !! 2)))
+let bodyLength = fromJust (fromValue (fixed !! 4))
+let serial = fromJust (fromVariant (Variant (fixed !! 5)))
+:
+
+The last field of the fixed header is actually part of the field array,
+but is treated as a single {\tt Word32} so it'll be known how many bytes
+to retrieve.
+
+:d read fixed-length header
+let fieldByteCount = fromJust (fromValue (fixed !! 6))
+:
+
+With the field byte count, the remainder of the header bytes can be
+pulled out of the monad.
+
+:d read full header
+let headerSig  = "yyyyuua(yv)"
+fieldBytes <- getBytes fieldByteCount
+let headerBytes = Data.ByteString.append fixedBytes fieldBytes
+header <- unmarshal' headerSig headerBytes
+:
+
+And the header fields can be parsed.
+
+:d read full header
+let fieldArray = Data.Vector.toList (fromJust (fromValue (header !! 6)))
+fields <- case E.runErrorM $ concat `liftM` mapM decodeField fieldArray of
+	Left err -> E.throwErrorT err
+	Right x -> return x
+:
+
+The body is always aligned to 8 bytes, so pull out the padding before
+unmarshaling it.
+
+:d read body
+let bodyPadding = padding (fromIntegral fieldByteCount + 16) 8
+void (getBytes (fromIntegral bodyPadding))
+:
+
+:d DBus.Wire
+findBodySignature :: [HeaderField] -> Signature
+findBodySignature fields = fromMaybe "" (listToMaybe [x | HeaderSignature x <- fields])
+:
+
+:d read body
+let bodySig = findBodySignature fields
+:
+
+Then pull the body bytes, and unmarshal it.
+
+:d read body
+bodyBytes <- getBytes bodyLength
+body <- unmarshal' bodySig bodyBytes
+:
+
+Even if the received message was structurally valid, building the
+{\tt ReceivedMessage} can still fail due to missing header fields.
+
+:d build message
+y <- case E.runErrorM (buildReceivedMessage messageType fields) of
+	Right x -> return x
+	Left err -> E.throwErrorT (UnmarshalError (Data.Text.pack (concat
+		[ "Header field "
+		, show err
+		, " is required, but missing"
+		])))
+return (y serial flags (map Variant body))
+:
+
+This really belongs in the Message section...
+
+:d DBus.Wire
+buildReceivedMessage :: Word8 -> [HeaderField] -> E.ErrorM Text
+                        (Serial -> (Set Flag) -> [Variant]
+                         -> ReceivedMessage)
+:
+
+Method calls
+
+:d DBus.Wire
+buildReceivedMessage 1 fields = do
+	path <- require "path" [x | HeaderPath x <- fields]
+	member <- require "member name" [x | HeaderMember x <- fields]
+	return $ \serial flags body -> let
+		iface = listToMaybe [x | HeaderInterface x <- fields]
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = MethodCall path member iface dest flags body
+		in ReceivedMethodCall serial sender msg
+:
+
+Method returns
+
+:d DBus.Wire
+buildReceivedMessage 2 fields = do
+	replySerial <- require "reply serial" [x | HeaderReplySerial x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = MethodReturn replySerial dest body
+		in ReceivedMethodReturn serial sender msg
+:
+
+Errors
+
+:d DBus.Wire
+buildReceivedMessage 3 fields = do
+	name <- require "error name" [x | HeaderErrorName x <- fields]
+	replySerial <- require "reply serial" [x | HeaderReplySerial x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = Error name replySerial dest body
+		in ReceivedError serial sender msg
+:
+
+Signals
+
+:d DBus.Wire
+buildReceivedMessage 4 fields = do
+	path <- require "path" [x | HeaderPath x <- fields]
+	member <- require "member name" [x | HeaderMember x <- fields]
+	iface <- require "interface" [x | HeaderInterface x <- fields]
+	return $ \serial _ body -> let
+		dest = listToMaybe [x | HeaderDestination x <- fields]
+		sender = listToMaybe [x | HeaderSender x <- fields]
+		msg = Signal dest path iface member body
+		in ReceivedSignal serial sender msg
+:
+
+Unknown
+
+:d DBus.Wire
+buildReceivedMessage messageType fields = return $ \serial flags body -> let
+	sender = listToMaybe [x | HeaderSender x <- fields]
+	msg = Unknown messageType flags body
+	in ReceivedUnknown serial sender msg
+:
+
+:d DBus.Wire
+require :: Text -> [a] -> E.ErrorM Text a
+require _     (x:_) = return x
+require label _     = E.throwErrorM label
+:
+
+To simplify the public interface, the incremental interface to message
+unmarshaling is hidden. Clients just need to pass in a single bytestring.
+This is OK, because clients do not need to read full messages off a socket
+(they typically use this for parsing stored messages).
+
+:d DBus.Wire
+|apidoc DBus.Wire.unmarshalMessage|
+unmarshalMessage :: ByteString -> Either UnmarshalError ReceivedMessage
+unmarshalMessage = Data.Binary.Get.runGet get . toLazy where
+	get = unmarshalMessageM getBytes
+	getBytes = Data.Binary.Get.getByteString . fromIntegral
+	toLazy bs = Data.ByteString.Lazy.fromChunks [bs]
 :
diff --git a/tests/Tests.hs b/tests/Tests.hs
new file mode 100644
--- /dev/null
+++ b/tests/Tests.hs
@@ -0,0 +1,925 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+-- Copyright (C) 2010-2011 John Millikin <jmillikin@gmail.com>
+-- 
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- any later version.
+-- 
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+-- 
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+module Main (tests, main) where
+
+import           Test.Framework (Test, testGroup)
+import qualified Test.Framework
+import           Test.Framework.Providers.QuickCheck2 (testProperty)
+import           Test.Framework.Providers.HUnit (testCase)
+import           Test.HUnit (Assertion, assertFailure)
+import qualified Test.HUnit
+import           Test.QuickCheck hiding ((.&.))
+
+import           Control.Applicative ((<$>), (<*>))
+import qualified Control.Exception
+import           Control.Monad (liftM, liftM2)
+import qualified Data.Binary.Builder
+import           Data.Bits ((.&.))
+import           Data.ByteString (ByteString)
+import qualified Data.ByteString
+import qualified Data.ByteString.Lazy
+import           Data.Char (chr)
+import           Data.List (intercalate)
+import           Data.Text (Text)
+import qualified Data.Text as T
+import qualified Data.Text
+import qualified Data.Text.Lazy
+import           Data.Word (Word8, Word16, Word32, Word64)
+import           Data.Int (Int16, Int32, Int64)
+import           Data.Map (Map)
+import qualified Data.Map
+import           Data.Maybe (isJust, fromJust)
+import qualified Data.Set
+import           Data.String (IsString, fromString)
+import qualified Data.Vector
+import qualified System.Posix.Env
+
+import           DBus.Address
+import           DBus.Client ()
+import           DBus.Client.Simple ()
+import           DBus.Connection ()
+import           DBus.Message ()
+import           DBus.Message.Internal hiding (errorName)
+import           DBus.Types
+import           DBus.Types.Internal
+import           DBus.Wire (marshalMessage, unmarshalMessage)
+import qualified DBus.Wire
+import qualified DBus.Wire.Internal
+import qualified DBus.Introspection
+
+tests :: Test
+tests = testGroup "tests"
+	[ test_Address
+	, test_Signature
+	, test_Types
+	, test_Variant
+	, test_ObjectPath
+	, test_ContainerBoxes
+	, test_InterfaceName
+	, test_MemberName
+	, test_ErrorName
+	, test_BusName
+	, test_Wire
+	, test_Introspection
+	]
+
+main :: IO ()
+main = Test.Framework.defaultMain [tests]
+
+test_Address :: Test
+test_Address = testGroup "address"
+	[ testGroup "valid"
+	  [ testCase "colon" $ do
+	    	addr <- requireJust (address ":")
+	    	assertEqual (addressMethod addr) ""
+	    	assertEqual (addressParameters addr) (Data.Map.fromList [])
+	  , testCase "just-scheme" $ do
+	    	addr <- requireJust (address "a:")
+	    	assertEqual (addressMethod addr) "a"
+	    	assertEqual (addressParameters addr) (Data.Map.fromList [])
+	  , testCase "param" $ do
+	    	addr <- requireJust (address "a:b=c")
+	    	assertEqual (addressMethod addr) "a"
+	    	assertEqual (addressParameters addr) (Data.Map.fromList [("b", "c")])
+	  , testCase "trailing-semicolon" $ do
+	    	addrs <- requireJust (addresses "a:;")
+	    	assertEqual (length addrs) 1
+	    	let [addr1] = addrs
+	    	assertEqual (addressMethod addr1) "a"
+	    	assertEqual (addressParameters addr1) (Data.Map.fromList [])
+	  , testCase "two-schemes" $ do
+	    	addrs <- requireJust (addresses "a:;b:")
+	    	assertEqual (length addrs) 2
+	    	let [addr1, addr2] = addrs
+	    	assertEqual (addressMethod addr1) "a"
+	    	assertEqual (addressParameters addr1) (Data.Map.fromList [])
+	    	assertEqual (addressMethod addr2) "b"
+	    	assertEqual (addressParameters addr2) (Data.Map.fromList [])
+	  , testCase "trailing-comma" $ do
+	    	addr <- requireJust (address "a:b=c,")
+	    	assertEqual (addressMethod addr) "a"
+	    	assertEqual (addressParameters addr) (Data.Map.fromList [("b", "c")])
+	  , testCase "encoded" $ do
+	    	addr <- requireJust (address "a:b=%678")
+	    	assertEqual (addressMethod addr) "a"
+	    	assertEqual (addressParameters addr) (Data.Map.fromList [("b", "g8")])
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (address ""))
+	  , testCase "no-colon" (assertNothing (address "a"))
+	  , testCase "no-equals" (assertNothing (address "a:b"))
+	  , testCase "no-param" (assertNothing (address "a:,"))
+	  , testCase "no-param-value" (assertNothing (address "a:b="))
+	  ]
+	, testGroup "passthrough"
+	  [ testCase "plain" (assertEqual (Just "a:b=c") (addressText `fmap` address "a:b=c"))
+	  , testCase "encoded" (assertEqual (Just "a:b=Z%5B") (addressText `fmap` address "a:b=%5a%5b"))
+	  , testCase "optionally-encoded" (assertEqual (Just "a:b=-_/\\*.") (addressText `fmap` address "a:b=-_/\\*."))
+	  , testCase "multiple-params" (assertEqual (Just "a:b=c,d=e") (addressText `fmap` address "a:b=c,d=e"))
+	  ]
+	, testGroup "instances"
+	  [ testCase "eq" (assertEqual (address "a:b=c") (address "a:b=c"))
+	  , testCase "show" (assertEqual "(Address \"a:b=c\")" (showsPrec 11 (fromJust (address "a:b=c")) ""))
+	  ]
+	, testGroup "well-known"
+	  [ testCase "system" (withEnv "DBUS_SYSTEM_BUS_ADDRESS" (Just "a:b=c;d:") (do
+	    	addrs <- getSystem
+	    	assertEqual addrs (Just ["a:b=c", "d:"])))
+	  , testCase "default-system" (withEnv "DBUS_SYSTEM_BUS_ADDRESS" Nothing (do
+	    	addrs <- getSystem
+	    	assertEqual addrs (Just ["unix:path=/var/run/dbus/system_bus_socket"])))
+	  , testCase "session" (withEnv "DBUS_SESSION_BUS_ADDRESS" (Just "a:b=c;d:") (do
+	    	addrs <- getSession
+	    	assertEqual addrs (Just ["a:b=c", "d:"])))
+	  , testCase "starter" (withEnv "DBUS_STARTER_BUS_ADDRESS" (Just "a:b=c;d:") (do
+	    	addrs <- getStarter
+	    	assertEqual addrs (Just ["a:b=c", "d:"])))
+	  ]
+	, testGroup "properties"
+	  [ testProperty "address-parsing" (forAll genAddressText (isJust . address))
+	  ]
+	]
+
+test_Signature :: Test
+test_Signature = testGroup "signature"
+	[ testGroup "valid"
+	  [ testGroup "atom"
+	    [ testCase "bool" $ do
+	      	sig <- requireJust (signature "b")
+	      	assertEqual (signatureTypes sig) [TypeBoolean]
+	    , testCase "word8" $ do
+	      	sig <- requireJust (signature "y")
+	      	assertEqual (signatureTypes sig) [TypeWord8]
+	    , testCase "word16" $ do
+	      	sig <- requireJust (signature "q")
+	      	assertEqual (signatureTypes sig) [TypeWord16]
+	    , testCase "word32" $ do
+	      	sig <- requireJust (signature "u")
+	      	assertEqual (signatureTypes sig) [TypeWord32]
+	    , testCase "word64" $ do
+	      	sig <- requireJust (signature "t")
+	      	assertEqual (signatureTypes sig) [TypeWord64]
+	    , testCase "int16" $ do
+	      	sig <- requireJust (signature "n")
+	      	assertEqual (signatureTypes sig) [TypeInt16]
+	    , testCase "int32" $ do
+	      	sig <- requireJust (signature "i")
+	      	assertEqual (signatureTypes sig) [TypeInt32]
+	    , testCase "int64" $ do
+	      	sig <- requireJust (signature "x")
+	      	assertEqual (signatureTypes sig) [TypeInt64]
+	    , testCase "double" $ do
+	      	sig <- requireJust (signature "d")
+	      	assertEqual (signatureTypes sig) [TypeDouble]
+	    , testCase "string" $ do
+	      	sig <- requireJust (signature "s")
+	      	assertEqual (signatureTypes sig) [TypeString]
+	    , testCase "object-path" $ do
+	      	sig <- requireJust (signature "o")
+	      	assertEqual (signatureTypes sig) [TypeObjectPath]
+	    , testCase "signature" $ do
+	      	sig <- requireJust (signature "g")
+	      	assertEqual (signatureTypes sig) [TypeSignature]
+	    ]
+	  , testGroup "container"
+	    [ testCase "variant" $ do
+	      	sig <- requireJust (signature "v")
+	      	assertEqual (signatureTypes sig) [TypeVariant]
+	    , testCase "array" $ do
+	      	sig <- requireJust (signature "ay")
+	      	assertEqual (signatureTypes sig) [TypeArray TypeWord8]
+	    , testCase "struct" $ do
+	      	sig <- requireJust (signature "(yy)")
+	      	assertEqual (signatureTypes sig) [TypeStructure [TypeWord8, TypeWord8]]
+	    , testCase "dictionary" $ do
+	      	sig <- requireJust (signature "a{yy}")
+	      	assertEqual (signatureTypes sig) [TypeDictionary TypeWord8 TypeWord8]
+	    ]
+	  , testCase "empty" $ do
+	    	sig <- requireJust (signature "")
+	    	assertEqual (signatureTypes sig) []
+	  ]
+	, testGroup "invalid"
+	  [ testCase "struct-code" (assertNothing (signature "r"))
+	  , testCase "struct-empty" (assertNothing (signature "()"))
+	  , testCase "dict-code" (assertNothing (signature "e"))
+	  , testCase "dict-container-key" (assertNothing (signature "a{vy}"))
+	  , testCase "unix-fd" (assertNothing (signature "h"))
+	  ]
+	, testGroup "length"
+	  [ testCase "length-254" $ do
+	    	sig <- requireJust (signature (T.replicate 254 "y"))
+	    	assertEqual (signatureTypes sig) (replicate 254 TypeWord8)
+	  , testCase "length-255" $ do
+	    	sig <- requireJust (signature (T.replicate 255 "y"))
+	    	assertEqual (signatureTypes sig) (replicate 255 TypeWord8)
+	  , testCase "length-256" (assertNothing (signature (T.replicate 256 "y")))
+	  ]
+	, testGroup "instances"
+	  [ testCase "show" (assertEqual "(Signature \"y\")" (showsPrec 11 (fromJust (signature "y")) ""))
+	  ]
+	, testGroup "properties"
+	  [ testProperty "signature-parsing" (forAll genSignatureText (isJust . signature))
+	  , let prop types = checkSignature types == signature (T.pack (concatMap typeCode types)) in
+	    testProperty "check-signature" (forAll (listOf1 arbitrary) prop)
+	  ]
+	]
+
+test_Types :: Test
+test_Types = testGroup "types"
+	[ testGroup "instances"
+	  [ testCase "eq" (assertEqual TypeWord8 TypeWord8)
+	  , testGroup "show"
+	    [ testCase "Boolean" (assertEqual "Bool" (show TypeBoolean))
+	    , testCase "Word8" (assertEqual "Word8" (show TypeWord8))
+	    , testCase "Word16" (assertEqual "Word16" (show TypeWord16))
+	    , testCase "Word32" (assertEqual "Word32" (show TypeWord32))
+	    , testCase "Word64" (assertEqual "Word64" (show TypeWord64))
+	    , testCase "Int16" (assertEqual "Int16" (show TypeInt16))
+	    , testCase "Int32" (assertEqual "Int32" (show TypeInt32))
+	    , testCase "Int64" (assertEqual "Int64" (show TypeInt64))
+	    , testCase "Double" (assertEqual "Double" (show TypeDouble))
+	    , testCase "String" (assertEqual "String" (show TypeString))
+	    , testCase "Signature" (assertEqual "Signature" (show TypeSignature))
+	    , testCase "ObjectPath" (assertEqual "ObjectPath" (show TypeObjectPath))
+	    , testCase "Variant" (assertEqual "Variant" (show TypeVariant))
+	    , testCase "Array" (assertEqual "[Word8]" (show (TypeArray TypeWord8)))
+	    , testCase "Dictionary" (assertEqual "Map Word8 (Map Word8 Word8)" (show (TypeDictionary TypeWord8 (TypeDictionary TypeWord8 TypeWord8))))
+	    , testCase "Structure" (assertEqual "(Word8, Word16)" (show (TypeStructure [TypeWord8, TypeWord16])))
+	    ]
+	  ]
+	]
+
+test_Variant :: Test
+test_Variant = testGroup "variant"
+	[ testGroup "instances-of-IsAtom"
+	  [ testCase "bool" (assertAtom TypeBoolean True)
+	  , testCase "word8" (assertAtom TypeWord8 (0 :: Word8))
+	  , testCase "word16" (assertAtom TypeWord16 (0 :: Word16))
+	  , testCase "word32" (assertAtom TypeWord32 (0 :: Word32))
+	  , testCase "word64" (assertAtom TypeWord64 (0 :: Word64))
+	  , testCase "int16" (assertAtom TypeInt16 (0 :: Int16))
+	  , testCase "int32" (assertAtom TypeInt32 (0 :: Int32))
+	  , testCase "int64" (assertAtom TypeInt64 (0 :: Int64))
+	  , testCase "double" (assertAtom TypeDouble (0 :: Double))
+	  , testCase "text" (assertAtom TypeString (Data.Text.pack ""))
+	  , testCase "lazy-text" (assertAtom TypeString (Data.Text.Lazy.pack ""))
+	  , testCase "string" (assertAtom TypeString ("" :: String))
+	  , testCase "object-path" (assertAtom TypeObjectPath (objectPath_ "/"))
+	  , testCase "signature" (assertAtom TypeSignature (signature_ ""))
+	  ]
+	, testGroup "instances-of-IsValue"
+	  [ testCase "variant" (assertValue TypeVariant (toVariant True))
+	  , testCase "list" (assertValue (TypeArray TypeBoolean) [True])
+	  , testCase "vector" (assertValue (TypeArray TypeBoolean) (Data.Vector.fromList [True]))
+	  , testCase "bytestring-strict" (assertValue (TypeArray TypeWord8) Data.ByteString.empty)
+	  , testCase "bytestring-lazy" (assertValue (TypeArray TypeWord8) Data.ByteString.Lazy.empty)
+	  , testCase "map" (assertValue (TypeDictionary TypeBoolean TypeBoolean) (Data.Map.fromList [(True, True)]))
+	  , testCase "tuple-2" (assertValue (TypeStructure (replicate 2 TypeBoolean)) (True, True))
+	  , testCase "tuple-3" (assertValue (TypeStructure (replicate 3 TypeBoolean)) (True, True, True))
+	  , testCase "tuple-4" (assertValue (TypeStructure (replicate 4 TypeBoolean)) (True, True, True, True))
+	  , testCase "tuple-5" (assertValue (TypeStructure (replicate 5 TypeBoolean)) (True, True, True, True, True))
+	  , testCase "tuple-6" (assertValue (TypeStructure (replicate 6 TypeBoolean)) (True, True, True, True, True, True))
+	  , testCase "tuple-7" (assertValue (TypeStructure (replicate 7 TypeBoolean)) (True, True, True, True, True, True, True))
+	  , testCase "tuple-8" (assertValue (TypeStructure (replicate 8 TypeBoolean)) (True, True, True, True, True, True, True, True))
+	  , testCase "tuple-9" (assertValue (TypeStructure (replicate 9 TypeBoolean)) (True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-10" (assertValue (TypeStructure (replicate 10 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-11" (assertValue (TypeStructure (replicate 11 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-12" (assertValue (TypeStructure (replicate 12 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-13" (assertValue (TypeStructure (replicate 13 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-14" (assertValue (TypeStructure (replicate 14 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True, True, True, True, True))
+	  , testCase "tuple-15" (assertValue (TypeStructure (replicate 15 TypeBoolean)) (True, True, True, True, True, True, True, True, True, True, True, True, True, True, True))
+	  ]
+	, testGroup "show-variant"
+	  [ testCase "bool" (assertEqual "Variant True" (show (toVariant True)))
+	  , testCase "word8" (assertEqual "Variant 0" (show (toVariant (0 :: Word8))))
+	  , testCase "word16" (assertEqual "Variant 0" (show (toVariant (0 :: Word16))))
+	  , testCase "word32" (assertEqual "Variant 0" (show (toVariant (0 :: Word32))))
+	  , testCase "word64" (assertEqual "Variant 0" (show (toVariant (0 :: Word64))))
+	  , testCase "int16" (assertEqual "Variant 0" (show (toVariant (0 :: Int16))))
+	  , testCase "int32" (assertEqual "Variant 0" (show (toVariant (0 :: Int32))))
+	  , testCase "int64" (assertEqual "Variant 0" (show (toVariant (0 :: Int64))))
+	  , testCase "double" (assertEqual "Variant 0.1" (show (toVariant (0.1 :: Double))))
+	  , testCase "string" (assertEqual "Variant \"\"" (show (toVariant (T.pack ""))))
+	  , testCase "object-path" (assertEqual "Variant (ObjectPath \"/\")" (show (toVariant (objectPath_ "/"))))
+	  , testCase "signature" (assertEqual "Variant (Signature \"\")" (show (toVariant (signature_ ""))))
+	  , testCase "variant" (assertEqual "Variant (Variant True)" (show (toVariant (toVariant True))))
+	  , testCase "array" (assertEqual "Variant [True, False]" (show (toVariant [True, False])))
+	  , testGroup "array"
+	    [ testCase "bytestring-strict" (assertEqual "Variant b\"\"" (show (toVariant Data.ByteString.empty)))
+	    , testCase "bytestring-lazy" (assertEqual "Variant b\"\"" (show (toVariant Data.ByteString.Lazy.empty)))
+	    , testCase "array-of-word8" (assertEqual "Variant b\"\"" (show (toVariant ([] :: [Word8]))))
+	    ]
+	  , testCase "dictionary" (assertEqual "(Variant {False: True, True: False})" (showsPrec 11 (toVariant (Data.Map.fromList [(True, False), (False, True)])) ""))
+	  , testCase "structure" (assertEqual "(Variant (True, False))" (showsPrec 11 (toVariant (True, False)) ""))
+	  ]
+	, testCase "compare-byte-storage" $ do
+	  	assertEqual (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	            (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	assertEqual (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	            (toValue (Data.ByteString.pack [0]))
+	  	assertEqual (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	            (toValue (Data.ByteString.Lazy.pack [0]))
+	  	
+	  	assertEqual (toValue (Data.ByteString.pack [0]))
+	  	            (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	assertEqual (toValue (Data.ByteString.pack [0]))
+	  	            (toValue (Data.ByteString.pack [0]))
+	  	assertEqual (toValue (Data.ByteString.pack [0]))
+	  	            (toValue (Data.ByteString.Lazy.pack [0]))
+	  	
+	  	assertEqual (toValue (Data.ByteString.Lazy.pack [0]))
+	  	            (toValue (Data.Vector.fromList [0 :: Word8]))
+	  	assertEqual (toValue (Data.ByteString.Lazy.pack [0]))
+	  	            (toValue (Data.ByteString.pack [0]))
+	  	assertEqual (toValue (Data.ByteString.Lazy.pack [0]))
+	  	            (toValue (Data.ByteString.Lazy.pack [0]))
+	]
+
+test_ContainerBoxes :: Test
+test_ContainerBoxes = testGroup "container-boxes"
+	[ testGroup "structure"
+	  [ testCase "instance-of-Eq" (assertEqual (Structure []) (Structure []))
+	  , testCase "instance-of-Show" (assertEqual "(True, False)" (show (Structure [toValue True, toValue False])))
+	  , testCase "instance-of-IsVariant" (assertVariant (TypeStructure [TypeBoolean]) (Structure [toValue True]))
+	  ]
+	, testGroup "array"
+	  [ testCase "instance-of-Eq" $ do
+	    	assertEqual (Array TypeBoolean (Data.Vector.fromList [toValue True]))
+	    	            (Array TypeBoolean (Data.Vector.fromList [toValue True]))
+	    	assertEqual (Array TypeWord8 (Data.Vector.fromList [toValue (0 :: Word8)]))
+	    	            (ArrayBytes (Data.ByteString.pack [0]))
+	  , testCase "instance-of-Show" $ do
+	    	assertEqual "[True, False]" (show (Array TypeBoolean (Data.Vector.fromList [toValue True, toValue False])))
+	    	assertEqual "b\"\"" (show (Array TypeWord8 Data.Vector.empty))
+	    	assertEqual "b\"\"" (show (ArrayBytes Data.ByteString.empty))
+	  , testCase "instance-of-IsVariant" $ do
+	    	assertVariant (TypeArray TypeWord8) (Array TypeWord8 Data.Vector.empty)
+	    	assertVariant (TypeArray TypeWord8) (ArrayBytes Data.ByteString.empty)
+	  ]
+	, testGroup "dictionary"
+	  [ testCase "instance-of-Eq" (assertEqual (Dictionary TypeWord8 TypeWord8 Data.Map.empty)
+	                                           (Dictionary TypeWord8 TypeWord8 Data.Map.empty))
+	  , testCase "instance-of-Show" (assertEqual "{}" (show (Dictionary TypeWord8 TypeWord8 Data.Map.empty)))
+	  , testCase "instance-of-IsVariant" (assertVariant (TypeDictionary TypeWord8 TypeWord8) (Dictionary TypeWord8 TypeWord8 Data.Map.empty))
+	  ]
+	]
+
+test_ObjectPath :: Test
+test_ObjectPath = testGroup "object-path"
+	[ testGroup "valid"
+	  [ testCase "root" (assertJust (objectPath "/"))
+	  , testCase "plain-1" (assertJust (objectPath "/foo"))
+	  , testCase "plain-2" (assertJust (objectPath "/foo/bar"))
+	  , testCase "start-with-digit" (assertJust (objectPath "/foo/0"))
+	  , testCase "all-characters" (assertJust (objectPath "/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (objectPath ""))
+	  , testCase "bad-char" (assertNothing (objectPath "/f!oo"))
+	  , testCase "end-with-slash" (assertNothing (objectPath "/foo/"))
+	  , testCase "empty-element" (assertNothing (objectPath "/foo//bar"))
+	  , testCase "trailing-chars" (assertNothing (objectPath "/foo!"))
+	  ]
+	]
+
+test_InterfaceName :: Test
+test_InterfaceName = testGroup "interface-name"
+	[ testCase "instance-of-IsVariant" (assertVariant TypeString (interfaceName_ "foo.bar"))
+	, testGroup "valid"
+	  [ testCase "plain" (assertJust (interfaceName "foo.bar"))
+	  , testCase "has-digit" (assertJust (interfaceName "foo.bar0"))
+	  , testCase "all-characters" (assertJust (interfaceName "a.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (interfaceName ""))
+	  , testCase "one-element" (assertNothing (interfaceName "foo"))
+	  , testCase "start-with-digit" (assertNothing (interfaceName "foo.0bar"))
+	  , testCase "trailing-chars" (assertNothing (interfaceName "foo.bar!"))
+	  ]
+	, testGroup "length"
+	  [ testCase "length-254"  (assertJust (interfaceName ("f." `T.append` T.replicate 252 "y")))
+	  , testCase "length-255" (assertJust (interfaceName ("f." `T.append` T.replicate 253 "y")))
+	  , testCase "length-256" (assertNothing (interfaceName ("f." `T.append` T.replicate 254 "y")))
+	  ]
+	]
+
+test_MemberName :: Test
+test_MemberName = testGroup "member-name"
+	[ testCase "instance-of-IsVariant" (assertVariant TypeString (memberName_ "foo"))
+	, testGroup "valid"
+	  [ testCase "plain" (assertJust (memberName "foo"))
+	  , testCase "has-digit" (assertJust (memberName "foo0"))
+	  , testCase "all-characters" (assertJust (memberName "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (memberName ""))
+	  , testCase "start-with-digit" (assertNothing (memberName "0foo"))
+	  , testCase "trailing-chars" (assertNothing (memberName "foo!"))
+	  ]
+	, testGroup "length"
+	  [ testCase "length-254"  (assertJust (memberName (T.replicate 254 "y")))
+	  , testCase "length-255" (assertJust (memberName (T.replicate 255 "y")))
+	  , testCase "length-256" (assertNothing (memberName (T.replicate 256 "y")))
+	  ]
+	]
+
+test_ErrorName :: Test
+test_ErrorName = testGroup "error-name"
+	[ testCase "instance-of-IsVariant" (assertVariant TypeString (errorName_ "foo.bar"))
+	, testGroup "valid"
+	  [ testCase "plain" (assertJust (errorName "foo.bar"))
+	  , testCase "has-digit" (assertJust (errorName "foo.bar0"))
+	  , testCase "all-characters" (assertJust (errorName "a.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (errorName ""))
+	  , testCase "one-element" (assertNothing (errorName "foo"))
+	  , testCase "start-with-digit" (assertNothing (errorName "foo.0bar"))
+	  , testCase "trailing-chars" (assertNothing (errorName "foo.bar!"))
+	  ]
+	, testGroup "length"
+	  [ testCase "length-254"  (assertJust (errorName ("f." `T.append` T.replicate 252 "y")))
+	  , testCase "length-255" (assertJust (errorName ("f." `T.append` T.replicate 253 "y")))
+	  , testCase "length-256" (assertNothing (errorName ("f." `T.append` T.replicate 254 "y")))
+	  ]
+	]
+
+test_BusName :: Test
+test_BusName = testGroup "bus-name"
+	[ testCase "instance-of-IsVariant" (assertVariant TypeString (busName_ "foo.bar"))
+	, testGroup "valid"
+	  [ testGroup "unique"
+	    [ testCase "plain" (assertJust (busName ":foo.bar"))
+	    , testCase "start-with-digit" (assertJust (busName ":foo.0bar"))
+	    , testCase "all-characters" (assertJust (busName ":a.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	    ]
+	  , testGroup "well-known"
+	    [ testCase "plain" (assertJust (busName "foo.bar"))
+	    , testCase "has-digit" (assertJust (busName "foo.bar0"))
+	    , testCase "all-characters" (assertJust (busName "a.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789"))
+	    ]
+	  ]
+	, testGroup "invalid"
+	  [ testCase "empty" (assertNothing (busName ""))
+	  , testCase "well-known-start-with-digit" (assertNothing (busName "foo.0bar"))
+	  , testCase "well-known-one-element" (assertNothing (busName "foo"))
+	  , testCase "unique-one-element" (assertNothing (busName ":foo"))
+	  , testCase "trailing-chars" (assertNothing (busName "foo.bar!"))
+	  ]
+	, testGroup "length"
+	  [ testCase "length-254"  (assertJust (busName (":0." `T.append` T.replicate 251 "y")))
+	  , testCase "length-255" (assertJust (busName (":0." `T.append` T.replicate 252 "y")))
+	  , testCase "length-256" (assertNothing (busName (":0." `T.append` T.replicate 253 "y")))
+	  ]
+	]
+
+test_Wire :: Test
+test_Wire = testGroup "wire"
+	[ testProperty "value-passthrough" prop_ValuePassthrough
+	, testGroup "message-passthrough"
+	  [ testProperty "method-call" (forAll (arbitrary :: Gen MethodCall) (\msg e s ->
+	    	let Right bytes = marshalMessage e s msg in
+	    	let Right received = unmarshalMessage bytes in
+	    	ReceivedMethodCall s Nothing msg == received))
+	  , testProperty "method-return" (forAll (arbitrary :: Gen MethodReturn) (\msg e s ->
+	    	let Right bytes = marshalMessage e s msg in
+	    	let Right received = unmarshalMessage bytes in
+	    	ReceivedMethodReturn s Nothing msg == received))
+	  , testProperty "error" (forAll (arbitrary :: Gen Error) (\msg e s ->
+	    	let Right bytes = marshalMessage e s msg in
+	    	let Right received = unmarshalMessage bytes in
+	    	ReceivedError s Nothing msg == received))
+	  , testProperty "signal" (forAll (arbitrary :: Gen Signal) (\msg e s ->
+	    	let Right bytes = marshalMessage e s msg in
+	    	let Right received = unmarshalMessage bytes in
+	    	ReceivedSignal s Nothing msg == received))
+	  ]
+	]
+
+test_Introspection :: Test
+test_Introspection = testGroup "introspection"
+	[ testProperty "xml-passthrough" (\obj ->
+	  	let (DBus.Introspection.Object path _ _) = obj in
+	  	let Just xml = DBus.Introspection.toXML obj in
+	  	DBus.Introspection.fromXML path xml == Just obj)
+	]
+
+prop_ValuePassthrough :: Value -> DBus.Wire.Endianness -> Bool
+prop_ValuePassthrough v e = unmarshaled == v where
+	Right bytes = marshal e v
+	Right unmarshaled = unmarshal e (valueType v) bytes
+
+marshal :: DBus.Wire.Endianness -> Value -> Either String ByteString
+marshal e v = case DBus.Wire.Internal.unWire (DBus.Wire.Internal.marshal v) e (DBus.Wire.Internal.MarshalState Data.Binary.Builder.empty 0) of
+	DBus.Wire.Internal.WireRR _ (DBus.Wire.Internal.MarshalState builder _) -> Right (Data.ByteString.concat (Data.ByteString.Lazy.toChunks (Data.Binary.Builder.toLazyByteString builder)))
+	DBus.Wire.Internal.WireRL err -> Left err
+
+unmarshal :: DBus.Wire.Endianness -> Type -> ByteString -> Either String Value
+unmarshal e t bytes = case DBus.Wire.Internal.unWire (DBus.Wire.Internal.unmarshal t) e (DBus.Wire.Internal.UnmarshalState bytes 0) of
+	DBus.Wire.Internal.WireRR v _ -> Right v
+	DBus.Wire.Internal.WireRL err -> Left err
+
+genAddressText :: Gen Text
+genAddressText = gen where
+	methodChars = filter (`notElem` ":;") ['!'..'~']
+	keyChars = filter (`notElem` "=;,") ['!'..'~']
+	optionallyEncoded = map (:[]) (concat
+		[ ['0'..'9']
+		, ['a'..'z']
+		, ['A'..'Z']
+		, "-_/\\*."
+		])
+	
+	param = do
+		key <- listOf1 (elements keyChars)
+		value <- listOf1 (oneof
+			[ elements optionallyEncoded
+			, do
+			  	c1 <- genHex
+			  	c2 <- genHex
+			  	return ['%', c1, c2]
+			])
+		return (key ++ "=" ++ concat value)
+	
+	gen = do
+		method <- listOf (elements methodChars)
+		params <- listOf param
+		return (T.pack (method ++ ":" ++ (intercalate "," params)))
+
+genHex :: Gen Char
+genHex = elements (['0'..'9'] ++ ['a'..'f'] ++ ['A'..'F'])
+
+genSignatureText :: Gen Text
+genSignatureText = gen where
+	anyType = oneof [atom, container]
+	atom = elements ["b", "y", "q", "u", "t", "n", "i", "x", "d", "s", "o", "g"]
+	container = oneof
+		[ return "v"
+		, do
+		  	t <- anyType
+		  	return ('a' : t)
+		, do
+		  	kt <- atom
+		  	vt <- anyType
+		  	return (concat ["a{", kt, vt, "}"])
+		, do
+		  	ts <- listOf1 (halfSized anyType)
+		  	return (concat (["("] ++ ts ++ [")"]))
+		]
+	gen = do
+		chars <- fmap concat (listOf anyType)
+		if length chars > 255
+			then halfSized gen
+			else return (T.pack chars)
+
+halfSized :: Gen a -> Gen a
+halfSized gen = sized (\n -> if n > 0
+	then resize (div n 2) gen
+	else gen)
+
+requireJust :: Maybe a -> IO a
+requireJust (Just a) = return a
+requireJust Nothing  = do
+	assertFailure "expected: (Just _)\n but got: Nothing" -- throws
+	error "requireJust: assertFailure didn't fail"
+
+assertJust :: Maybe a -> IO ()
+assertJust (Just _) = return ()
+assertJust Nothing  = assertFailure "expected: (Just _)\n but got: Nothing"
+
+assertNothing :: Maybe a -> Assertion
+assertNothing Nothing = return ()
+assertNothing (Just _)  = assertFailure "expected: (Just _)\n but got: Nothing"
+
+assertEqual :: (Show a, Eq a) => a -> a -> Assertion
+assertEqual = Test.HUnit.assertEqual ""
+
+assertAtom :: (Eq a, Show a, IsAtom a) => Type -> a -> Assertion
+assertAtom t a = do
+	assertEqual t (atomType (toAtom a))
+	assertEqual (fromAtom (toAtom a)) (Just a)
+	assertEqual (toAtom a) (toAtom a)
+	assertValue t a
+
+assertValue :: (Eq a, Show a, IsValue a) => Type -> a -> Assertion
+assertValue t a = do
+	assertEqual t (DBus.Types.typeOf a)
+	assertEqual t (DBus.Types.Internal.typeOf a)
+	assertEqual t (valueType (toValue a))
+	assertEqual (fromValue (toValue a)) (Just a)
+	assertEqual (toValue a) (toValue a)
+	assertVariant t a
+
+assertVariant :: (Eq a, Show a, IsVariant a) => Type -> a -> Assertion
+assertVariant t a = do
+	assertEqual t (variantType (toVariant a))
+	assertEqual (fromVariant (toVariant a)) (Just a)
+	assertEqual (toVariant a) (toVariant a)
+
+withEnv :: String -> Maybe String -> IO a -> IO a
+withEnv name value io = do
+	let set val = case val of
+		Just x -> System.Posix.Env.setEnv name x True
+		Nothing -> System.Posix.Env.unsetEnv name
+	old <- System.Posix.Env.getEnv name
+	Control.Exception.bracket_ (set value) (set old) io
+
+instance IsString Address where
+	fromString s = case address (T.pack s) of
+		Just addr -> addr
+		Nothing -> error ("Invalid address: " ++ show s)
+
+instance Arbitrary Type where
+	arbitrary = oneof [atom, container] where
+		atom = elements
+			[ TypeBoolean
+			, TypeWord8
+			, TypeWord16
+			, TypeWord32
+			, TypeWord64
+			, TypeInt16
+			, TypeInt32
+			, TypeInt64
+			, TypeDouble
+			, TypeString
+			, TypeObjectPath
+			, TypeSignature
+			]
+		container = oneof
+			[ return TypeVariant
+			, liftM TypeArray arbitrary
+			, liftM2 TypeDictionary atom arbitrary
+			, liftM TypeStructure (listOf1 (halfSized arbitrary))
+			]
+
+instance Arbitrary Atom where
+	arbitrary = oneof
+		[ liftM AtomWord8 arbitrary
+		, liftM AtomWord16 arbitrary
+		, liftM AtomWord32 arbitrary
+		, liftM AtomWord64 arbitrary
+		, liftM AtomInt16 arbitrary
+		, liftM AtomInt32 arbitrary
+		, liftM AtomInt64 arbitrary
+		, liftM AtomBool arbitrary
+		, liftM AtomDouble arbitrary
+		, liftM AtomText arbitrary
+		, liftM AtomObjectPath arbitrary
+		, liftM AtomSignature arbitrary
+		]
+
+instance Arbitrary Value where
+	arbitrary = oneof
+		[ liftM ValueAtom arbitrary
+		, liftM ValueBytes arbitrary
+		
+		-- TODO: proper arbitrary ValueVector
+		, elements
+		  [ toValue (Data.Vector.fromList ([] :: [Word8]))
+		  , toValue (Data.Vector.fromList ([0, 1, 2, 3, 4, 5] :: [Word8]))
+		  , toValue (Data.Vector.fromList ([0, 1, 2, 3, 4, 5] :: [Word16]))
+		  , toValue (Data.Vector.fromList ([0, 1, 2, 3, 4, 5] :: [Word32]))
+		  , toValue (Data.Vector.fromList ([0, 1, 2, 3, 4, 5] :: [Word64]))
+		  , toValue (Data.Vector.fromList (["foo", "bar", "baz"] :: [Text]))
+		  ]
+		
+		-- TODO: proper arbitrary ValueMap
+		, elements
+		  [ toValue (Data.Map.fromList [] :: Map Text Text)
+		  , toValue (Data.Map.fromList [("foo", "bar"), ("baz", "qux")] :: Map Text Text)
+		  ]
+		
+		, liftM ValueStructure (listOf1 (halfSized arbitrary))
+		, liftM ValueVariant arbitrary
+		]
+
+instance Arbitrary Variant where
+	arbitrary = do
+		val <- arbitrary
+		case checkSignature [valueType val] of
+			Just _ -> return (Variant val)
+			Nothing -> halfSized arbitrary
+
+instance Arbitrary Data.Text.Text where
+	arbitrary = liftM Data.Text.pack genUnicode
+
+genUnicode :: Gen [Char]
+genUnicode = string where
+	string = sized $ \n -> do
+		k <- choose (0,n)
+		sequence [ char | _ <- [1..k] ]
+	
+	excluding :: [a -> Bool] -> Gen a -> Gen a
+	excluding bad gen = loop where
+		loop = do
+			x <- gen
+			if or (map ($ x) bad)
+				then loop
+				else return x
+	
+	reserved = [lowSurrogate, highSurrogate, noncharacter]
+	lowSurrogate c = c >= 0xDC00 && c <= 0xDFFF
+	highSurrogate c = c >= 0xD800 && c <= 0xDBFF
+	noncharacter c = masked == 0xFFFE || masked == 0xFFFF where
+		masked = c .&. 0xFFFF
+	
+	ascii = choose (0x20, 0x7F)
+	plane0 = choose (0xF0, 0xFFFF)
+	plane1 = oneof [ choose (0x10000, 0x10FFF)
+	               , choose (0x11000, 0x11FFF)
+	               , choose (0x12000, 0x12FFF)
+	               , choose (0x13000, 0x13FFF)
+	               , choose (0x1D000, 0x1DFFF)
+	               , choose (0x1F000, 0x1FFFF)
+	               ]
+	plane2 = oneof [ choose (0x20000, 0x20FFF)
+	               , choose (0x21000, 0x21FFF)
+	               , choose (0x22000, 0x22FFF)
+	               , choose (0x23000, 0x23FFF)
+	               , choose (0x24000, 0x24FFF)
+	               , choose (0x25000, 0x25FFF)
+	               , choose (0x26000, 0x26FFF)
+	               , choose (0x27000, 0x27FFF)
+	               , choose (0x28000, 0x28FFF)
+	               , choose (0x29000, 0x29FFF)
+	               , choose (0x2A000, 0x2AFFF)
+	               , choose (0x2B000, 0x2BFFF)
+	               , choose (0x2F000, 0x2FFFF)
+	               ]
+	plane14 = choose (0xE0000, 0xE0FFF)
+	planes = [ascii, plane0, plane1, plane2, plane14]
+	
+	char = chr `fmap` excluding reserved (oneof planes)
+
+instance Arbitrary Data.ByteString.ByteString where
+	arbitrary = liftM Data.ByteString.pack arbitrary
+
+instance Arbitrary Data.ByteString.Lazy.ByteString where
+	arbitrary = liftM Data.ByteString.Lazy.fromChunks arbitrary
+
+instance Arbitrary ObjectPath where
+	-- TODO: proper arbitrary generation
+	arbitrary = elements
+		[ objectPath_ "/"
+		, objectPath_ "/foo"
+		, objectPath_ "/foo/bar"
+		]
+
+instance Arbitrary InterfaceName where
+	-- TODO: proper arbitrary generation
+	arbitrary = elements
+		[ interfaceName_ "foo.bar"
+		, interfaceName_ "foo.bar0"
+		]
+
+instance Arbitrary MemberName where
+	-- TODO: proper arbitrary generation
+	arbitrary = elements
+		[ memberName_ "foo"
+		, memberName_ "foo0"
+		]
+
+instance Arbitrary ErrorName where
+	-- TODO: proper arbitrary generation
+	arbitrary = elements
+		[ errorName_ "foo.bar"
+		, errorName_ "foo.bar0"
+		]
+
+instance Arbitrary BusName where
+	-- TODO: proper arbitrary generation
+	arbitrary = elements
+		[ busName_ "foo.bar"
+		, busName_ ":foo.bar"
+		, busName_ ":foo.bar"
+		]
+
+instance (Arbitrary a, Ord a) => Arbitrary (Data.Set.Set a) where
+	arbitrary = liftM Data.Set.fromList arbitrary
+
+instance Arbitrary Signature where
+	arbitrary = liftM signature_ genSignatureText
+
+instance Arbitrary DBus.Wire.Endianness where
+	arbitrary = elements [DBus.Wire.BigEndian, DBus.Wire.LittleEndian]
+
+instance Arbitrary Flag where
+	arbitrary = elements [NoReplyExpected, NoAutoStart]
+
+instance Arbitrary Serial where
+	arbitrary = liftM Serial arbitrary
+
+instance Arbitrary MethodCall where
+	arbitrary = MethodCall
+		<$> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> genMessageBody
+
+instance Arbitrary MethodReturn where
+	arbitrary = MethodReturn
+		<$> arbitrary
+		<*> arbitrary
+		<*> genMessageBody
+
+instance Arbitrary Error where
+	arbitrary = Error
+		<$> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> genMessageBody
+
+instance Arbitrary Signal where
+	arbitrary = Signal
+		<$> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> genMessageBody
+
+genMessageBody :: Gen [Variant]
+genMessageBody = do
+	vars <- arbitrary
+	case checkSignature (map variantType vars) of
+		Just _ -> return vars
+		Nothing -> halfSized genMessageBody
+
+instance Arbitrary DBus.Introspection.Object where
+	arbitrary = arbitrary >>= subObject
+
+subObject :: ObjectPath -> Gen DBus.Introspection.Object
+subObject parentPath = sized $ \n -> resize (min n 4) $ do
+	let nonRoot = do
+		x <- arbitrary
+		case objectPathText x of
+			"/" -> nonRoot
+			x'  -> return x'
+	
+	thisPath <- nonRoot
+	let path' = case objectPathText parentPath of
+		"/" -> thisPath
+		x   -> Data.Text.append x thisPath
+	let path = objectPath_ path'
+	ifaces <- arbitrary
+	children <- halfSized (listOf (subObject path))
+	return (DBus.Introspection.Object path ifaces children)
+
+instance Arbitrary DBus.Introspection.Interface where
+	arbitrary = DBus.Introspection.Interface
+		<$> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+
+instance Arbitrary DBus.Introspection.Method where
+	arbitrary = DBus.Introspection.Method
+		<$> arbitrary
+		<*> arbitrary
+		<*> arbitrary
+
+instance Arbitrary DBus.Introspection.Signal where
+	arbitrary = DBus.Introspection.Signal
+		<$> arbitrary
+		<*> arbitrary
+
+instance Arbitrary DBus.Introspection.Parameter where
+	arbitrary = DBus.Introspection.Parameter
+		<$> arbitrary
+		<*> singleType
+
+instance Arbitrary DBus.Introspection.Property where
+	arbitrary = DBus.Introspection.Property
+		<$> arbitrary
+		<*> arbitrary
+		<*> elements
+			[ []
+			, [ DBus.Introspection.Read ]
+			, [ DBus.Introspection.Write ]
+			, [ DBus.Introspection.Read
+			  , DBus.Introspection.Write ]
+			]
+
+singleType :: Gen Signature
+singleType = do
+	t <- arbitrary
+	case checkSignature [t] of
+		Just s -> return s
+		Nothing -> halfSized singleType
diff --git a/tests/dbus-core-tests.cabal b/tests/dbus-core-tests.cabal
new file mode 100644
--- /dev/null
+++ b/tests/dbus-core-tests.cabal
@@ -0,0 +1,35 @@
+name: dbus-core-tests
+version: 0
+build-type: Simple
+cabal-version: >= 1.6
+
+flag coverage
+  default: False
+  manual: True
+
+executable dbus-core_tests
+  main-is: Tests.hs
+  ghc-options: -Wall -fno-warn-orphans
+  hs-source-dirs: ../hs,.
+
+  if flag(coverage)
+    ghc-options: -fhpc
+
+  build-depends:
+      base > 3 && < 5
+    , binary >= 0.4 && < 0.6
+    , bytestring >= 0.9 && < 0.10
+    , containers >= 0.1 && < 0.5
+    , data-binary-ieee754 >= 0.3 && < 0.5
+    , libxml-sax >= 0.7 && < 0.8
+    , network >= 2.2 && < 2.4
+    , parsec >= 2.0 && < 3.2
+    , text >= 0.8 && < 0.12
+    , unix >= 2.2 && < 2.5
+    , vector >= 0.7 && < 0.8
+    , xml-types >= 0.3 && < 0.4
+    , QuickCheck == 2.4.*
+    , HUnit == 1.2.*
+    , test-framework >= 0.2 && < 0.4
+    , test-framework-quickcheck2 == 0.2.9
+    , test-framework-hunit == 0.2.6
