Intermediate layers between substrates and deposited layers