This is the version used in the thesis.