Parts of the code of my PhD