Superconductivity, X-ray photoemission and Raman scattering study of MgB2 thin films