Source code and appendices for master thesis