Optics of thin films