Creating layers of material on a substrate