Code relating to my master's thesis.