Mixed state of thin superconducting films in perpendicular fields