Surface chemical phenomena influencing the growth of thin films