Added final version of the thesis