Crystal and electronic structure of MCuO2±δ thin films