Formation of thin functional dielectric layers