Finally, after five years, I can finally say that I see light at the end of the tunnel. Maybe the other side is still a bit cloudy at the moment, but the important thing is to have arrived here. And, honestly, I think I wouldn't have made it to this point without all the people who have been by my side during these years.First, I would like to thank my supervisors Oscar Corcho and Yolanda Gil for guiding me whenever I got stuck and for having the patience to answer all my questions. Furthermore, thanks to their help, together with Asunción Gómez Pérez's advice, I was granted the FPU (Formación de Profesorado Universitario) scholarship from the Ministerio de Ciencia e Innovación. This scholarship has funded the internships and the research described on this document, and I am very grateful for having had the opportunity to enjoy it.I would also like to thank my family, specially my parents (Francisco Javier and María Felisa) and my sister Elisa for all their support, advice and suggestions during this period. Even from the distance! Next up are my lab mates, who have helped me with the figures (María Poveda, I really think you could write a thesis just by doing cool figures), logos (Idafen Santana, also responsible for our soccer team), technical support (Miguel Angel García and Raúl Alcázar), advice for the thesis (Andrés García and Esther Lozano) or just cheering me up when hanging out with them