The final LaTeX formatted version of my PhD thesis