Final version of the thesis before the official revision