thesis Master thesis code OBS If you are interested in this code, you are probably better off looking here, for a slightly more polished version