add title page and contents
move tableofcontents definition to sty
conditionally set variables in case they aren't set