In which layer of the earth does erosion take place?