\begin{figure}[H]
        \label{informationflow}
        \centering
-       \includegraphics[scale=0.7]{informationflow.eps}
+       \includegraphics[scale=0.7]{informationflow.pdf}
        \strut\\
        \strut\\
        \caption{Information flow Hyperleap database}
 \begin{figure}[H]
        \label{feedbackloop}
        \centering
-       \includegraphics[width=0.8\linewidth]{feedbackloop.eps}
+       \includegraphics[width=0.8\linewidth]{feedbackloop.pdf}
        \strut\\\strut\\
        \caption{Feedback loop for malfunctioning crawlers}
 \end{figure}
 \begin{figure}[H]
        \label{graphexample}
        \centering
-       \includegraphics[scale=0.7]{graphexample.eps}
+       \includegraphics[scale=0.7]{graphexample.pdf}
        \strut\\\strut\\
        \caption{Example DG}
 \end{figure}
 \begin{figure}[H]
        \label{dagexample}
        \centering
-       \includegraphics[scale=0.7]{dagexample.eps}
+       \includegraphics[scale=0.7]{dagexample.pdf}
        \strut\\\strut\\
        \caption{Example DAG}
 \end{figure}
 \begin{figure}[H]
        \label{exampledawg}
        \centering
-       \includegraphics[scale=0.7]{dawgexample.eps}
+       \includegraphics[scale=0.7]{dawgexample.pdf}
        \strut\\\strut\\
        \caption{Example DAWG}
 \end{figure}
 
 \begin{figure}[H]
        \label{appoverview}
        \centering
-       \includegraphics[width=\linewidth]{appoverview.eps}
+       \includegraphics[width=\linewidth]{appoverview.pdf}
        \strut\\
        \caption{Overview of the application}
 \end{figure}
 
 \begin{figure}[H]
        \label{frontendfront}
-       \includegraphics[width=\linewidth]{frontendfront.eps}
+       \includegraphics[width=\linewidth]{frontendfront.pdf}
        \caption{The landing page of the frontend}
 \end{figure}
 
 \begin{figure}[H]
        \label{frontendfront}
        \centering
-       \includegraphics[width=\linewidth]{crawlerpattern.eps}
+       \includegraphics[width=\linewidth]{crawlerpattern.pdf}
        \caption{A view of the interface for specifying the pattern. Two %
 entries are already marked.}
 \end{figure}
 
 \begin{figure}[H]
        \label{appinternals}
        \centering
-       \includegraphics[width=\linewidth]{backend.eps}
+       \includegraphics[width=\linewidth]{backend.pdf}
        \strut\\
        \caption{Main module internals}
 \end{figure}
 \begin{figure}[H]
        \label{nodelistexample}
        \centering
-       \includegraphics[width=\linewidth]{nodelistexample.eps}
+       \includegraphics[width=\linewidth]{nodelistexample.pdf}
        \caption{Node list example}
 \end{figure}
 
 \begin{figure}[H]
        \label{dawg1}
        \centering
-       \includegraphics[width=0.8\linewidth]{inccons.eps}
+       \includegraphics[width=0.8\linewidth]{inccons.pdf}
        \strut\\\strut\\
        \caption{Incrementally constructing a DAWG}
 \end{figure}
 \begin{figure}[H]
        \label{nddawg}
        \centering
-       \includegraphics[width=\linewidth]{nddawg.eps}
+       \includegraphics[width=\linewidth]{nddawg.pdf}
        \strut\\
        \caption{Example non determinism}
 \end{figure}
 
 SHELL:=/bin/bash
-VERSION:=1.0RC1
-SOURCES:=$(shell ls *.tex) scheme.xsd exrss.xml
-GRAPHS:=$(addsuffix .eps,$(basename $(shell ls *.{dot,png})))
-.PHONY: clobber graphs release
-       all: graphs thesis.pdf
-%.eps: %.png
+VERSION:=1.0
+OUTPUT:=thesis.pdf
+LATEX=pdflatex
+VPATH=./img/
+
+SOURCES:=$(filter-out preamble.tex,$(shell ls *.{tex,xsd,xml}))
+GRAPHS:=$(addsuffix .pdf,$(basename $(shell ls img/*.{dot,png})))
+
+.SECONDARY: $(addsuffix .fmt,$(basename $(OUTPUT)))
+.PHONY: clobber graphs
+
+all: graphs thesis.pdf
+
+%.pdf: %.png
        convert $< $@
-%.eps: %.dot
-       dot -Teps < $< > $@
-%.pdf: %.dvi
-       dvipdfm $<
-%.dvi: $(SOURCES)
-       latex $(basename $@)
+
+%.pdf: %.dot
+       dot -Tpdf < $< > $@
+
+%.pdf: $(SOURCES) %.fmt
+       $(LATEX) $(basename $@)
        bibtex $(basename $@)
-       latex $(basename $@)
-       latex $(basename $@)
+       $(LATEX) $(basename $@)
+       $(LATEX) $(basename $@)
+
+%.fmt: preamble.tex
+       $(LATEX) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump"
+
 graphs: $(GRAPHS)
-       clean:
-       $(RM) -v *.{eps,aux,bbl,blg,dvi,log,out,toc}
+
+clean:
+       $(RM) -v {,./img/}*.{fmt,eps,aux,bbl,blg,dvi,log,out,toc}
+
 clobber: clean
-       $(RM) -v *.pdf
-release: all clean
-       mv thesis.pdf thesis_$(VERSION).pdf
+       $(RM) -v {,./img/}*.pdf
 
--- /dev/null
+\documentclass[twopage,titlepage]{book}
+
+\usepackage{algorithm2e}               % Pseudocode
+\usepackage{a4wide}                    % Paper size
+\usepackage{graphicx}                  % Eps inclusion
+\usepackage{float}                     % Floating placement of figures
+\usepackage{listings}                  % Source code formatting
+\usepackage{setspace}                  % Line spacing abstract
+\usepackage{hyperref}                  % Hyperlinks
+\usepackage{amssymb}                   % nexists and much more
+\usepackage{amsmath}                   % Rightarrow and much more
+\usepackage{marvosym}                  % For euro sign
+
+\lstset{%
+       basicstyle=\footnotesize,
+       numbers=left,
+       numberstyle=\tiny,
+       breaklines=true,
+       showspaces=false,
+       showstringspaces=false,
+       tabsize=2,
+}
+
+\graphicspath{ {./img/} }
+
+\newcommand{\cvartitle}{Adaptable crawler specification generation system for %
+leisure activity RSS feeds}
+
+% Setup hyperlink formatting
+\hypersetup{
+       pdftitle={\cvartitle},
+       pdfauthor={Mart Lubbers},
+       pdfsubject={Artificial Intelligence},
+       hidelinks
+}
+
+% Describe the frontpage
+\author{
+       Mart Lubbers\\
+       s4109053\\
+       Radboud University Nijmegen\\
+       \strut\\
+       Alessandro Paula\footnote{External supervisor}\\
+       Hyperleap, Nijmegen\\
+       \strut\\
+       Franc Grootjen\footnote{Internal supervisor}\\
+       Artificial Intelligence, Nijmegen\\
+       Radboud University Nijmegen
+}
+\title{\cvartitle} 
+\date{\today}
 
-\documentclass[twopage,titlepage]{book}
-
-\usepackage{algorithm2e}               % Pseudocode
-\usepackage{a4wide}                    % Paper size
-\usepackage{graphicx}                  % Eps inclusion
-\usepackage{float}                     % Floating placement of figures
-\usepackage{listings}                  % Source code formatting
-\usepackage{setspace}                  % Line spacing abstract
-\usepackage[dvipdfmx]{hyperref}                % Hyperlinks
-\usepackage{amssymb}                   % nexists and much more
-\usepackage{amsmath}                   % Rightarrow and much more
-\usepackage{marvosym}                  % For euro sign
-
-\lstset{%
-       basicstyle=\footnotesize,
-       numbers=left,
-       numberstyle=\tiny,
-       breaklines=true,
-       showspaces=false,
-       showstringspaces=false,
-       tabsize=2,
-}
-
-\newcommand{\cvartitle}{Adaptable crawler specification generation system for %
-leisure activity RSS feeds}
-
-% Setup hyperlink formatting
-\hypersetup{
-       pdftitle={\cvartitle},
-       pdfauthor={Mart Lubbers},
-       pdfsubject={Artificial Intelligence},
-       hidelinks
-}
-
-% Describe the frontpage
-\author{
-       Mart Lubbers\\
-       s4109053\\
-       Radboud University Nijmegen\\
-       \strut\\
-       Alessandro Paula\footnote{External supervisor}\\
-       Hyperleap, Nijmegen\\
-       \strut\\
-       Franc Grootjen\footnote{Internal supervisor}\\
-       Artificial Intelligence, Nijmegen\\
-       Radboud University Nijmegen
-}
-\title{\cvartitle} 
-\date{\today}
-
+%&thesis
 \begin{document}
 \maketitle
 \tableofcontents