diff --git a/1_introduction.tex b/1_introduction.tex
index 7737917539d702284701583429f12b74f9a28dc2..df339aeba0e1e512a97826ebf98bcc3be93ae988 100644
--- a/1_introduction.tex
+++ b/1_introduction.tex
@@ -1,8 +1,8 @@
 % !TeX encoding = UTF-8
 \section{Einführung}
 
-...
+\lipsum[2-3]
 
-\subsection{Verwandte Arbeiten}
+\subsection{Dies und das}
 
-Siehe \zb \cite{DjeOezSal07}.
+\lipsum[4-15]
diff --git a/2_fundamentals.tex b/2_fundamentals.tex
index c19094067253681c4113b8cc6a6331cd16074327..fa013177279d543a202d774e16ba8fed7d07452d 100644
--- a/2_fundamentals.tex
+++ b/2_fundamentals.tex
@@ -1,4 +1,9 @@
 % !TeX encoding = UTF-8
 \section{Grundlagen}
 
-...
+\lipsum[8]
+
+Siehe \zb \cite{Dje06, DjeOezSal07, CocWil00}.
+
+\lipsum[9-11]
+
diff --git a/agse-thesis.cls b/agse-thesis.cls
new file mode 100644
index 0000000000000000000000000000000000000000..96d460948a1053968332b52c1876422e9b88c04b
--- /dev/null
+++ b/agse-thesis.cls
@@ -0,0 +1,245 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{agse-thesis}[2017/05/23 v0.1 AGSE Thesis]
+
+%%% Read options
+% Language: Default is German
+\newcommand{\lang}{ngerman}
+\DeclareOption{de}{\renewcommand{\lang}{ngerman}}
+\DeclareOption{en}{\renewcommand{\lang}{english}}
+
+% Font family: Default is LaTeX's lmodern
+\newcommand{\fonttype}{plain}
+\DeclareOption{serif}{     \renewcommand{\fonttype}{serif}}
+\DeclareOption{plain}{     \renewcommand{\fonttype}{plain}}
+\DeclareOption{sans-serif}{\renewcommand{\fonttype}{sans-serif}}
+
+% Document type: Default is article (twosided)
+\newcommand{\baseClass}{article}
+\DeclareOption{article}{%
+    \renewcommand{\baseClass}{article}
+    \PassOptionsToClass{twoside}{article}
+}
+\DeclareOption{book}{\renewcommand{\baseClass}{book}}
+
+\newcommand{\useparskip}{no}
+\DeclareOption{parskip}{\renewcommand{\useparskip}{yes}}
+\DeclareOption{noparskip}{\renewcommand{\useparskip}{no}}
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\baseClass}}
+\ProcessOptions\relax
+\LoadClass[11pt,a4paper]{\baseClass}
+
+% Load required language
+\RequirePackage[\lang]{babel}
+
+% Load required font
+\RequirePackage{xifthen}
+\ifthenelse{\equal{\fonttype}{plain}}{
+    \RequirePackage{lmodern}
+}{}
+\ifthenelse{\equal{\fonttype}{serif}}{
+    \RequirePackage[sc]{mathpazo}
+    \linespread{1.05}  % Palladio needs more leading (space between lines)
+}{}
+\ifthenelse{\equal{\fonttype}{sans-serif}}{
+    \RequirePackage{paratype}
+    \renewcommand*\familydefault{\sfdefault}
+}{}
+\RequirePackage[T1]{fontenc}
+
+% Allow unicode in input files
+\RequirePackage[utf8]{inputenc}
+
+% Set layout
+\RequirePackage[
+    inner=3.4cm,
+    outer=3cm,
+    top=3cm,
+    marginparwidth=2.5cm,
+    marginparsep=0.1cm
+]{geometry}
+
+\ifthenelse{\equal{\useparskip}{yes}}{
+    \RequirePackage{parskip}
+}{}
+
+% Header and Footer Style
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+\fancyhead{}
+\fancyhead[OR]{\slshape\nouppercase{\rightmark}}
+\fancyhead[EL]{\slshape\nouppercase{\leftmark}}
+\fancyfoot{}
+\fancyfoot[C]{\thepage}
+\renewcommand{\headrulewidth}{0pt}
+
+% Display Chapter and Section for book class
+\ifthenelse{\equal{\baseClass}{book}}{
+    \renewcommand{\chaptermark}[1]{\markboth{%
+        \chaptername\ \thechapter.\ #1}{\chaptername\ \thechapter.\ #1}}
+}{%
+% Display Section and Subsection for article class
+    \renewcommand{\sectionmark}[1]{\markboth{%
+        \thesection.\ #1}{\thesection.\ #1}}
+}
+
+% PDF settings
+\usepackage[%
+    pdfstartview=FitH,
+    linktocpage,
+% two lines below = color links
+    colorlinks=true,
+    citecolor=blue!20!black!30!green,
+% two lines below = don't color links
+    %colorlinks=false,
+    %pdfborder={0 0 0},
+]{hyperref}
+
+% Misc
+\RequirePackage{fancyref}
+\RequirePackage{url}
+\RequirePackage{makeidx}
+
+\RequirePackage[pdftex]{graphicx}
+
+%%% BibTeX
+\RequirePackage[numbers,sort&compress]{natbib}
+\RequirePackage[nottoc]{tocbibind}
+\bibliographystyle{plain}
+
+% Java Code Listing Style
+\RequirePackage{xcolor}
+\RequirePackage{listings}
+\definecolor{darkblue}{rgb}{0,0,.6}
+\definecolor{darkgreen}{rgb}{0,0.5,0}
+\definecolor{darkred}{rgb}{0.5,0,0}
+\lstset{%
+    language=Java,
+    basicstyle=\ttfamily\small\upshape,
+    commentstyle=\color{darkgreen}\sffamily,
+    keywordstyle=\color{darkblue}\rmfamily\bfseries,
+    breaklines=true,
+    tabsize=2,
+    xleftmargin=3mm,
+    xrightmargin=3mm,
+    numbers=none,
+    frame=single,
+    stringstyle=\color{darkred},
+    showstringspaces=false
+}
+
+% Custom commands
+\newcommand\zb{z.\,B.\ }
+\renewcommand\dh{d.\,h.\ }
+\newcommand{\mailto}[1]{\href{mailto:#1}{#1}}
+
+\RequirePackage{pgfkeys}
+\pgfkeys{
+    student/id/.estore in = \studentID,
+    student/mail/.estore in = \coverpageMail,
+    thesis/type/.estore in = \thesisType,
+    thesis/type = Bachelorarbeit,
+    thesis/date/.estore in = \thesisDate,
+    thesis/date = \today,
+    thesis/advisor/.estore in = \advisor,
+    thesis/examiner/.estore in = \firstExaminer,
+    thesis/examiner/2/.estore in = \secondExaminer,
+    thesis/group/.estore in = \groupName,
+    thesis/group = {Arbeitsgruppe Software Engineering},
+    title/size/.store in = \titleFontSize,
+    abstract/separate/.estore in = \separateAbstract,
+}
+
+% Define abstract environment for book class
+\ifthenelse{\equal{\baseClass}{book}}%
+    {\newenvironment{abstract}%
+        {\begin{center}\textbf{\small\abstractname}\end{center}\quotation\small}%
+        {\endquotation}%
+    }{}
+
+% (Re)define frontmatter and mainmatter
+\ifthenelse{\equal{\baseClass}{book}}{
+    \let\frontmatterOrig\frontmatter
+    \renewcommand{\frontmatter}{
+        \frontmatterOrig
+        \pagestyle{plain}
+    }
+    \let\mainmatterOrig\mainmatter
+    \renewcommand{\mainmatter}{
+        \mainmatterOrig
+        \pagestyle{fancy}
+        \setcounter{page}{1}
+    }
+}{
+    \newcommand{\frontmatter}{
+        \pagestyle{plain}
+        \pagenumbering{roman}
+        \setcounter{page}{1}
+    }
+    \newcommand{\mainmatter}{
+        \pagestyle{fancy}
+        \pagenumbering{arabic}
+        \setcounter{page}{1}
+    }
+}
+
+\RequirePackage{xstring}
+\RequirePackage{etoolbox}
+\newcommand{\coverpage}[2][]{
+    \pgfkeys{#1}
+    \pagestyle{empty}
+
+    \ifcsdef{separateAbstract}{\mbox{}\vspace{15mm}}{\mbox{}}
+
+    \begin{center}
+        \LARGE
+        \textbf{Freie Universität Berlin}
+
+        \vspace{4mm}
+
+        \normalsize
+        \thesisType{} am Institut für Informatik der Freien Universität Berlin
+
+        \vspace{2mm}
+
+        \groupName
+
+        \ifcsdef{separateAbstract}{\vspace{25mm}}{\vspace{13mm}}
+
+        \ifcsdef{titleFontSize}{}{%
+            \StrLen{\thesisTitle}[\titleLength]
+            \ifthenelse{\titleLength > 100}{%
+                \let\titleFontSize\LARGE
+            }{%
+                \let\titleFontSize\huge
+            }
+        }
+        \titleFontSize\thesisTitle
+
+        \ifcsdef{separateAbstract}{\vfill}{\vspace{13mm}}
+
+        \Large
+        \studentName \\
+        \normalsize
+        Matrikelnummer: \studentID\\
+        \mailto{\coverpageMail}
+
+        \vspace{4mm}
+
+        \begin{tabular}{rl}
+            \ifcsdef{advisor}{Betreuer: & \advisor\\}{}
+            Eingereicht bei: & \firstExaminer \\
+            \ifcsdef{secondExaminer}{Zweitgutachter: & \secondExaminer\\}{}
+        \end{tabular}
+
+        \vspace{4mm}
+
+        Berlin, \thesisDate
+    \end{center}
+
+    \ifcsdef{separateAbstract}{\cleardoublepage\frontmatter}{\vfill}
+    \begin{abstract}
+        #2
+    \end{abstract}
+    \ifcsdef{separateAbstract}{}{\frontmatter}
+}
diff --git a/declaration.tex b/declaration.tex
index 720489f2f43e302e058d4e9ff7a251f0510a58e1..1bd73623b8d014849b1cb3542aa5263f5601ad2d 100644
--- a/declaration.tex
+++ b/declaration.tex
@@ -1,7 +1,13 @@
 % !TeX encoding = UTF-8
 \subsection*{Eidesstattliche Erklärung}
 
-Ich versichere hiermit an Eides Statt, dass diese Arbeit von niemand anderem als meiner Person verfasst worden ist. Alle verwendeten Hilfsmittel wie Berichte, Bücher, Internetseiten oder ähnliches sind im Literaturverzeichnis angegeben, Zitate aus fremden Arbeiten sind als solche kenntlich gemacht. Die Arbeit wurde bisher in gleicher oder ähnlicher Form keiner anderen Prüfungskommission vorgelegt und auch nicht veröffentlicht.
-\parbig
-<Datum> \\\\
-<Name>
+Ich versichere hiermit an Eides Statt, dass diese Arbeit von niemand anderem 
+als meiner Person verfasst worden ist. Alle verwendeten Hilfsmittel wie 
+Berichte, Bücher, Internetseiten oder ähnliches sind im Literaturverzeichnis 
+angegeben, Zitate aus fremden Arbeiten sind als solche kenntlich gemacht. Die 
+Arbeit wurde bisher in gleicher oder ähnlicher Form keiner anderen 
+Prüfungskommission vorgelegt und auch nicht veröffentlicht.\\
+
+\thesisDate \\
+
+\studentName
diff --git a/thesis.pdf b/thesis.pdf
index a109002bf69f31c18c6c5109dbe15d34c9babcdf..f9379992f54f00d28b178c7267d1c8aacbbb37f4 100644
Binary files a/thesis.pdf and b/thesis.pdf differ
diff --git a/thesis.tex b/thesis.tex
index 4df6d418d272007e359bb70451d7c371a0988d43..82ee0e015ab068b1a89eb2dfcfc9f6bc80b197a0 100644
--- a/thesis.tex
+++ b/thesis.tex
@@ -1,132 +1,66 @@
 % !TeX encoding = UTF-8
-\documentclass[11pt,a4paper,ngerman]{article}
-\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-\usepackage[ngerman]{babel}
-\usepackage{lmodern}
 
 %===============================================================================
-% Global parameters, replace with actual values (remove < >)
-\newcommand{\thesisTitle}{<Titel>}
-\newcommand{\thesisType}{<X-Arbeit>} %Bachelorarbeit, Masterarbeit, Diplomarbeit
-\newcommand{\thesisDate}{\today}
-\newcommand{\instituteName}{Institut für Informatik}
-\newcommand{\groupName}{Arbeitsgruppe Software Engineering}
-\newcommand{\studentName}{<Vorname Nachname>}
-\newcommand{\studentEmail}{example@mail.de}
+% Font options are:
+%   plain (default), serif (uses Palladio), sans-serif (uses Paratype Sans)
+% Layout options are:
+%   article (default, no chapters), book (for longer texts, offers \chapter)
+% Paragraph options are:
+%   noparskip (default, no spacing between paragraphs), parskip (spaced)
+\documentclass[serif,article,noparskip]{agse-thesis}
+
+% Global parameters, replace with actual values.
+\newcommand{\thesisTitle}{Über den Sinn des Lebens}
+% -> You may use \par (but not \\) to format the title. If you do so, you'll
+%    need to manually set the 'pdftitle' attribute below.
+\newcommand{\studentName}{Hugo Schlupps}
 %===============================================================================
 
-%
-\usepackage{fancyref}
-\usepackage{fancyhdr}
-\usepackage{url}
-\usepackage{makeidx}
-%
-% PDF settings
-\usepackage[pdftex]{graphicx}
-\usepackage[%
-    pdfstartview=FitH,
-    pdftitle={\thesisTitle},
-    pdfauthor={\studentName},
-    colorlinks=true,
-    linktocpage
-]{hyperref}
-% colorlinks=false, pdfborder={0 0 0} % = keine farbigen Links
-%
-% Header and Footer Style
-\pagestyle{fancy}
-\fancyhead{}
-\fancyhead[R]{\slshape \studentName}
-\fancyhead[L]{\slshape\nouppercase{\rightmark}}
-\fancyfoot{}
-\fancyfoot[C]{\thepage}
-\renewcommand{\headrulewidth}{0pt}
-\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
-%
-% No identation
-\setlength\headheight{15pt}
-\setlength\parindent{0pt}
-%
-% Custom commands
-\newcommand\zb{z.\,B.\ }
-\renewcommand\dh{d.\,h.\ }
-\newcommand\parbig{\par\bigskip}
-\newcommand\parmed{\par\medskip}
-\newcommand{\mailto}[1]{\href{mailto:#1}{#1}}
-%
-% Java Code Listing Style
-\usepackage{xcolor}
-\usepackage{listings}
-\definecolor{darkblue}{rgb}{0,0,.6}
-\definecolor{darkgreen}{rgb}{0,0.5,0}
-\definecolor{darkred}{rgb}{0.5,0,0}
-\lstset{%
-    language=Java,
-    basicstyle=\ttfamily\small\upshape,
-    commentstyle=\color{darkgreen}\sffamily,
-    keywordstyle=\color{darkblue}\rmfamily\bfseries,
-    breaklines=true,
-    tabsize=2,
-    xleftmargin=3mm,
-    xrightmargin=3mm,
-    numbers=none,
-    frame=single,
-    stringstyle=\color{darkred},
-    showstringspaces=false
-}
-%
-% Title and author
-\title{{\huge\bfseries Freie Universität Berlin}\\[2ex]
-{\normalsize \thesisType{} am \instituteName{} der Freien Universität Berlin,
-\groupName}\\[6ex]
-\thesisTitle}
-
-\author{\studentName\\
-{\normalsize Matrikelnummer: }\\
-{\normalsize \mailto{\studentEmail}}\\\\
-{\normalsize Betreuer: }\\
-{\normalsize Eingereicht bei: }}
-
-\date{Berlin, \thesisDate}
+\hypersetup{pdftitle={\thesisTitle}}
+\hypersetup{pdfauthor={\studentName}}
 
+% Blind texts, for demonstration only, not part of the actual template
+\usepackage{lipsum}
 
 \begin{document}
 
-\begin{titlepage}
-
-\pagenumbering{alph}
-\maketitle
-\thispagestyle{empty}
+\coverpage[
+    student/id=1234567,
+    student/mail=email@inf.fu-berlin.de,
+    thesis/type=Bachelorarbeit,            % optional, default: Bachelorarbeit
+    thesis/group={Arbeitsgruppe Software Engineering},
+                                           % optional, default: AGSE
+    thesis/advisor={Matt Visor},           % optional
+    thesis/examiner={Prof. Dr. Mia Maus},
+    thesis/examiner/2={Prof. Dr. Bob Bär}, % optional
+    thesis/date=\today,                    % optional, default: \today
+   %title/size=\LARGE,      % set this value to overwrite automatic font size
+   %abstract/separate       % toggle this to move the abstract to its own page
+]
+{ % Your abstract here:
+    \lipsum[1]
+}
 
-\vfill{}
+\cleardoublepage
 
-\begin{abstract}
-Abstract
-\end{abstract}
+\include{declaration}
 
-\vfill{}
+\cleardoublepage
 
-\end{titlepage}
+\tableofcontents
 
-\pagestyle{empty}
-\clearpage\pagenumbering{roman}
+\cleardoublepage
 
-\include{declaration}
+\mainmatter
 
-\tableofcontents
+\input{1_introduction}
+\input{2_fundamentals}
+\input{3_main}
+\input{4_conclusion}
 
-\clearpage\pagenumbering{arabic}
-\pagestyle{fancy}
-\setcounter{page}{1}
-\include{1_introduction}
-\include{2_fundamentals}
-\include{3_main}
-\include{4_conclusion}
+\bibliography{bibliography}
 
 \appendix
 \include{5_appendix}
 
-\bibliographystyle{IEEEtran}
-\bibliography{bibliography}
-
 \end{document}