After fixing spelling mistakes, latest version of the thesis