Refactored large portions of the code, introduced countless improvements in the thesis.