diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -96,9 +96,10 @@
 
 
 TEX_FILES = $(patsubst %, src/Doc/%, \
-              Tutorial.tex Discussion.tex Introduction.tex Macros.tex Related.tex)
+              Tutorial.tex Discussion.tex Introduction.tex Macros.tex Related.tex \
+              Pics/haskore.tex Pics/midi.tex)
 
-PICS = equiv haskore midi poly
+PICS = equiv poly
 
 PDF_PICS = $(patsubst %, src/Doc/Pics/%.pdf, $(PICS))
 
diff --git a/haskore.cabal b/haskore.cabal
--- a/haskore.cabal
+++ b/haskore.cabal
@@ -1,5 +1,5 @@
 Name:           haskore
-Version:        0.1.0.2
+Version:        0.1.0.3
 License:        GPL
 License-File:   LICENSE
 Author:         Paul Hudak <paul.hudak@yale.edu>, Henning Thielemann
@@ -23,6 +23,13 @@
   src/Doc/Discussion.tex
   src/Doc/Introduction.tex
   src/Doc/Tutorial.tex
+  src/Doc/Tutorial.bbl
+  src/Doc/Pics/equiv.eps
+  src/Doc/Pics/haskore.tex
+  src/Doc/Pics/midi.tex
+  src/Doc/Pics/poly.eps
+  src/Test/CSound/Makefile
+  src/Test/MIDI/Makefile
 
 Source-Repository head
   type:     darcs
diff --git a/src/Doc/Pics/equiv.eps b/src/Doc/Pics/equiv.eps
new file mode 100644
--- /dev/null
+++ b/src/Doc/Pics/equiv.eps
@@ -0,0 +1,423 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: 
+%%Creator: Diagram
+%%CreationDate: Thu Sep  8 10:36:49 1994
+%%For: hudak
+%%DocumentFonts: (atend)
+%%Pages: 0 0
+%%BoundingBox: 0 0 236 51
+%%NXNextStepVersion: 3.0
+%%EndComments
+
+%%BeginProcSet: /usr/lib/NextStep/printPackage.ps 3.0
+%!
+% NeXT Printing Package
+% Version: 3.1
+% Copyright: 1988, NeXT, Inc.
+
+/__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
+/__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
+/UserObjects 10 array __NXdef
+/defineuserobject{
+	exch dup 1 add dup UserObjects length gt{
+		array dup 0 UserObjects putinterval
+		/UserObjects exch def
+	}{pop}ifelse UserObjects exch 3 -1 roll put
+}__NXbdef
+/undefineuserobject{UserObjects exch null put}__NXbdef
+/execuserobject{UserObjects exch get exec}__NXbdef
+/__NXRectPath{4 2 roll moveto 1 index 0 rlineto
+0 exch rlineto neg 0 rlineto closepath}__NXbdef
+/__NXProcessRectArgs{
+	1 index type /arraytype eq{
+		exch 0 4 2 index length 1 sub{
+			dup 3 add 1 exch{1 index exch get exch}for
+			5 1 roll 5 index exec
+		}for pop pop
+	}{exec}ifelse
+}__NXbdef
+/rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
+/rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
+/rectstroke{
+	gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
+		{gsave __NXRectPath null concat stroke grestore}
+		dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
+	}{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
+}__NXbdef
+/_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
+/xyshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		3 index 3 index 2 mul 1 add get add exch
+		3 index	3 index 2 mul get add exch moveto pop
+	}for pop pop
+}__NXbdef
+/xshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		exch 3 index 3 index get add exch moveto pop
+	}for pop pop
+}__NXbdef
+/yshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		3 index 3 index get add moveto pop
+	}for pop pop
+}__NXbdef
+/arct{arcto pop pop pop pop}__NXbdef
+/setbbox{pop pop pop pop}__NXbdef
+/ucache{}__NXbdef
+/ucachestatus{mark 0 0 0 0 0}__NXbdef
+/setucacheparams{cleartomark}__NXbdef
+/uappend{systemdict begin cvx exec end}__NXbdef
+/ueofill{gsave newpath uappend eofill grestore}__NXbdef
+/ufill{gsave newpath uappend fill grestore}__NXbdef
+/ustroke{
+	gsave newpath dup length 6 eq
+	{exch uappend concat}{uappend}ifelse
+	stroke grestore
+}__NXbdef
+/__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
+/ustrokepath{
+	newpath dup length 6 eq{
+		exch uappend __NXustrokepathMatrix currentmatrix exch concat
+		strokepath setmatrix
+	}{uappend strokepath}ifelse
+} __NXbdef
+/upath{
+	[exch {/ucache cvx}if pathbbox /setbbox cvx
+	 {/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
+} __NXbdef
+/setstrokeadjust{pop}__NXbdef
+/currentstrokeadjust{false}__NXbdef
+/selectfont{exch findfont exch
+dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
+/_NXCombineArrays{
+	counttomark dup 2 add index dup length 3 -1 roll {
+		2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
+	}repeat pop pop pop
+}__NXbdef
+/flushgraphics{}def
+/setwindowtype{pop pop}def
+/currentwindowtype{pop 0}def
+/setalpha{pop}def
+/currentalpha{1.0}def
+/hidecursor{}def
+/obscurecursor{}def
+/revealcursor{}def
+/setcursor{4 {pop}repeat}bind def
+/showcursor{}def
+/NextStepEncoding where not{
+/NextStepEncoding StandardEncoding 256 array copy def
+0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
+/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
+/Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
+176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
+204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
+/aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
+/ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
+/ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
+/ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
+{dup type /nametype eq
+ {NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
+}forall pop
+/NextStepEncoding NextStepEncoding readonly def
+/_NXfstr 128 string dup 0 (_NX) putinterval def
+/_NXfindfont /findfont load def
+/findfont{
+ % Because we can never let NextStepEncoding get into
+ % SharedFontDirectory, we cannot reencode a font to NextStepEncoding
+ % if we are in shared mode.  So if currentshared is true,
+ % we call the normal findfont and return that
+ /currentshared where {pop currentshared} {false} ifelse
+ {_NXfindfont}
+ {dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
+  getinterval cvn exch FontDirectory 2 index known 
+  {pop FontDirectory exch get}
+  {_NXfindfont dup /Encoding get StandardEncoding eq
+   {	dup length dict exch
+	{1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
+	 dup /Encoding NextStepEncoding put definefont
+	}{exch pop} ifelse
+   }ifelse
+ }ifelse
+}bind def
+}{pop}ifelse
+/_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
+/_NXDoImageOp{
+	3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
+	chans 2 add 2 roll parr 0 chans getinterval astore pop
+	5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
+	4 index mul /totbytes exch def pop exch pop
+	gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
+	{0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
+}__NXbdef
+/alphaimage{1 add _NXDoImageOp}def
+_NXLevel2{ 
+	/NXCalibratedRGBColorSpace where{pop}{
+		/NXCalibratedRGBColorSpace
+		{mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
+		{cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin 
+		/MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
+		/WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
+	/nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
+	/nxsetgray{dup dup nxsetrgbcolor}__NXbdef
+	/_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
+		8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
+		8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
+		currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
+		{2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
+		/DataSource exch def /ImageMatrix exch def 
+		/BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
+} {
+	/setcmykcolor{
+		1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
+		4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
+	/currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
+	/colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
+		pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
+		/Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
+		1 index 8 eq{/Unpack{.34 Alloc}def}{
+			/Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
+			/Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
+				{dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
+				2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
+				}forall/Lim exch def Str1 exch 0 exch getinterval
+			}def
+		}ifelse
+		/Ops[{.3 mul add 1}{.59 mul add 2}{.11 mul add round cvi Res exch 2 index exch put 1 add 0.0 0}]def/Val 0.0 def/Phase 0 def
+		{0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
+		image end restore}ifelse}ifelse
+	}__NXbdef
+	/nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
+	/setpattern{pop .5 setgray}__NXbdef
+	/_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
+} ifelse
+/_NXSetCMYKOrRGB where{pop}{
+	mark{systemdict /currentwindow get exec}stopped
+	{{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
+}ifelse
+%%EndProcSet
+
+gsave
+ /__NXbasematrix matrix currentmatrix def
+grestore
+%%EndProlog
+%%BeginSetup
+%%EndSetup
+gsave
+0 0 236 51 rectclip
+[1 0 0 -1 -156.280014 67] concat
+156.280014 16 235 51 rectclip
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+330.280029 28 352.280029 28 setbbox
+330.280029 28 moveto
+352.280029 28 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+/Helvetica findfont 24 scalefont [1 0 0 -1 0 0] makefont
+120
+exch
+defineuserobject
+120 execuserobject setfont
+0 nxsetgray
+gsave
+324 17 35 49 rectclip
+/Sonata findfont 24 scalefont [1 0 0 -1 0 0] makefont
+156
+exch
+defineuserobject
+156 execuserobject setfont
+0 nxsetgray
+324 51 moveto (q q q) show
+grestore
+grestore
+gsave
+156 execuserobject setfont
+0 nxsetgray
+gsave
+367 17 9 41 rectclip
+156 execuserobject setfont
+0 nxsetgray
+367 51 moveto (q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+323.279999 20 383.890015 20 setbbox
+323.279999 20 moveto
+383.890015 20 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+345 12 16 15 rectfill
+gsave
+156 execuserobject setfont
+0 nxsetgray
+gsave
+347 16 12 11 rectclip
+/Helvetica findfont 12 scalefont [1 0 0 -1 0 0] makefont
+10
+exch
+defineuserobject
+10 execuserobject setfont
+0 nxsetgray
+349 24 moveto (3) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+383.890015 20 383.890015 28.029984 setbbox
+383.890015 20 moveto
+383.890015 28.029984 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+323.279999 20 323.279999 28.029984 setbbox
+323.279999 20 moveto
+323.279999 28.029984 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+10 execuserobject setfont
+0 nxsetgray
+/Helvetica-Bold findfont 12 scalefont [1 0 0 -1 0 0] makefont
+157
+exch
+defineuserobject
+157 execuserobject setfont
+0 nxsetgray
+379 51 moveto (.) show
+grestore
+gsave
+157 execuserobject setfont
+0 nxsetgray
+gsave
+207 17 9 41 rectclip
+156 execuserobject setfont
+0 nxsetgray
+207 51 moveto (q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+158.279999 20 193.890015 20 setbbox
+158.279999 20 moveto
+193.890015 20 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+168 12 16 15 rectfill
+gsave
+156 execuserobject setfont
+0 nxsetgray
+gsave
+170 16 12 11 rectclip
+10 execuserobject setfont
+0 nxsetgray
+172 24 moveto (3) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+193.890015 20 193.890015 28.029984 setbbox
+193.890015 20 moveto
+193.890015 28.029984 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+158.279999 20 158.279999 28.029984 setbbox
+158.279999 20 moveto
+158.279999 28.029984 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+165.280014 28 187.280014 28 setbbox
+165.280014 28 moveto
+187.280014 28 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+10 execuserobject setfont
+0 nxsetgray
+gsave
+159 17 35 49 rectclip
+156 execuserobject setfont
+0 nxsetgray
+159 51 moveto (q q q) show
+grestore
+grestore
+gsave
+156 execuserobject setfont
+0 nxsetgray
+120 execuserobject setfont
+0 nxsetgray
+260 47 moveto (=) show
+grestore
+grestore
+%%Trailer
+%%DocumentFonts: Sonata
+%%+ Helvetica-Bold
+%%+ Helvetica
diff --git a/src/Doc/Pics/haskore.tex b/src/Doc/Pics/haskore.tex
new file mode 100644
--- /dev/null
+++ b/src/Doc/Pics/haskore.tex
@@ -0,0 +1,133 @@
+\begin{tikzpicture}[
+      solid/.style={rectangle,
+                    draw,
+                    thick,
+                    minimum height=1cm,
+                    text width=3cm,
+                    text badly centered},
+      clear/.style={rectangle,
+                    minimum height=0.5cm,
+                    text width=3cm,
+                    text badly centered},
+      broken/.style={rectangle,
+                     draw,
+                     dashed,
+                     minimum height=1cm,
+                     text width=3cm,
+                     text badly centered},
+      dashy/.style={ellipse,
+                     draw,
+                     dashed,
+                     minimum height=1.8cm,
+                     text width=3cm,
+                     text badly centered}
+    ]
+
+    %% Haskore, on top
+
+    \draw (5.25,0)
+          node[solid] 
+          (haskore)
+          { \textbf{Haskore} };
+    \draw (5.25,0)
+          node[dashy]
+          { };
+
+    %% Second row, translators
+    \draw (0,-2)
+          node[solid]
+          (hsk2mid)
+          { \small Haskore~$\rightarrow$~MIDI \\ Translator };
+    \draw (3.5,-2)
+          node[solid]
+          (hsk2csn)
+          { \small Haskore~$\rightarrow$~CSound \\ Translator};
+    \draw (7.0,-2)
+          node[solid]
+          (hsk2mkt)
+          { \small Haskore~$\rightarrow$~MusicKit Translator};
+    \draw (10.5,-2)
+          node[solid]
+          (hsk2cmn)
+          { \small Haskore~$\rightarrow$~Notation Translator }; 
+
+    \draw (0,-3.25)
+          node[clear]
+          (midifile)
+          { \small Standard MIDI~File };
+    \draw (3.5,-3.25)
+          node[clear]
+          (scorefile)
+          { \small CSound Score File };
+    \draw (7.0,-3.25)
+          node[clear]
+          (mkitfile)
+          { \small MusicKit ScoreFile };
+    \draw (10.5,-3.25)
+          node[clear]
+          (cmncode)
+          { \small CMN Code };
+
+    %% Third row, helpers
+    \draw (0,-4.5)
+          node[solid]
+          (midiplay)
+          { \small MIDI File Player };
+    \draw (3.5,-4.5)
+          node[solid]
+          (csound)
+          { \small CSound };
+    \draw (7.0,-4.5)
+          node[solid]
+          (musickit)
+          { \small MusicKit };
+    \draw (10.5,-4.5)
+          node[solid]
+          (cmn)
+          { \small CMN }; 
+
+    \draw (0,-5.75)
+          node[clear]
+          (midi)
+          { \small MIDI };
+    \draw (3.5,-5.75)
+          node[clear]
+          (sndfile)
+          { \small \texttt{.snd} File };
+    \draw (10.5,-5.75)
+          node[clear]
+          (notated)
+          { \small Notated score };
+
+    %% Last row, results
+    \draw (0,-7)
+          node[broken]
+          (instruments)
+          { \small MIDI Instruments };
+    \draw (3.5,-7)
+          node[solid]
+          (snd)
+          { \small Sound File Player };
+
+    \draw [very thick,->] (haskore)       to (hsk2mid.north);
+    \draw [very thick,->] (haskore)       to (hsk2csn.north);
+    \draw [very thick,->] (haskore)       to (hsk2mkt.north);
+    \draw [very thick,->] (haskore)       to (hsk2cmn.north);
+
+    \draw [very thick,-]  (hsk2mid.south) to (midifile.north);
+    \draw [very thick,-]  (hsk2csn.south) to (scorefile.north);
+    \draw [very thick,-]  (hsk2mkt.south) to (mkitfile.north);
+    \draw [very thick,-]  (hsk2cmn.south) to (cmncode.north);
+
+    \draw [very thick,->] (midifile.south) to (midiplay.north);
+    \draw [very thick,->] (scorefile.south) to (csound.north);
+    \draw [very thick,->] (mkitfile.south) to (musickit.north);
+    \draw [very thick,->] (cmncode.south) to (cmn.north);
+
+    \draw [very thick,-]  (midiplay.south) to (midi.north);
+    \draw [very thick,-]  (csound.south) to (sndfile.north);
+    \draw [very thick,->] (cmn.south) to (notated.north);
+
+    \draw [very thick,->] (midi.south) to (instruments.north);
+    \draw [very thick,->] (sndfile.south) to (snd.north);
+\end{tikzpicture}
diff --git a/src/Doc/Pics/midi.tex b/src/Doc/Pics/midi.tex
new file mode 100644
--- /dev/null
+++ b/src/Doc/Pics/midi.tex
@@ -0,0 +1,48 @@
+\begin{tikzpicture}[
+      solid/.style={rectangle,
+                    draw,
+                    thick,
+                    minimum height=1cm,
+                    text width=2cm,
+                    text badly centered},
+      clear/.style={rectangle,
+                    minimum height=0.5cm,
+                    text width=2.5cm,
+                    text badly centered}
+    ]
+
+    \draw (0,0)
+          node[solid]
+          (midifile)
+          { \small MIDI File };
+    \draw (3.0,0)
+          node[clear]
+          (stream)
+          { \small \texttt{Stream} };
+    \draw (6.0,0)
+          node[solid]
+          (datatype)
+          { \small \texttt{MidiFile} data~type};
+    \draw (8.8,0)
+          node[clear]
+          (performance)
+          { \small \texttt{Performance} };
+    \draw (12.0,0)
+          node[solid]
+          (musictype)
+          { \small \texttt{Music} data~type};
+
+    \draw [thick,->] (midifile.15) to 
+                     node[above] { \small \texttt{Load.fromFile} }
+                     (datatype.165);
+    \draw [thick,<-] (midifile.-15) to
+                     node[below] { \small \texttt{Save.toFile} }
+                     (datatype.-165);
+    \draw [thick,->] (datatype.15)  to
+                     node[above] { \small \texttt{Read.toMusic} }
+                     (musictype.165);
+    \draw [thick,<-] (datatype.-15) to
+                     node[below] { \small \texttt{Write.fromMusic} }
+                     (musictype.-165);
+
+\end{tikzpicture}
diff --git a/src/Doc/Pics/poly.eps b/src/Doc/Pics/poly.eps
new file mode 100644
--- /dev/null
+++ b/src/Doc/Pics/poly.eps
@@ -0,0 +1,1068 @@
+%!PS-Adobe-2.0 EPSF-2.0
+%%Title: 
+%%Creator: Diagram
+%%CreationDate: Mon Sep  5 13:19:42 1994
+%%For: hudak
+%%DocumentFonts: (atend)
+%%Pages: 0 0
+%%BoundingBox: 0 0 296 202
+%%NXNextStepVersion: 3.0
+%%EndComments
+
+%%BeginProcSet: /usr/lib/NextStep/printPackage.ps 3.0
+%!
+% NeXT Printing Package
+% Version: 3.1
+% Copyright: 1988, NeXT, Inc.
+
+/__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
+/__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
+/UserObjects 10 array __NXdef
+/defineuserobject{
+	exch dup 1 add dup UserObjects length gt{
+		array dup 0 UserObjects putinterval
+		/UserObjects exch def
+	}{pop}ifelse UserObjects exch 3 -1 roll put
+}__NXbdef
+/undefineuserobject{UserObjects exch null put}__NXbdef
+/execuserobject{UserObjects exch get exec}__NXbdef
+/__NXRectPath{4 2 roll moveto 1 index 0 rlineto
+0 exch rlineto neg 0 rlineto closepath}__NXbdef
+/__NXProcessRectArgs{
+	1 index type /arraytype eq{
+		exch 0 4 2 index length 1 sub{
+			dup 3 add 1 exch{1 index exch get exch}for
+			5 1 roll 5 index exec
+		}for pop pop
+	}{exec}ifelse
+}__NXbdef
+/rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
+/rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
+/rectstroke{
+	gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
+		{gsave __NXRectPath null concat stroke grestore}
+		dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
+	}{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
+}__NXbdef
+/_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
+/xyshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		3 index 3 index 2 mul 1 add get add exch
+		3 index	3 index 2 mul get add exch moveto pop
+	}for pop pop
+}__NXbdef
+/xshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		exch 3 index 3 index get add exch moveto pop
+	}for pop pop
+}__NXbdef
+/yshow{
+	0 1 3 index length 1 sub{
+		currentpoint 4 index 3 index 1 getinterval show
+		3 index 3 index get add moveto pop
+	}for pop pop
+}__NXbdef
+/arct{arcto pop pop pop pop}__NXbdef
+/setbbox{pop pop pop pop}__NXbdef
+/ucache{}__NXbdef
+/ucachestatus{mark 0 0 0 0 0}__NXbdef
+/setucacheparams{cleartomark}__NXbdef
+/uappend{systemdict begin cvx exec end}__NXbdef
+/ueofill{gsave newpath uappend eofill grestore}__NXbdef
+/ufill{gsave newpath uappend fill grestore}__NXbdef
+/ustroke{
+	gsave newpath dup length 6 eq
+	{exch uappend concat}{uappend}ifelse
+	stroke grestore
+}__NXbdef
+/__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
+/ustrokepath{
+	newpath dup length 6 eq{
+		exch uappend __NXustrokepathMatrix currentmatrix exch concat
+		strokepath setmatrix
+	}{uappend strokepath}ifelse
+} __NXbdef
+/upath{
+	[exch {/ucache cvx}if pathbbox /setbbox cvx
+	 {/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
+} __NXbdef
+/setstrokeadjust{pop}__NXbdef
+/currentstrokeadjust{false}__NXbdef
+/selectfont{exch findfont exch
+dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
+/_NXCombineArrays{
+	counttomark dup 2 add index dup length 3 -1 roll {
+		2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
+	}repeat pop pop pop
+}__NXbdef
+/flushgraphics{}def
+/setwindowtype{pop pop}def
+/currentwindowtype{pop 0}def
+/setalpha{pop}def
+/currentalpha{1.0}def
+/hidecursor{}def
+/obscurecursor{}def
+/revealcursor{}def
+/setcursor{4 {pop}repeat}bind def
+/showcursor{}def
+/NextStepEncoding where not{
+/NextStepEncoding StandardEncoding 256 array copy def
+0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
+/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
+/Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
+176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
+204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
+/aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
+/ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
+/ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
+/ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
+{dup type /nametype eq
+ {NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
+}forall pop
+/NextStepEncoding NextStepEncoding readonly def
+/_NXfstr 128 string dup 0 (_NX) putinterval def
+/_NXfindfont /findfont load def
+/findfont{
+ % Because we can never let NextStepEncoding get into
+ % SharedFontDirectory, we cannot reencode a font to NextStepEncoding
+ % if we are in shared mode.  So if currentshared is true,
+ % we call the normal findfont and return that
+ /currentshared where {pop currentshared} {false} ifelse
+ {_NXfindfont}
+ {dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
+  getinterval cvn exch FontDirectory 2 index known 
+  {pop FontDirectory exch get}
+  {_NXfindfont dup /Encoding get StandardEncoding eq
+   {	dup length dict exch
+	{1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
+	 dup /Encoding NextStepEncoding put definefont
+	}{exch pop} ifelse
+   }ifelse
+ }ifelse
+}bind def
+}{pop}ifelse
+/_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
+/_NXDoImageOp{
+	3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
+	chans 2 add 2 roll parr 0 chans getinterval astore pop
+	5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
+	4 index mul /totbytes exch def pop exch pop
+	gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
+	{0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
+}__NXbdef
+/alphaimage{1 add _NXDoImageOp}def
+_NXLevel2{ 
+	/NXCalibratedRGBColorSpace where{pop}{
+		/NXCalibratedRGBColorSpace
+		{mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
+		{cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin 
+		/MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
+		/WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
+	/nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
+	/nxsetgray{dup dup nxsetrgbcolor}__NXbdef
+	/_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
+		8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
+		8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
+		currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
+		{2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
+		/DataSource exch def /ImageMatrix exch def 
+		/BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
+} {
+	/setcmykcolor{
+		1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
+		4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
+	/currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
+	/colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
+		pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
+		/Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
+		1 index 8 eq{/Unpack{.34 Alloc}def}{
+			/Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
+			/Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
+				{dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
+				2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
+				}forall/Lim exch def Str1 exch 0 exch getinterval
+			}def
+		}ifelse
+		/Ops[{.3 mul add 1}{.59 mul add 2}{.11 mul add round cvi Res exch 2 index exch put 1 add 0.0 0}]def/Val 0.0 def/Phase 0 def
+		{0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
+		image end restore}ifelse}ifelse
+	}__NXbdef
+	/nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
+	/setpattern{pop .5 setgray}__NXbdef
+	/_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
+} ifelse
+/_NXSetCMYKOrRGB where{pop}{
+	mark{systemdict /currentwindow get exec}stopped
+	{{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
+}ifelse
+%%EndProcSet
+
+gsave
+ /__NXbasematrix matrix currentmatrix def
+grestore
+%%EndProlog
+%%BeginSetup
+%%EndSetup
+gsave
+0 0 296 202 rectclip
+[1 0 0 -1 -119 208] concat
+119 6 296 202 rectclip
+gsave
+/Helvetica findfont 12 scalefont [1 0 0 -1 0 0] makefont
+10
+exch
+defineuserobject
+10 execuserobject setfont
+0 nxsetgray
+gsave
+191 43 9 41 rectclip
+/Sonata findfont 24 scalefont [1 0 0 -1 0 0] makefont
+80
+exch
+defineuserobject
+80 execuserobject setfont
+0 nxsetgray
+191 77 moveto (q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+215 54 227 54 setbbox
+215 54 moveto
+227 54 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+209 43 26 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+209 77 moveto (q q) show
+grestore
+grestore
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+236 43 33 43 rectclip
+80 execuserobject setfont
+0 nxsetgray
+236 77 moveto (q q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+242 54 264 54 setbbox
+242 54 moveto
+264 54 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+254 59 264 59 setbbox
+254 59 moveto
+264 59 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+272 43 9 41 rectclip
+80 execuserobject setfont
+0 nxsetgray
+272 77 moveto (q) show
+grestore
+grestore
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+290 43 9 41 rectclip
+80 execuserobject setfont
+0 nxsetgray
+290 77 moveto (q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+323 54 335 54 setbbox
+323 54 moveto
+335 54 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+317 43 26 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+317 77 moveto (q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+350 54 362 54 setbbox
+350 54 moveto
+362 54 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+344 43 26 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+344 77 moveto (q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+377 54 389 54 setbbox
+377 54 moveto
+389 54 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+371 43 26 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+371 77 moveto (q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+208 45 284.279999 46 setbbox
+208 46 moveto
+284.279999 45 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+232 38 28 15 rectfill
+gsave
+80 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+237 50 moveto (3:2) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+284.279999 45 284.279999 55.029999 setbbox
+284.279999 45 moveto
+284.279999 55.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+208 46 208 54.029999 setbbox
+208 46 moveto
+208 54.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+188 35 302.779999 35 setbbox
+188 35 moveto
+302.779999 35 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+232 27 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+236 39 moveto (4:3) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+302.779999 35 302.779999 43.029999 setbbox
+302.779999 35 moveto
+302.779999 43.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+188 35 188 43.029999 setbbox
+188 35 moveto
+188 43.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+316 35 394.790009 35 setbbox
+316 35 moveto
+394.790009 35 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+342 27 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+346 39 moveto (3:2) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+394.790009 35 394.790009 43.029999 setbbox
+394.790009 35 moveto
+394.790009 43.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+316 35 316 43.029999 setbbox
+316 35 moveto
+316 43.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+177 22 406.549988 22 setbbox
+177 22 moveto
+406.549988 22 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+278 14 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+282 26 moveto (5:6) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+406.549988 22 406.549988 30.030001 setbbox
+406.549988 22 moveto
+406.549988 30.030001 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+177 22 177 30.030001 setbbox
+177 22 moveto
+177 30.030001 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+173.279999 149 246.229996 149 setbbox
+173.279999 149 moveto
+246.229996 149 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+196 141 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+200 153 moveto (5:4) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+246.229996 149 246.229996 157.029999 setbbox
+246.229996 149 moveto
+246.229996 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+173.279999 149 173.279999 157.029999 setbbox
+173.279999 149 moveto
+173.279999 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+177.279999 161 212.889999 161 setbbox
+177.279999 161 moveto
+212.889999 161 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+187 153 16 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+191 165 moveto (3) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+212.889999 161 212.889999 169.029999 setbbox
+212.889999 161 moveto
+212.889999 169.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+177.279999 161 177.279999 169.029999 setbbox
+177.279999 161 moveto
+177.279999 169.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+313.279999 161 348.890015 161 setbbox
+313.279999 161 moveto
+348.890015 161 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+323 153 16 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+327 165 moveto (3) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+348.890015 161 348.890015 169.029999 setbbox
+348.890015 161 moveto
+348.890015 169.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+313.279999 161 313.279999 169.029999 setbbox
+313.279999 161 moveto
+313.279999 169.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+319.279999 169 341.279999 169 setbbox
+319.279999 169 moveto
+341.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+10 execuserobject setfont
+0 nxsetgray
+gsave
+313 158 35 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+313 192 moveto (q q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+220.279999 169 242.279999 169 setbbox
+220.279999 169 moveto
+242.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+214 158 35 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+214 192 moveto (q q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+184.279999 169 206.279999 169 setbbox
+184.279999 169 moveto
+206.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+178 158 35 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+178 192 moveto (q q q) show
+grestore
+grestore
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+250 158 59 43 rectclip
+80 execuserobject setfont
+0 nxsetgray
+250 192 moveto (q q q q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+257.279999 169 301.279999 169 setbbox
+257.279999 169 moveto
+301.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+355.279999 169 377.279999 169 setbbox
+355.279999 169 moveto
+377.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+349 158 35 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+349 192 moveto (q q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+391.279999 169 403.279999 169 setbbox
+391.279999 169 moveto
+403.279999 169 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+80 execuserobject setfont
+0 nxsetgray
+gsave
+385 158 26 49 rectclip
+80 execuserobject setfont
+0 nxsetgray
+385 192 moveto (q q) show
+grestore
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+252.279999 149 305.769989 149 setbbox
+252.279999 149 moveto
+305.769989 149 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+266 141 26 15 rectfill
+gsave
+80 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+270 153 moveto (5:4) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+305.769989 149 305.769989 157.029999 setbbox
+305.769989 149 moveto
+305.769989 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+252.279999 149 252.279999 157.029999 setbbox
+252.279999 149 moveto
+252.279999 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+311.279999 149 382.279999 149 setbbox
+311.279999 149 moveto
+382.279999 149 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+333 141 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+337 153 moveto (5:4) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+382.279999 149 382.279999 157.029999 setbbox
+382.279999 149 moveto
+382.279999 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+311.279999 149 311.279999 157.029999 setbbox
+311.279999 149 moveto
+311.279999 157.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+169.279999 135 408.559998 135 setbbox
+169.279999 135 moveto
+408.559998 135 lineto
+end
+stroke
+grestore
+0 setlinejoin
+1 nxsetgray
+275 127 26 15 rectfill
+gsave
+10 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+279 139 moveto (7:6) show
+grestore
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+408.559998 135 408.559998 143.029999 setbbox
+408.559998 135 moveto
+408.559998 143.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+0 nxsetgray
+1 setlinewidth
+2 setlinejoin
+gsave
+newpath
+systemdict
+begin
+169.279999 135 169.279999 143.029999 setbbox
+169.279999 135 moveto
+169.279999 143.029999 lineto
+end
+stroke
+grestore
+0 setlinejoin
+gsave
+10 execuserobject setfont
+0 nxsetgray
+/Helvetica-Bold findfont 12 scalefont [1 0 0 -1 0 0] makefont
+81
+exch
+defineuserobject
+81 execuserobject setfont
+0 nxsetgray
+122 56 moveto (pr1) show
+grestore
+gsave
+81 execuserobject setfont
+0 nxsetgray
+81 execuserobject setfont
+0 nxsetgray
+122 169 moveto (pr2) show
+grestore
+gsave
+81 execuserobject setfont
+0 nxsetgray
+10 execuserobject setfont
+0 nxsetgray
+279 19 moveto (  .) show
+grestore
+grestore
+%%Trailer
+%%DocumentFonts: Sonata
+%%+ Helvetica-Bold
+%%+ Helvetica
diff --git a/src/Doc/Tutorial.bbl b/src/Doc/Tutorial.bbl
new file mode 100644
--- /dev/null
+++ b/src/Doc/Tutorial.bbl
@@ -0,0 +1,113 @@
+\begin{thebibliography}{HMGW96}
+
+\bibitem[AK92]{formula}
+D.P. Anderson and R.~Kuivila.
+\newblock Formula: A programming language for expressive computer music.
+\newblock In Denis Baggi, editor, {\em Computer Generated Music}. IEEE Computer
+  Society Press, 1992.
+
+\bibitem[Ary94]{arya94}
+K.~Arya.
+\newblock A functional animation starter-kit.
+\newblock {\em Journal of Functional Programming}, 4(1):1--18, 1994.
+
+\bibitem[Bal92]{balaban92}
+M.~Balaban.
+\newblock Music structures: Interleaving the temporal and hierarchical aspects
+  of music.
+\newblock In M.~Balaban, K.~Ebcioglu, and O.~Laske, editors, {\em Understanding
+  Music With AI}, pages 110--139. AAAI Press, 1992.
+
+\bibitem[BW88]{birdwadler88}
+R.~Bird and P.~Wadler.
+\newblock {\em Introduction to Functional Programming}.
+\newblock Prentice Hall, New York, 1988.
+
+\bibitem[Col84]{moxie}
+D.~Collinge.
+\newblock Moxie: A languge for computer music performance.
+\newblock In {\em Proc. Int'l Computer Music Conference}, pages 217--220.
+  Computer Music Association, 1984.
+
+\bibitem[CR84]{formes}
+P.~Cointe and X.~Rodet.
+\newblock Formes: an object and time oriented system for music composition and
+  synthesis.
+\newblock In {\em Proceedings of the 1984 ACM Symposium on Lisp and Functional
+  Programmming}, pages 85--95. ACM, 1984.
+
+\bibitem[Dan89]{canon}
+R.B. Dannenberg.
+\newblock The {C}anon score language.
+\newblock {\em Computer Music Journal}, 13(1):47--56, 1989.
+
+\bibitem[DFV92]{fugue}
+R.B. Dannenberg, C.L. Fraley, and P.~Velikonja.
+\newblock A functional language for sound synthesis with behavioral abstraction
+  and lazy evaluation.
+\newblock In Denis Baggi, editor, {\em Computer Generated Music}. IEEE Computer
+  Society Press, 1992.
+
+\bibitem[For73]{forte}
+A.~Forte.
+\newblock {\em The Structure of Atonal Music}.
+\newblock Yale University Press, New Haven, CT, 1973.
+
+\bibitem[HB95]{hudakberger95}
+P.~Hudak and J.~Berger.
+\newblock A model of performance, interaction, and improvisation.
+\newblock In {\em Proceedings of International Computer Music Conference}.
+  Int'l Computer Music Association, 1995.
+
+\bibitem[Hen82]{henderson82}
+P.~Henderson.
+\newblock Functional geometry.
+\newblock In {\em Proceedings of the 1982 ACM Symposium on Lisp and Functional
+  Programmming}. ACM, 1982.
+
+\bibitem[HF92]{haskell-tutorial}
+P.~Hudak and J.~Fasel.
+\newblock A gentle introduction to {H}askell.
+\newblock {\em ACM SIGPLAN Notices}, 27(5), May 1992.
+
+\bibitem[HMGW96]{haskore}
+P.~Hudak, T.~Makucevich, S.~Gadde, and B.~Whong.
+\newblock Haskore music notation -- an algebra of music.
+\newblock {\em Journal of Functional Programming}, 6(3), June 1996.
+\newblock available via\\
+\url{ftp://nebula.systemsz.cs.yale.edu/pub/yale-fp/papers/haskore/hmn-lhs.ps}.
+
+\bibitem[HS92]{scoresynth}
+G.~Haus and A.~Sametti.
+\newblock Scoresynth: A system for the synthesis of music scores based on petri
+  nets and a music algebra.
+\newblock In Denis Baggi, editor, {\em Computer Generated Music}. IEEE Computer
+  Society Press, 1992.
+
+\bibitem[IMA90]{midi}
+Midi 1.0 detailed specification: Document version 4.1.1, February 1990.
+
+\bibitem[JB91]{musickit}
+D.~Jaffe and L.~Boynton.
+\newblock An overview of the sound and music kits for the {NeXT} computer.
+\newblock In S.T. Pope, editor, {\em The Well-Tempered Object}, pages 107--118.
+  MIT Press, 1991.
+
+\bibitem[OFLB94]{grame94}
+O.~Orlarey, D.~Fober, S.~Letz, and M.~Bilton.
+\newblock Lambda calculus and music calculi.
+\newblock In {\em Proceedings of International Computer Music Conference}.
+  Int'l Computer Music Association, 1994.
+
+\bibitem[Sch83]{pla}
+B.~Schottstaedt.
+\newblock Pla: A composer's idea of a language.
+\newblock {\em Computer Music Journal}, 7(1):11--20, 1983.
+
+\bibitem[Ver86]{csound}
+B.~Vercoe.
+\newblock Csound: A manual for the audio processing system and supporting
+  programs.
+\newblock Technical report, MIT Media Lab, 1986.
+
+\end{thebibliography}
diff --git a/src/Doc/Tutorial.tex b/src/Doc/Tutorial.tex
--- a/src/Doc/Tutorial.tex
+++ b/src/Doc/Tutorial.tex
@@ -7,10 +7,13 @@
 \makeindex
 
 \usepackage{color}
+\usepackage{tikz}
+\usetikzlibrary{positioning,shapes}
+
 \usepackage{graphicx}
 \graphicspath{{.}{Pics/}}
 
-\newif\ifpdf
+\usepackage{ifpdf}
 \ifx\pdfoutput\undefined
    \pdffalse
 \else
@@ -25,6 +28,7 @@
 
 
 \usepackage{times}
+\usepackage[T1]{fontenc}
 \usepackage{listings}
 \usepackage{amsbsy} % \poor man's bold \pmb
 
@@ -33,12 +37,17 @@
 
 \lstset{%
    language=Haskell,
+   frame=single,
+   framerule=1pt,
    showstringspaces=false,
-   basicstyle=\ttfamily,
+   basicstyle=\footnotesize\ttfamily,
    keywordstyle=\textbf,
    commentstyle=\highlightcomment,
-   backgroundcolor=\color{lightgrey}}
+   backgroundcolor=\color{lightgrey}
+}
 
+
+
 \newcommand\highlightcomment[1]{\textsl{\color{darkgrey}#1}}
 \lstnewenvironment{haskelllisting}
    {\lstset{language=Haskell,gobble=2,firstline=2}}{}
@@ -55,9 +64,9 @@
     citecolor=darkgreen,
     pdfstartview=FitH,
     bookmarks,
-    pdftitle={Haskore tutorial},
-    pdfsubject={},
-    pdfkeywords={},
+    pdftitle={Haskore Music Tutorial},
+    pdfsubject={Haskore -- Music composition DSL for Haskell},
+    pdfkeywords={Haskell, DSL, Functional Programming},
     pdfauthor={Paul Hudak}
     ]{hyperref}
   \pdfimageresolution=288
@@ -117,8 +126,12 @@
 
 \maketitle
 
+\pagebreak
+
 \tableofcontents
 
+\pagebreak
+
 % the introduction
 \input{Doc/Introduction.tex}
 
@@ -204,6 +217,8 @@
 % related work
 \input{Doc/Related.tex}
 
+\pagebreak
+
 \appendix
 
 \section{Helper modules}
@@ -230,8 +245,12 @@
 % discussion about design decisions
 \input{Doc/Discussion}
 
+\pagebreak
+
 \bibliographystyle{alpha}
-\bibliography{/homes/systems/hudak/Bib/old}
+\bibliography{src/Doc/old}
+
+\pagebreak
 
 \printindex
 
diff --git a/src/Haskore.lhs b/src/Haskore.lhs
--- a/src/Haskore.lhs
+++ b/src/Haskore.lhs
@@ -20,7 +20,7 @@
 
 \begin{figure*}
 \centerline{
-\includegraphics[height=4.0in]{Doc/Pics/haskore}
+\input{Doc/Pics/haskore.tex}
 }
 \caption{Overall System Diagram}
 \figlabel{haskore}
diff --git a/src/Haskore/Interface/MIDI/Write.lhs b/src/Haskore/Interface/MIDI/Write.lhs
--- a/src/Haskore/Interface/MIDI/Write.lhs
+++ b/src/Haskore/Interface/MIDI/Write.lhs
@@ -99,7 +99,7 @@
 
 Here is the basic structure of the modules and functions:
 \begin{center}
-\includegraphics{midi}
+\input{src/Doc/Pics/midi}
 \end{center}
 
 Given instrument and drum maps (\secref{user-patch-map}),
diff --git a/src/Test/CSound/Makefile b/src/Test/CSound/Makefile
new file mode 100644
--- /dev/null
+++ b/src/Test/CSound/Makefile
@@ -0,0 +1,2 @@
+%.wav:	%.orc %.sco
+	csound -W -b 1024 -d -m 0 -o $@ $^
diff --git a/src/Test/MIDI/Makefile b/src/Test/MIDI/Makefile
new file mode 100644
--- /dev/null
+++ b/src/Test/MIDI/Makefile
@@ -0,0 +1,8 @@
+%.wav:	%.mid
+	timidity -A800 -Ow -o $@ $<
+
+Raenzlein.wav:	Raenzlein.mid
+	timidity -A800 -K -12 -Ow -o $@ $<
+
+WhiteChristmas.wav:	WhiteChristmas.mid
+	timidity -A800 -K -12 -Ow -o $@ $<
