Collection of code used in my dissertation