We know since more than a decade that galaxies were forming stars much more rapidly in the past than today. An important question has been that of understanding to what extent this enhanced activity was due to growing contribution of merging of galaxies, or to other processes. Observations in recent years are converging to show how this was largely due to the presence of much larger gas reservoirs inside galaxies. A population of spectacularly luminous merging driven starbursts is nevertheless present in the distant Universe. I will discuss our current activities in the field of galaxy formation and evolution, aimed at understanding the diverse population of distant galaxies, their different modes of star formation and the evolution of their gas reservoirs.