Add example thesis document ; get rid of ifthen package

Restructure code to not need ifthen package, but rather use \@ifundefined